123717408.gif


select * from (  

select id,name,counts,createDate,row_number() over(partition bynameorderby createDate desc) rn  

from testTable  

) t where t.rn <=1  

123731982.png


http://shop107857222.taobao.com/