ROW_NUM

SELECT  *  FROM

(

(SELECT ROW_NUMBER() OVER (PARTITION BY  字段1,字段2  ORDER BY  字段3   DESC) AS  TMPID),  *  

FROM  表名

)

WHERE TMPID=1

posted @   _revolution  阅读(520)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示