Skip to content
Advertisement

Sql Grouping insight Xml

I need to get different row data to 1 row based with id and need to group by its status.

I tried in several ways and finally found a solution using xml, but when I use xml I don’t get the output I want.

This is a sample code I used to try the logic.

returned output:

expected output:

Advertisement

Answer

I think you are missing a condition in your join (progress = x.progress):

Output:

enter image description here

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