17,140
社区成员




select decode(lag(t1.o) over(partition by o, n order by nn),
t1.o,
null,
t1.o) o,
decode(lag(t1.n) over(partition by o, n order by nn),
t1.n,
null,
t1.n) n,
t2.nn
from ttt t1, sub_ttt t2
where t1.o = t2.fo
order by t1.o, t1.n, t2.nn;