SELECT * FROM( SELECT id,name,counts,createDate,row_number() OVER(partition BY name ORDER BY createDate DESC) rowno FROM testTable ) t WHERE t.rrowno <=1
SELECT * FROM( SELECT id,name,counts,createDate,row_number() OVER(partition BY name ORDER BY createDate DESC) rowno FROM testTable ) t WHERE t.rrowno <=1