MCQs > Admin Support > Database Management > Which of the following correlated SQL queries will return Employeeld. EmployeeName, Salary and Department of all the employees whose salary is more than the average salary of employees in their respective departments?

Database Management MCQs

Consider a table titled "Employee" having the following attributes:

Employeeld (Primary key)

EmployeeName

Salary

Department

Which of the following correlated SQL queries will return Employeeld. EmployeeName, Salary and Department of all the employees whose salary is more than the average salary of employees in their respective departments?


Answer

Correct Answer:

SELECT Employeeld, EmployeeName, Salary, Department FROM Employee e WHERE Salary >

(SELECT AVG(SaIary) FROM Employee WHERE Department = e.Department);


Explanation:

Note: This Question is unanswered, help us to find answer for this one

Database Management Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Database Management Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it