select * from (select t.*,row_number() over(partition by t.type order by 1) rn from a.t_trade_order t ) where rn<=1 ;it