[SQL] 查询不重复ID的最新的一天的数据

select top 100 * from ClientSecurityReturnIndex
where EffectiveDate=(select MAX(EffectiveDate) from ClientSecurityReturnIndex as tb where ClientSecurityId=ClientSecurityReturnIndex.ClientSecurityId)
原文地址:https://www.cnblogs.com/wynlfd/p/7201622.html