标签:
select * from ( select row_number() over(order by OrderId) as rownum ,OrderId,UserEmail from TOrder where UserEmail IS NOT NULL AND UserEmail <> ‘‘ )kk where kk.rownum in ( select max(rownum) num from ( select row_number() over(order by OrderId) as rownum ,OrderId,UserEmail from TOrder where UserEmail IS NOT NULL AND UserEmail <> ‘‘ )t group by t.UserEmail )
标签:
原文地址:http://www.cnblogs.com/porray/p/4627725.html