A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. The employee information in a company is stored in the relation
Employee (name, sex, salary, deptName)
(name is primary key )
Consider the following SQL query

select deptName
from Employee
where sex = 'M'
group by deptName
having avg (salary) > (select avg (salary) from Employee)

It returns the names of the department in which
a. the average salary is more than the average salary in the company
b. the average salary of male employees is more than the average salary of all male employees in the company
c. the average salary of male employees is more than the average salary of employees in the same department
d. the average salary of male employees is more than the average salary in the company
Answer:the average salary of male employees is more than the average salary in the company
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: