InterviewSolution
Saved Bookmarks
| 1. |
Consider the following relation:Works (emp_name, company_name, salary)Here, emp_name is primary key.Consider the following SQL querySelect emp_nameFrom works Twhere salary > (select avg (salary) from works S where T.company _ name = S.company _ name)The above query is for following :(A) Find the highest paid employee who earns more than the average salary of all employees of his company.(B) Find the highest paid employee who earns more than the average salary of all the employees of all the companies.(C) Find all employees who earn more than the average salary of all employees of all the companies.(D) Find all employees who earn more than the average salary of all employees of their company. |
| Answer» None | |