标签:insert -- code sele content base over number 没有
SELECT transit_code ,data_content
FROM (
SELECT *
FROM (SELECT ROW_NUMBER() OVER(PARTITION BY transit_code ORDER BY insert_tm DESC) rn,
TT_TRANS_BASE_INFO.*
FROM TT_TRANS_BASE_INFO)
WHERE rn = 1
) t
WHERE data_content = ‘9.4‘ -- 已升级
-- where data_content != ‘9.4‘ -- 没有升级
标签:insert -- code sele content base over number 没有
原文地址:http://www.cnblogs.com/fubinhnust/p/7921414.html