Try this:
select mysite.region,
SUM(decode(mysite.phase, 'Ph1', count(mytask.completed), 0)) "Ph1",
SUM(decode(mysite.phase, 'Ph2', count(mytask.completed), 0)) "Ph2"
from mysite, mytask
where mytask.site = mysite.site
group by mysite.region;
|
Results 1 to 3 of 3
Thread: Crosstab challenge !!Threaded View
|
Click Here to Expand Forum to Full Width |