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 订购我的结果,但我有这个错误
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.