3,499
社区成员
发帖
与我相关
我的任务
分享with t as (
select cur_001, cur_002, yc_001.occur_time from yc_001 join yc_002
on yc_001.occur_time=yc_002.occur_time
)
select total, occur_time from
(select cur_001+cur_002 as total, rank() over (order by (cur_001+cur_002) desc) rk, occur_time from t)
where rk=1;
select y1.cur_001+y2.cur_002,to_char(y1.occur_time,'yyyy-mm-dd')
from yc_001 y1,yc_002 y2
where y1.occur_time=y2.occur_time
and y1.cur_001+y2.cur_002=(select max(y3.cur_001+y4.cur_002) from yc_001 y3,yc_002 y4
where y3.occur_time=y4.occur_time);