var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Calculation of Percentage
Does anybody know how to solve this problem?
I have a table employees(emp_id, branch, num_error)
I need to group the table by branch, then by emp_id. Then, I need to calculate the percentage of a particular employee over his branch and over the entire company.
Please help!. Thank you for your time.
Try this (8i+):
select branch, emp_id
,ratio_to_report(count(*)) over(partition by emp_id) as emp_pct
,ratio_to_report(count(*)) over() as branch_pct
group by branch, emp_id