Hello,
I have a table which has the following
id timestamp
-------------------------------------
1 1247046037
4 1247047437
5 1247047438
6 1247048738
Now I want to return all those ids which are 3 minutes apart from the previous id. In the above example it should return 1,4,6.
How should I go about doing this? Kinda confused. I want to avoid joins and everything else as much as possible.
UPDATE Sorry, I forgot to mention that the IDs may not be sequential so cannot use id = id+1