SELECT * FROM
(
SELECT p1.*,ROW_NUMBER() OVER (PARTITION BY order_id ORDER BY orderprocess_id) RN
FROM tb_ttp_web_orderprocess p1 where p1.order_id='1407161034090375' and p1.order_state=2
)
WHERE RN=1
oralce数据重复取排序中的第一条
最新推荐文章于 2018-10-09 08:46:19 发布