I have the following problem. I have a database table that contains "events", that represents transitions of users in and out from a dedicated reader.
The table is like this (simplified):
ID Unique ID (primary key, autoincrement)
Date Date and time of the event
Code Numeric code of the event (indicating if this is an in or an out from the reader)
What I need to do is this: I want to "group" the transition by day, indicating all the transitions of a day in the same row.
Tr_I Tr_II Tr_III Tr_IV
05/08/06 06:15 12:35 14:00 17:40
05/09/06 07:15 11:35
05/10/06 06:35 12:25 13:00 16:40
Here is the question: is this possible via a SQL statement?
(I'm using SQLite, so I can't use stored procedures).
Due to the kind of the application, I can assume the maximum number of transitions per day (4, in the example above) is fixed.
Thanks for all the replies,