查询每个部门中薪水最低的那个人的名字?
摘要:select department_id,first_name,salary from employees e1 where e1.salary=( select min(salary) from employees e2 where e1.department_id= ...
阅读全文
查询哪些雇员的入职日期比雇员编号为101要早?
摘要:select employee_id 员工编号,hire_date 入职日期 from employees where employee_id is not null and year(hire_date) is not null group by employee_id having yea...
阅读全文
查询人数最多的那个部门的部门id?
摘要:1.先求出每个部门的人数select department_id,count(*) from employees e group by department_id;2.在求出每个部门人数的最大值select max(c) from (select department_id,count(*) c f...
阅读全文