标签:
sql版本
select * from
(select t.CloseDate,t.ExpiryDate,t.DataTypeLookupID,
ROW_NUMBER() over(partition by CloseDate,ExpiryDate,DataTypeLookupID order by CloseDate,ExpiryDate,DataTypeLookupID)
as new_index
from dbo.IndexVolatilityMarketData t
) a where a.new_index=1
oracle版本
select * from (
select t.as_of_date,t.origination_date,t.maturity_date,
rank()over(partition by t.as_of_date,t.origination_date,t.maturity_date order by t.as_of_date,t.origination_date,t.maturity_date) mm from alm_agreement_deposit t)a
where a.mm=1;
标签:
原文地址:http://www.cnblogs.com/kexb/p/4617479.html