3,491
社区成员
发帖
与我相关
我的任务
分享
insert into d(zhidinglie)
select t1.zhidinglie from (
select t1.*,
max(greatest(
mul1,
mul2
)) over() flag
from (
select t1.*,
t2.id,
nvl(t3.gps, 0) aaa,
t1.gprs + t1.yjbf sss,
row_number() over(partition by t1.month, t1.isp) mul1,
row_number() over(partition by t1.iccid) mul2,
from b t1, a t2, c t3
where t1.iccid = t2.iccid(+)
and t1.iccid = t3.iccid(+)
) t1
) t1
where t1.flag = 1
;