Dept_No (Int)
Dept_Name (Char(30))
并使用以下数据库:
EMPLOYEE (fmane, minit, lname, ssn, birthdate, address, sex, salary, superssn, dno) KEY: ssn
DEPARTMENT (dname, dnumber, mgrssn, mgrstartdate) KEY: dnumber.
PROJECT (pname, pnumber, plocation, dnum) KEY: pnumber.
我现在卡住了,想给我一些启动它的建议吗?真的不知道从哪里开始
答案 0 :(得分:0)
Select e.Dept_No, d.Dept_Name, Count(e.Dept_No),
SUM(e.salary) as Sum_Salary,
AVG(e.salary) as AVE_Salary
from EMPLOYEE e
join DEPARTMENT d ON e.dno = d.dnumber
Group by e.Dept_No, d.Dept_Name