SQL> select c2 from b; C2
----------
2
3
47 rows selectedSQL> select (select max(c2) from b where rownum <= t.rn )
2 from (select c2,rownum rn from b) t
3 /(SELECTMAX(C2)FROMBWHEREROWNUM
------------------------------
2
3
3
3
4
4
47 rows selected
----------
2
3
47 rows selectedSQL> select (select max(c2) from b where rownum <= t.rn )
2 from (select c2,rownum rn from b) t
3 /(SELECTMAX(C2)FROMBWHEREROWNUM
------------------------------
2
3
3
3
4
4
47 rows selected
如果
C2
----------
4
3
2
可能就不是了
SQL> select c2 from b; C2
----------
5
3
47 rows selectedSQL> select (select max(c2) from b where rownum <= t.rn )
2 from (select c2,rownum rn from b) t
3 /(SELECTMAX(C2)FROMBWHEREROWNUM
------------------------------
5
5
5
5
5
5
57 rows selected
----------
5
3
47 rows selectedSQL> select max(c2) over(partition by part)
2 from
3 (select c2,count(c2) over(order by rownum) part from b)
4 /MAX(C2)OVER(PARTITIONBYPART)
----------------------------
5
3
3
3
4
4
47 rows selected
为NULL的时候COUNT()就不增加了吗?
(select max(ino) from tb_temp b
where b.iid<a.iid)
,ino) from tb_temp a