SQL同一张表找出相同数据源中按指定字段分组后最大的一条数据
select A.*,B.x_UserGuid from
(
select
count(CreatedGUID) ss ,max(CreatedTime) maxdate,CreatedGUID
from x_myUserExt
group by CreatedGUID
) A
left join x_myUserExt B on A.CreatedGUID=B.CreatedGUID and A.maxdate=B.CreatedTime