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 )
时间: 2024-10-03 22:29:18