OracleWindow FunctionsRATIO_TO_REPORT
NTH_VALUE

RATIO_TO_REPORTWindow Functions

FIRST

Returns the ratio of the current value to the sum.

Syntax

RATIO_TO_REPORT(expr) OVER (w)

Example

Enter values below to update the example in real time.

employee_id
salary
salary_ratio
employees
-- 각 직원 급여가 전체에서 차지하는 비율
SELECT employee_id, salary,
       ROUND(RATIO_TO_REPORT(salary) OVER (), 4) AS salary_ratio
FROM employees;