Skip to content
Advertisement

group by JSON Column that contains an array

I have the following table:

Table

that contains these data:

Data

How can I group by my array items in my JSON Column? and get this result:

Expected Result

Advertisement

Answer

You can try to use OPENJSON with CROSS APPLY to make it.

sqlfiddle

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