Yurttas/PL/DBL/mysql/F/01/00/Company-A/q07.sql

From ZCubes Wiki
Revision as of 16:16, 3 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM q07.sql REM REM For each department, retrieve the department name and the REM average salary of employees w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM q07.sql
 4REM
 5REM For each department, retrieve the department name and the
 6REM average salary of employees working in that department.
 7REM
 8*/
 9
10\. set-db.sql
11
12SELECT dname, AVG(salary)
13FROM Department, Employee
14WHERE dnumber = dno
15GROUP BY dname;