hi,
I have a log-table that stores events of users and projects like this
( user_id integer, project_id integer, ts timestamp, event_type integer )
I need an aggregated list of worktime per user, per project, per day.
The users can switch projects during the day so I can't work this out
with min(ts) and max(ts).
Is there a clever way to get this with SQL ?