select E.Job_ID, count(*), max(Employee_Salary) as kos, avg(Employee_Salary)
from Employee E
inner join JOB D on E.Job_ID = D.Job_ID
group by E.Job_ID
我要訂購由D.Functio我的結果,但我有這個錯誤SQL查詢錯誤
Msg 8120, Level 16, State 1, Line 1
Column 'JOB.Functio' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
這是完整的查詢嗎? – imreal