I have a table which will log all the data based on one minute interval. Now I want to retrieve the records such that, if the time interval is given 2 minutes it should add the complete records with 2 minutes interval and show on screen..
Suppose the Table is:

Date | Time | Data

20-11-2011| 9:00 | 2

20-11-2011| 9:01 | 3

20-11-2011| 9:02 | 6

20-11-2011| 9:03 | 2

20-11-2011| 9:04 | 1

20-11-2011| 9:05 | 4

20-11-2011| 9:06 | 4

So, if the start date is selected as 20-11-2011 and start time as 9:01 and interval as 2 minutes, then the table should be:

@Vishal Kumar Verma: then the query should work
–
zerkmsJan 9 '12 at 4:51

thank you, however when i enter the query it is showing the complete total of the table with the selected start time, it s not showing the intervals..like Date | Time | Data 20-11-2011| 9:01 | 9 20-11-2011| 9:03 | 3 20-11-2011| 9:05 | 8
–
Vishal Kumar VermaJan 9 '12 at 5:07