Friday, 29 May 2015

Q8,Paper 3,j 13.The employee information of an Organization is stored in the relation : Employee (name, sex, salary, deptname) Consider the following SQL query



Select deptname from Employee Where sex = ‘M’
group by deptname
having 
avg (salary) > {selectavg (salary) from Employee}

Output of the given query corresponds to
(A) Average salary of employee more than average salary of the organization.
(B) Average salary less than average salary of the organization.
(C) Average salary of employee equal to average salary of the organization.
(D) Average salary of male employees in a department is more than average salary of the organization.
Answer D.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.