I have a table like this:
UserID Customer ID status
1 1 1
1 2 1
1 3 1
1 4 2
1 5 1
1 6 3
1 7 2
2 8 1
2 9 2
........
I want to summarize this table, to this:
UserID count(status 1) count(status 2) count(status 3)
1 4 2 1
2 1 2 3
.........
How can I do that in PL/SQL?
Thank in advance