how to calculate differences of timestamps?

Поиск
Список
Период
Сортировка
От Andreas
Тема how to calculate differences of timestamps?
Дата
Msg-id 4E812787.1080002@gmx.net
обсуждение исходный текст
Ответы Re: how to calculate differences of timestamps?  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-sql
How could I calculate differences of timestamps in a log-table?

Table log ( user_id integer, login boolean, ts timestamp )

So login = true would be a login-event and login = false a logout.
Is there a way to find the matching login/logout to calculate the 
difference?

Or is there a better table "design" to do this?


В списке pgsql-sql по дате отправления:

Предыдущее
От: Filip Rembiałkowski
Дата:
Сообщение: Re: handling duplicate row exception
Следующее
От: Tim Landscheidt
Дата:
Сообщение: Re: how to calculate differences of timestamps?