Home » SQL & PL/SQL » SQL & PL/SQL » Displaying rows as columns and grouping data (11g)
Displaying rows as columns and grouping data [message #674795] Mon, 18 February 2019 02:15 Go to next message
Messages: 38
Registered: August 2012
Location: Hyderabad

I have a table with the below structure


What I want as a SQL output is


Any idea how can this be achieved.

Re: Displaying rows as columns and grouping data [message #674797 is a reply to message #674795] Mon, 18 February 2019 02:31 Go to previous message
Michel Cadot
Messages: 68043
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Align the columns in result.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Search for PIVOT.
Previous Topic: XMLType Column Comparison in Select Query
Next Topic: Executing dynamic sql using forall
Goto Forum:

Current Time: Thu Dec 02 07:23:43 CST 2021