表的ER图如下,
完成如下问题:
1. 列出各个部门中工资最高的员工的信息:名字、部门号、工资。
SQL> SELECT FIRST_NAME || ' ' || LAST_NAME AS NAME
,SALARY,DEPARTMENT_ID
FROM EMPLOYEES
WHERE (DEPARTMENT_ID,SALARY) IN
(SELECT DEPARTMENT_ID,MAX(SALARY)
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID);