| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Newbie Grouping Sets, Cube Question
Hi All,
In Oracle 9, I have a table that has the following data:
Type Level Headcount
Hired Partner 4
Hired Manager 2
Hired Associate 4
Hired Associate 4
Hired Associate 5
Hired Manager 5
Terminated Manager 2
Terminated Associate 2
Terminated Associate 2
Terminated Manager 1
Begin Headcount Manager 12
Begin Headcount Associate 15
Begin Headcount Associate 20
Begin Headcount Partner 30
How can I convert this data to look like this:
Level Begin Headcount Hired Terminated Percent Terminated
Associate 35 13 4 8.3%
Manager 12 7 3 15.8%
Partner 30 4 0.0%
The Percent Terminated formula is: Terminated / (Begin Headcount + Hired)
I've looked into the Cube and Rollup functions, but I don't think I fully understand them enough to do this.
Any help is greatly appreciated.
Thank you. Received on Sun Jan 29 2006 - 16:41:37 CST
![]() |
![]() |