Skip to content
Advertisement

Create columns with the frequency of a code per ID

I have to perform a query where I can count the number of distinct codes per Id.

The output should be something like:

Can you give me some advise on this?

Advertisement

Answer

Use conditional aggregation:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement