请在 下方输入 要搜索的题目:

Examine the description of the EMPLOYEEStableWhich two queries return all rows for employees whose salary is greater than the average salary in their department?

Examine the description of the EMPLOYEEStableWhich two queries return all rows for employees whose salary is greater than the average salary in their department?

发布时间:2025-11-05 12:33:09
推荐参考答案 ( 由 题搜搜 官方老师解答 )
答案:SELECT*FROM(SELECTE*,AVG(salary)OVER(PARTITIONBYdepartment_iDavg_salFROMemployees e WHEREsalary >avg_sal;;SELECTFROM*employees el WHEREsalary >(SELECTAVG(salary)FROMemployees e2WHEREel.department_id =e2.department_id
登录 - 搜搜题库网
立即注册
注册 - 搜搜题库网
立即登录