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(departmen t_id)
GROUP BY department_id;
for any help
Thank you
Tamer
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(departmen t_id)
GROUP BY department_id;
for any help
Thank you
Tamer
Comment