Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Interesting data transposition problem
select
num, max(case(when col1='X' then col2 else NULL end), max(case(when col1='Y' then col2 else NULL end), max(case(when col1='Z' then col2 else NULL end)from (
select col1, col2,
row_number() over (partition by col1 order by col2) num
)
group by num
Received on Fri Jun 10 2005 - 16:37:37 CDT