with table_a as(
select '20110701' DAY_ID, '000012' METR, 0.23 VALUE, 'S_FR' ENAME, 'resource1' RESOURCE1 from dual
union all
select '20110701' DAY_ID, '000013' METR, 0.24 VALUE, 'S_FR' ENAME, 'resource1' RESOURCE1 from dual
union all
select '20110702' DAY_ID, '000012' METR, 0.23 VALUE, 'S_FR1' ENAME, 'resource1' RESOURCE1 from dual
union all
select '20110702' DAY_ID, '000013' METR, 0.67 VALUE, 'S_FR1' ENAME, 'resource1' RESOURCE1 from dual
)
select * from (
select day_id,ename,RESOURCE1,value,lead(value) over(partition by day_id order by value) lead_value
from table_a ) t
where t.lead_value is not null
------解决方案--------------------