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