sql分组求最大值
select * from
(
select *,ROW_NUMBER() OVER(PARTITION BY type ORDER BY typeindex DESC) as num
from test
) t
where t.num = 1
https://www.cnblogs.com/lakeliu/p/11943946.html
select * from
(
select *,ROW_NUMBER() OVER(PARTITION BY type ORDER BY typeindex DESC) as num
from test
) t
where t.num = 1
https://www.cnblogs.com/lakeliu/p/11943946.html