need help with some aggregation magic - Mailing list pgsql-sql

From Andreas
Subject need help with some aggregation magic
Date
Msg-id 4DF0CDFC.4070802@gmx.net
Whole thread Raw
Responses Re: need help with some aggregation magic  (Richard Broersma <richard.broersma@gmail.com>)
Re: need help with some aggregation magic  (Kevin Crain <kevin.crain1@gmail.com>)
List pgsql-sql
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 ?


pgsql-sql by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: To find process that lock a table
Next
From: "Oliveiros d'Azevedo Cristina"
Date:
Subject: Re: need help with some aggregation magic