I have the following data:
User ID |
Category |
Subcategory |
|
02 |
A |
Sub1 |
|
02 |
B |
Sub2 |
|
03 |
C |
Syb7 |
|
I would like to group the data by User ID as follows:
ID
CategotyA (contains the number of subcategories)
CategoryB (contains the number of subcategories)
CategoryC( contains the number of subcategories)
example output
User ID | CategoryA | CategoryB |
|
02 | 20 | 11 |
|
03 | 5 | 55 |
|
04 | 9 | 21 |
Could someone help by providing the process and parameter needed?