Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started