因项目需求,需要将查询结果,去重后,在按照主键(自增列)排序,百度一番,记录下来 DEMO SELECT * FROM (SELECT ROW_NUMBER() OVER(PARTITION BY STATION_NAME ORDER BY ID DESC) RNO,STATION_NAME,ID FROM EMES_MAC) WHERE RNO= ORDER BY ID DESC 格式:SELECT * FROM (SELECT ROW_NUMBER() OVER(PARTITION BY 去…