sq分组取第一条数据的一个方法:
select * from ( select row_number() over(partition by ID order by ID) as rownum , * from table ) as temp where temp.rownum = 1
sq分组取第一条数据的一个方法:
select * from ( select row_number() over(partition by ID order by ID) as rownum , * from table ) as temp where temp.rownum = 1