select id, addr, riqi, row_number()over (partition by riqi order by riqi) as paixu
from
(select 1 id,‘AA‘ addr,20150101 as riqi from dual
union all
select 1 id,‘BB‘ addr,20150201 as riqi from dual) where rownum =1 ;
时间: 2024-10-09 21:56:08
select id, addr, riqi, row_number()over (partition by riqi order by riqi) as paixu
from
(select 1 id,‘AA‘ addr,20150101 as riqi from dual
union all
select 1 id,‘BB‘ addr,20150201 as riqi from dual) where rownum =1 ;