日期:2014-05-17 浏览次数:20854 次
select tqdt_a, tqdt_b, dt, t1bh from ( select substr(tqdt,0,10) as tqdt_a, substr(tqdt,12,14) as tqdt_b, dt, t1bh, row_number() over(partition by substr(tqdt,0,10),substr(tqdt,12,14) order by dt) rn from table name ) a where a.rn=1