QUESTION NO: 15
The COMMISSION column shows the monthly commission earned by the employee.
Exhibit
Which two tasks would require sub queries or joins in order to be performed in a single step? (Choose two.)
A. listing the employees who earn the same amount of commission as employee 3
B. finding the total commission earned by the employees in department 10
C. finding the number of employees who earn a commission that is higher than the average commission of the company
D. listing the departments whose average commission is more that 600
E. listing the employees who do not earn commission and who are working for department 20 in descending order of the employee ID
F. listing the employees whose annual commission is more than 6000
Answer: A,C
答案解析:
A首先查询出employee 3的commission ,然后再找出与employee 3一样的commission 的雇员,使用到子查询,正确。
C首先查询出平均的commission ,在找出比这个平均高出的数量,使用到子查询,正确。
本文介绍了如何通过SQL中的子查询和联接操作来解决复杂查询问题,具体包括:列出与特定员工佣金相同的员工、找出佣金高于公司平均值的员工数量。同时提供了详细步骤和解析,帮助读者掌握高级SQL查询技巧。
5087

被折叠的 条评论
为什么被折叠?



