Gate CS-2004 Question Paper With Solutions

Q. 37 The employee information in a company is stored in the relation

Employee (name, sex, salary, deptName)
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 made employees is more than the average salary in the

Company

Answer: (D)

Explanation:

Gate CS-2004 Question Paper With Solutions

Learn More:   Gate CS-2012 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here