Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

simple pivot

Sa SiDec 13 2019 — edited Dec 15 2019

with xt as (

select 'John','Silver','Swimming' from dual

union

select 'Steve','Bronze','Hockey' from dual

union

select 'Smith','Silver','Hockey' from dual

union

select 'X','Gold','Swimming' from dual

union

select 'Pudzianowski','Silver','Judo' from dual

union

select 'Kom','Bronze','Judo' from dual

union

select 'X','Gold','Hockey' from dual

union

select 'Gabriel','Bronze','Swimming' from dual

union

select 'X','Gold','Judo' from dual)

select * from xt;

with above data, i would like to list all the athletes medal wise something like this

Gold Silver Bronze

X Pudzianowski Kom

X John Steve

X Smith Gabriel

Comments

Processing

Post Details

Added on Dec 13 2019
4 comments
237 views