Let's say I have this dataset:
Client_ID Food House_Type
123 Fruits A
123 Fruits B
124 Fruits B
124 Vegetables B
124 Vegetables C
125 Vegetables C
I'm looking for this output:
Client_ID Food_Fruits Food_Vegetables House_Type_A House_Type_B House_Type_C
123 2 0 1 1 0
124 1 2 0 2 1
125 0 1 0 0 1
It's kind of similar to this question but still that function looks for strings. I'm just looking to count different categories into columns of values (Is there a specific name for the process I'm looking for? It's kind of a mixture of getting the dummies and grouping)
I'm using Teradata SQL Assistant, but also I would try to adapt a Teradata solution.