RATIO_TO_REPORT使用方法

来源:互联网 发布:分级聚类算法 编辑:程序博客网 时间:2024/04/28 14:33
--RATIO_TO_REPORTRATIO_TO_REPORT(expr)   OVER ([ query_partition_clause ])RATIO_TO_REPORT is an analytic function. It 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.--计算每个员工工资占总工资百分比。HR@PROD1> SELECT last_name, salary, RATIO_TO_REPORT(salary) OVER () AS rr FROM employees WHERE job_id = 'PU_CLERK';LAST_NAME      SALARY     RR------------------------- ---------- ----------Khoo3100 .223021583Baida2900 .208633094Tobias2800 .201438849Himuro2600  .18705036Colmenares2500 .179856115

0 0
原创粉丝点击