Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql query formatting
Or, forgetting about using a view...
select decode(job,null,null,dname) as Department,
nvl(job,'All Jobs') as Job,"Total Empl.", "Avg. Sal." from ( select dname,job,count(*) as "Total Empl.", avg(sal) as "Avg. Sal." from emp, dept where dept.deptno = emp.deptno group by rollup (dname,job));
HTH,
Wayne
DWLMB wrote in message <9lcg3s$m0m$1_at_bob.news.rcn.net>...
>This is the best I could do:
>
Received on Thu Aug 16 2001 - 15:06:33 CDT