Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I get the percentage using SQL?

619584Jan 25 2008 — edited Mar 26 2008
This SQL statement displays all of the work orders that were entered for the week that the query was ran. How do I get the percentage of all of the work orders that were entered for the week compared to all of the work orders that are still open (not completed)? Thank you!

SELECT
count(evt_code)
FROM
r5events
WHERE
evt_jobtype in ('BRKD') and
evt_org = '5221' and
evt_mrc ='7100-5221' and
EVT_REPORTED between trunc(next_day(sysdate, 'SUNDAY')-6) AND trunc(next_day(sysdate, 'SUNDAY'))


evt_code is the work order number(s).
evt_jobtype is the type of work order.
evt_org is the organization.
evt_mrc is the department.
evt_reported is the date the work order was reported.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2008
Added on Jan 25 2008
7 comments
8,280 views