17,382
社区成员




select d2.clientID,d2.ClientName
from(
select clientID,
max(Log_Date) mld
from deal group by clientID
)d1, deal d2 where d1.clientID=d2.clientID and d1.mld=d2.Log_Date
select *
from
(
select a.*,row_number() over(partition by clientid order by log_date desc) rn
from deal a
)
where
rn=1