Number Functions: Ratio_To_Report

Description: Computes the ratio of a value to the sum of a set of values. If expr evaluates to null, then the ratio-to-report value also evaluates to null.

RATIO_TO_REPORT(<value>) OVER (<partition_clause>)
 
conn oe/oe
 
SELECT last_name, salary, RATIO_TO_REPORT(salary) OVER () AS RR
FROM employees
WHERE job_id = 'PU_CLERK';

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.