Consider the following table "views"
user_id _date cnt
------------------------
1 2011-02-10 123
1 2011-02-11 99
1 2011-02-12 100
1 2011-02 13 12
2 2011-02-10 32
2 2011-02-11 433
2 2011-02-12 222
2 2011-02 13 334
3 2011-02-10 766
3 2011-02-11 654
3 2011-02-12 43
3 2011-02 13 27
...
100 2011-02-13 235
As you can see, the table holds pageviews (cnt) per day (_date) per user (user_id). I'm looking for a SELECT query that will output the user_ids as columns so the table-data will be in matrix form, as follows:
_date 1 2 3 ... 100
---------------------------------
2011-02-10 123 32 766
2011-02-11 99 433 654
2011-02-12 100 222 43
2011-02-13 12 334 27 235
Is this possible to do with a SELECT statement?