ISRO 2015 · SQL Queries

MCQ · 1 mark · Problem DBMS-SQL-0084

Consider the following schema: Emp (Empcode, Name, Sex, Salary, Deptt) A simple SQL query is executed as follows:
 SELECT Deptt FROM Emp
where sex = 'Male'
GROUP by Dept Having avg (Salary) > {select avg (Salary) from Emp}The output will be
  1. A
    Average salary of male employee is the average salary of the organization
  2. B
    Average salary of male employee is less than the average salary of the organization
  3. C
    Average salary of male employee is equal to the average salary of the organization
  4. D
    Average salary of male employee is more than the average salary of the organization

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/51196/isro2015-23

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com