var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: postgresql timestamp difference
I've created a small login/logout system.
So far it works, but now i want to check how many hours a user was loggedin.
A user can log multiple times in and out on one day.
how can i determine the minimum AND the maximum timestamp of a day for a specific user?
The minimum timestamp should be, most of the times, on another row than the maximum timestamp.
This is a poor design choice that unfortunately many fall in to. Put all the data pertaining to a fact on a single row. That will reduce headaches for you and improve performance.
> how can i determine the minimum AND the maximum timestamp of a day for a specific user?
That wont satisfy your stated goal. If you reply back that you are obstinate and want an answer not advice, then I'll give you the bullets to shoot your foot.