Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL query
On 02 Aug 2003 13:17:07 GMT, robertzeller21_at_aol.com (Robert Zeller 21)
wrote:
>How on earth is it possible to execute a query that joins 4 tables and uses
>'GROUP BY' with aggregate functions? How the hell do you do this if the SELECT
>statement cannot specify items that are not in the GROUP BY statement??!!!
>
>TIA peeps
use inline views.
Example
select dept, name, count(*)
from
dept d,
(select deptno, count(*)
from emp
group by deptno) e
where d.deptno = e.deptno
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Sat Aug 02 2003 - 11:36:50 CDT
![]() |
![]() |