oracle 分组取第一行数据 ,查询sql语句
oracle 分组取第一行数据
SELECT * FROM (
SELECT ROW_NUMBER() OVER(PARTITION BY x ORDER BY y DESC) rn,
t.*
FROM test1 t
) WHERE rn = 1;
查找oracle 执行的语句
select t.*
from v$sqlarea t
where t.FIRST_LOAD_TIME like '2018-11-05%'
order by t.FIRST_LOAD_TIME desc
本文来自博客园,作者:临时工~,转载请注明原文链接:https://www.cnblogs.com/jixinyu12345/p/9907732.html