Question

Can we use nested analytic function within analytic function? We can use another analytic function within expression or not?

Please provide me one example.

Was it helpful?

Solution

No, you cannot nest analytic functions. From the manual:

You cannot nest analytic functions by specifying any analytic function in any part of the analytic_clause. However, you can specify an analytic function in a subquery and compute another analytic function over it.

For example:

SQL> select sum(count(*) over ()) over () from dual;
select sum(count(*) over ()) over () from dual
           *
ERROR at line 1:
ORA-30483: window  functions are not allowed here
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top