![]() |
|||
|
![]() |
![]() |
|
FULL A - Z Oracle Function Library (formerly named "Morgan's Library")
![]() Term: SUM
Definition: SUM(expression) Analytic Usage: SUM([DISTINCT | ALL] expression) OVER (partition clause) Example Usage: Aggregate Use The SQL query below displays total salary of all employees in each department. SELECT DEPT, SUM(SAL) SUM_SAL Analytic Use The query above can be reframed in order to demonstrate the analytic behavior of the SUM function: SELECT DISTINCT DEPT, SUM(SAL) OVER (PARTITION BY DEPT ORDER_BY DEPT) SUM_SAL Related Links:
Related Code Snippets:
![]() |
![]() |
Home | Search | Code Library | Sponsors | Privacy | Terms of Use | Contact Us | © 2003 - 2025 psoug.org |