0
Good afternoon,
would like to make an SQL to control the limit of the last beat of the point of the employees 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, would take the value of the last beat of day 22 less the first of day 23 and if the difference is less than 11 hours the value appears, and so on, on 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
Rafael, you want to know the time difference between a beat and another?
– Felipe Douradinho
Good afternoon Felipe, exact, the difference between the last beat of a date for example that of the 22nd and the first of the 23rd. I need to filter the employees who had less than 11 hours of rest between days.
– Rafael