ANY answer.
Re: finding differences within the same group of records
[sql]
select date,date0 from (
select worker,date, (
select max(t1.date) from t t1 where t1.date<t.date
) date0
from t t) v where datediff(date,date0)>30;
[/sql]
The above is not a readily functional solution, I use it merely to illustrate the idea.
I set the dialect to MySQL as the above uses the handy datediff() function.
Let me know if that helped you. Also, please do not hesitate to ask if you have any questions.
Best Regards,
Dimitar
|