Skip to content
Advertisement

I have query to get some data but I need different result

this is the result

But I want the category to become a column and the count become data for each category.

I use this in Oracle

Advertisement

Answer

You can use the PIVOT as following:

— Update —

Your original query should have ' around the values in the IN clause of the PIVOT clause as follows:

Cheers!!

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