时间:2021-07-01 10:21:17 帮助过:13人阅读
Row_Number去重:
select * from (select *,row_number()over(partition by Servername order by Check_Date desc) Suquence from AuditItem) s where s.Suquence=1
Croup by写法:
select * from [dbo].[AuditItem] where Check_Date in (select Max(Check_Date) from AuditItem group by servername)
SQLServer单个字段去重的方法
标签:item order by server 分组 art 写法 HERE desc span