Possible Duplicate:
How to group time by hour or by 10 minutes
With MSSQL getting this result:
from following query:
SELECT [DATESTAMP],[ZONE],[ALARM]
FROM [UNIT].[dbo].[LOG]
WHERE [DATESTAMP] BETWEEN @StartDate AND @EndDate
AND [ALARM] ='ERROR'
AND [ZONE] IN ('BOX 11','BOX 12')
ORDER BY DATESTAMP DESC
How would I alter the query to get only rows 2,5,9,13,17,19,20 ?
Meaning I only want the first(oldest) row from within a group spanning approx 1 min. within that group, whereas there will not be a burst of errors more often than 15mins Regards, Freewheelin