![]() |
|||
|
![]() |
![]() |
|
FULL A - Z Oracle Function Library (formerly named "Morgan's Library")
![]() Term: RATIO_TO_REPORT
Definition: RATIO_TO_REPORT (expression) (PARTITION BY <expression>) The set of values is determined by the PARTITION BY <expression> clause. If that clause is omitted then the RATIO_TO_REPORT is computed over all rows returned by the query. Note that the ORDER_BY clause is not required. Example Usage The SQL query below calculates the ratio of an employee's salary over the sum of salaries in his department. SELECT DEPT, EMPNO, SAL, RATIO_TO_REPORT(SAL) OVER (PARTITION BY DEPT) RATIO Related Links: Related Code Snippets:
|
![]() |
Home | Search | Code Library | Sponsors | Privacy | Terms of Use | Contact Us | © 2003 - 2025 psoug.org |