Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create a separate WINDOW clause and then reference it in each OVER

Pryg_skockFeb 11 2019 — edited Feb 11 2019

For a query with multiple window functions, create a separate WINDOW clause and then reference it in each OVER

SELECT sum(salary) OVER w, avg(salary) OVER w

  FROM empsal

  WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);

Comments
Post Details
Added on Feb 11 2019
13 comments
1,162 views