Oracle SQL:如何区分行组上的列值?

Oracle SQL:如何区分行组上的列值?,sql,oracle,Sql,Oracle,如何使用Oracle SQL进行以下数据转换: 您可以在表示层轻松地执行此操作,在SQL中,您可以使用row\u number(): select (case when row_number() over (partition by colA order by colB) = 1 then colA end) as colA, colB from table t order by colA, colB;

如何使用Oracle SQL进行以下数据转换:


您可以在表示层轻松地执行此操作,在
SQL
中,您可以使用
row\u number()

select (case when row_number() over (partition by colA order by colB) = 1 then colA end) as colA, colB
from table t
order by colA, colB;