I have a table and here is an example of what is in the table (I had a query and I accidently deleted it and now I can't remember how I did it).
id computer user operation location created_at
1 Bldg_Lab1_22 001 logon Bldg_1 2010-03-17 15:57:40
2 Bldg_Lab1_19 555 logon Bldg_1 2010-03-17 15:59:42
3 Bldg_Lab1_20 658 logon Bldg_1 2010-03-17 16:02:27
4 Bldg_Lab1_20 658 logoff Bldg_1 2010-03-17 16:09:10
5 Bldg_Lab1_19 555 logoff Bldg_1 2010-03-17 16:10:13
6 Bldg_Lab1_22 001 logoff Bldg_1 2010-03-17 16:24:32
7 Bldg_Lab2_08 854 logon Bldg_2 2010-03-17 16:50:20
8 Bldg_Lab2_08 854 logoff Bldg_2 2010-03-17 19:20:13
id 1 (id is an auto incremented field) is the logon for user 001 and id 6 is the logoff for the same user so:
user computer location operation created_at operation created_at
001 Bldg_Lab1_22 Bldg_1 logon 2010-03-17 15:57:40 logoff 2010-03-17 16:24:32
id 2 is the logon for user 555 and id 5 is the logoff for the same user so:
user computer location operation created_at operation created_at
555 Bldg_Lab1_19 Bldg_1 logon 2010-03-17 15:59:42 logoff 2010-03-17 16:10:13
and so on
I have data from March 2010 to the end of the 2010 year.
Help is appreciated.
id computer user operation location created_at
1 Bldg_Lab1_22 001 logon Bldg_1 2010-03-17 15:57:40
2 Bldg_Lab1_19 555 logon Bldg_1 2010-03-17 15:59:42
3 Bldg_Lab1_20 658 logon Bldg_1 2010-03-17 16:02:27
4 Bldg_Lab1_20 658 logoff Bldg_1 2010-03-17 16:09:10
5 Bldg_Lab1_19 555 logoff Bldg_1 2010-03-17 16:10:13
6 Bldg_Lab1_22 001 logoff Bldg_1 2010-03-17 16:24:32
7 Bldg_Lab2_08 854 logon Bldg_2 2010-03-17 16:50:20
8 Bldg_Lab2_08 854 logoff Bldg_2 2010-03-17 19:20:13
id 1 (id is an auto incremented field) is the logon for user 001 and id 6 is the logoff for the same user so:
user computer location operation created_at operation created_at
001 Bldg_Lab1_22 Bldg_1 logon 2010-03-17 15:57:40 logoff 2010-03-17 16:24:32
id 2 is the logon for user 555 and id 5 is the logoff for the same user so:
user computer location operation created_at operation created_at
555 Bldg_Lab1_19 Bldg_1 logon 2010-03-17 15:59:42 logoff 2010-03-17 16:10:13
and so on
I have data from March 2010 to the end of the 2010 year.
Help is appreciated.