I have a table with userid
, roomid
and timestamp
fields.
Each room may have different userIds
:
userId1 roomid1 12:15:17
userId1 roomid1 12:17:15
userId2 roomid1 13:17:15
userId3 roomid2 12:15:15
userId4 roomid2 12:15:18
userId5 roomid2 12:15:25
And I need a query that will return something like this:
roomid 1 2 3 4 5
roomid1 userid1 userid2 userid3
roomid2 userid4 userid5 userid6 userid7 userid8
so i could see what distinct users visited what distinct rooms during the whole game.
There may be up to 32 users in the room.