SQL例句:
SELECT * FROM (SELECT row_number() over(PARTITION BY 编号 ORDER BY 日期 DESC) as indexnum,* FROM 数据表) as t WHERE t.indexnum = 1;
SQL例句:
SELECT * FROM (SELECT row_number() over(PARTITION BY 编号 ORDER BY 日期 DESC) as indexnum,* FROM 数据表) as t WHERE t.indexnum = 1;
转载于:https://www.cnblogs.com/Casker/p/SQL.html