的SQL Server 2014 Management Studio中更新查詢
empid, empname, job, hiredate, sal, comm, deptno
我想驗證這是否正確我有一個表Employee
與列:
- 每個部門的僱員數
- 如何每個部門的每種工作都有很多人
- 顯示員工少於6人的部門和員工數
- 查找僱員名和工資是誰在部門收入最高薪酬20
這是我曾嘗試:
查詢#1:
select DEPTNO, count(*) AS NO_OF_PERSONS
from EMP
group by DEPTNO;
查詢#2:
select job, count(*) AS NO_OF_PERSONS
from EMP
group by job;
查詢#3:
update EMPLOYEE
set sal = sal + 1000
where com > 2500;
而我無法做第四部分。
Ple ase,顯示示例數據(以文本形式)並預期結果 – Sami
請包括您爲第4部分嘗試的內容。 –