Question: Cray Retail is a retail chain. They have a table in their database that has the following data: Three developers Tom, Dick and Harry are

Cray Retail is a retail chain. They have a table in their database that has the following data: Three developers Tom, Dick and Harry are given the task of finding the average salary of the employees in the company. They have been told that a NULL in the salary column means that those employees should not be considered. They write the following queries: Tom: SELECT SUM(Salary)/COUNT(*) from EMPLOYEE WHERE Salary IS NOT NULL ; Dick: SELECT SUM(Salary)/COUNT(*) from EMPLOYEE; Harry: SELECT AVG(Salary) from EMPLOYEE; Which of them have got the query correct? O Tom and Harry have got it right O Only Harry has got it right O Tom and Dick have got it right
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
