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

select top 100 * from ClientSecurityReturnIndex
where EffectiveDate=(select MAX(EffectiveDate) from ClientSecurityReturnIndex as tb where ClientSecurityId=ClientSecurityReturnIndex.ClientSecurityId)

 

posted @ 2017-07-18 17:22  Sunshine168  阅读(2282)  评论(0编辑  收藏  举报