17,086
社区成员
发帖
与我相关
我的任务
分享
with temp as(
select '张' name,3 times from dual
union all
select '王' name,2 times from dual
)
select name, 1 times
from (SELECT distinct name, times, level - 1
FROM temp
CONNECT BY level <= times)
select name, time
from (SELECT distinct name, time, level - 1
FROM tb t1
CONNECT BY level <= time)
select a.name, a.time
from tb a,
(SELECT level l
from (select max(time) maxtime from tb)
CONNECT BY level <= maxtime) b
where a.time >= b.l
order by a.name