Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL Statement problem
The following will do it assuming you know the category types ahead of time:
SELECT
sum(decode(w.cat_type,'TRAINING',1,0))/count(*) as PCT_TRAINING, sum(decode(w.cat_type,'TECHNICAL',1,0))/count(*) as PCT_TECHNICAL, ... FROM workload w
On Wed, 10 May 2000, miike wrote:
> I have a table (workload) that has a column (category_type) that has 5
> different possible entries(training, technical, clerical, operations,
> supply). Is there a way to write a SQL statement to get a listing by
> percentage of each entry type (i.e. training =25%, technical=30%, etc)
> so that I can create a piechart to give my supervisor?
> TIA.
> -mike-
>
>
Received on Wed May 10 2000 - 00:00:00 CDT
![]() |
![]() |