-
Help calculating the percentage of jobs
Hi i have 2 tables
dw_t_jobdata (has some 2million records)
dw_t_corp_employee(has 100 records)
i need to generate a report based of a each total number of jobs to no of jobs by a cluater name ,
the query i used is
SELECT b.office_site
,trunc(a.finish_time, 'mm') MONTH
,a.cluster_name
,COUNT(a.job_id) Total_Jobs
,(RATIO_TO_REPORT(COUNT(a.job_id))over ()) AS RATIO
FROM dw_t_jobdata a
JOIN dw_t_corp_employee b
ON a.user_code = b.user_code
WHERE a.finish_time >= '01-apr-2010'
GROUP BY b.office_site, trunc(a.finish_time, 'mm'), a.cluster_name
but this does not display the total count of jobs per month by each clsuter ...
could any one please help me in
1.displaying total jobs group by finish time month,office_site,cluster_name
2.displaying Jobs by cluster name gouped by finish_time month,office_site,cluster_name
3.displaying percentage, of jobs , for example
there are 7 jobs by RTP on 01-apr-2010 , 12 jobs are total jobs on 01-apr-2010 , the percentage is 7/12*100 = 58%
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|