5
는 GROUP BY 어느 나는 다음과 같은 쿼리를 사용 :집계 함수 또는 절
select Patients.LastName,
avg (PatientVisits.Pulse)as pulse,
avg (patientvisits.depressionlevel)as depressionLevel
from Patients
left join PatientVisits
on Patients.PatientKey=PatientVisits.PatientKey
을 그러나 나는 다음과 같은 오류 얻을 : 조회에 GROUP BY
를 추가 할 필요가
Msg 8120, Level 16, State 1, Line 1 Column 'Patients.LastName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
감사합니다. 완벽하게 작동했습니다. 나는 그렇게 간단한 것을 놓치고 있다고 믿을 수 없다. – user2726146