The COMMISSION column shows the monthly commission earned by the employee. Emp_Id Dept_Id Commission 1 10 500 2 20 1000 3 10 4 10 600 5 30 800 6 30 200 7 10 8 20 300 Which tasks would require sub queries or joins in order to be performed in a single step? Select one or more: Listing the employees who earn the same amount of commission as employee 3 Listing the employees whose annual commission is more than 6000 Listing the departments whose average commission is more that 600 Listing the employees who do not earn commission and who are working for department 20 in descending order of the employee ID Finding the total commission earned by the employees in department 10 Finding the number of employees who earn a commission that is higher than the average commission of the company
Answer options
A
Listing the employees who earn the same amount of commission as employee 3
B
Listing the employees whose annual commission is more than 6000
C
Listing the departments whose average commission is more than 600
D
Finding the number of employees who earn a commission higher than the average
Correct answer: Listing the employees who earn the same amount of commission as employee 3, Finding the number of employees who earn a commission higher than the average
Explanation
Tasks requiring subqueries: finding employees matching employee 3's commission (correlated subquery) and finding employees above average commission (scalar subquery).