# 第09章_子查询课后练习 #1.查询和Zlotkey相同部门的员工姓名和工资 SELECT last_name,salary FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE last_name = 'Zlotkey' ); #2.…
# 第09章_子查询 # 1. 由一个具体的需求,引入子查询 # 需求:谁的工资比Abel的高? #方式1: SELECT last_name, salary FROM employees WHERE last_name = 'Abel'; SELECT last_name, salary FROM employees WHERE salary >…
# 第08章_聚合函数课后练习 #1.where子句可否使用组函数进行过滤? NO ! #2.查询公司员工工资的最大值,最小值,平均值,总和 SELECT MAX(salary) max_sal,MIN(salary) min_sal,AVG(salary) avg_sal,SUM(salary) sum_sal FROM employees; #…