【Database】Oracle SQL拾遗

统计类

获取某列最大值/最小值所在的那条记录。

SELECT t.*
FROM 
(SELECT REQUESTID, RATE, ROW_NUMBER() OVER (ORDER BY RATE DESC) AS rn
FROM XH_OMF_TEST.OMF_CT_BICC) t
WHERE t.rn = 1
posted @ 2024-03-19 16:03  AlenYang  阅读(4)  评论(0编辑  收藏  举报