need help with some aggregation magic

Поиск
Список
Период
Сортировка
От Andreas
Тема need help with some aggregation magic
Дата
Msg-id 4DF0CDFC.4070802@gmx.net
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: To find process that lock a table
Следующее
От: "Oliveiros d'Azevedo Cristina"
Дата:
Сообщение: Re: need help with some aggregation magic