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

Home -> Community -> Usenet -> comp.databases.oracle -> creating joins between tables with "group by" clause to limit rows

creating joins between tables with "group by" clause to limit rows

From: Tamer Higazi <tamer23_at_myrealbox.com>
Date: Tue, 11 May 2004 20:00:24 +0300
Message-ID: <c7r0sh$o2s$1@ngspool-d02.news.aol.com>


Hi!
I have problems creating joins between tables and to limit rows for a specified clolumn. I have 2 tables!

employees
departments

I face the problems with the GROUP BY clause and i don't get it handled solving that problem. Neither with oracle sql or SQL1999 syntax!

Oracle SQL:

SELECT

dep.department_name as "Name",
dep.location_id as "Location",
emp.salary AS "Salary"

FROM employees emp, departments dep
WHERE (emp.department_id = dep.department_id) GROUP BY dep.department_name;

SQL1999: SELECT
department_name as "Name",
location_id as "Location",
salary AS "Salary"
FROM employees emp
JOIN departments dep
USING(department_id)
GROUP BY department_id;

for any help

Thank you

Tamer Received on Tue May 11 2004 - 12:00:24 CDT

Original text of this message

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