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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!