Skip to content
Advertisement

output need to achieve by one query

I have table which consist data like below.

I need output in pivot :

I can achieve by separate queries easily but is it possible to get it done by one query?

Advertisement

Answer

You can use conditional aggregation such as

in order to return results pivoted.

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