1

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

Please provide me one example.

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
MrYo
  • 1,797
  • 3
  • 19
  • 33

1 Answers1

4

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
Jon Heller
  • 34,999
  • 6
  • 74
  • 132