Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL query

Re: SQL query

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Sat, 02 Aug 2003 18:36:50 +0200
Message-ID: <82qnivkk5gct4bjpmvg9qrgh86houn90mp@4ax.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US