i have a table which i group by one column and then i output the different values and the count of this values.
activty | sum
-------------
Form | 1
Login | 4
Reg | 3
here is an example-code: http://sqlfiddle.com/#!2/c6faf/2/0
but i want the different values tp the column names with one row of values (the count).
like this:
Form | Login | Reg
------------------
1 | 4 | 3
i tried the PIVOT operation, but i'm not getting it working. what am i doing wrong?
here is my code: http://sqlfiddle.com/#!2/c6faf/35/0
thanks in advance!
br