Good afternoon,
I would like to do a SQL to control the limit of the last hit of the employees point with the first of the other day, filtering the amount of times the calculation gave less than 11 hours for example.
I have the data below, so for example, I would get the value of the last strike of day 22 minus the first of day 23 and if the difference is less than 11 hours the value appears, and so on, in consecutive dates, if the difference between dates is greater than 1 it ignores the calculation.
CHAPA DATA BATIDA
005770 | 22/04/2015 | 07:17
005770 | 22/04/2015 | 11:39
005770 | 22/04/2015 | 13:02
005770 | 22/04/2015 | 20:23
005770 | 23/04/2015 | 07:21
005770 | 23/04/2015 | 12:59
005770 | 23/04/2015 | 16:56
005770 | 24/04/2015 | 07:31
005770 | 24/04/2015 | 11:35
005770 | 24/04/2015 | 13:00
005770 | 24/04/2015 | 17:33