一.over()分析函数 分组查前几条:select * from test t where (select count(*) from test a where t.type=a.type and t.scope>a.scope)<2: --rank()/dense_rank() over(partition by ...order by ...) select * from(select t.*,rank() over(partition by t.type order by t.scop…