Re: left join on same table use different "where" clause
Is this what you mean?
select contractor,n as jobs,completed,round(100*completed/n,2) as Pct
from (
select contractor,sum(if(status='completed',1,0) as completed,count(*) as n
from tbl
where year(reportdate)=2012
group by contractor;
) x;
Subject
Written By
Posted
February 10, 2013 04:50PM
Re: left join on same table use different "where" clause
February 10, 2013 07:28PM
February 10, 2013 11:10PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.