-1
我對兩個查詢有疑問。這兩個查詢會給出相同的結果嗎?我試圖通過部門找到平均工資:來自Lynda.com的SQL查詢
Select s1.department, avg(s1.salary)
From
(Select department, salary
From staff
Where salary > 100000) s1
Group by s1.department
VS
select department, avg(salary) as avg_salary
from staff
where salary > 100000
group by department
您使用的RDBMS是什麼? MySQL,SQL服務器?不清楚你問什麼。您可以運行查詢並查看他們的結果是否相同 – Artem