Please help me to find the best solution for this puzzle?
How to I go from this table here:
ID_LOCAL ID_STATUS
-------- ---------
65 0
65 0
65 0
65 0
65 0
65 0
65 0
65 1
65 2
93 0
96 0
186 1
To this result here:
ID_LOCAL TOTAL ID_STATUS=0 ID_STATUS=1 ID_STATUS=2
-------- ----- ----------- ----------- -----------
65 9 7 1 1
93 1 1 0 0
96 1 1 0 0
186 1 0 1 0
1 Answer