Msg 8120, Level 16, State 1, Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.: 원인과 해결 방법
Msg 8120, Level 16, State 1, Column 'table_name.column_name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.이 에러는 SQL Server를 비롯한 RDBMS에서 데이터를 그룹화(Grouping)할 때 실무에서 가장 빈번하게 마주치는 대표적인 구문 오류입니다. GROUP BY 절을 사용할 때, SELECT 목록에 지정된 특정 컬럼이 집계 함수(SUM, MAX, MIN, COUNT 등)로 처리되지 않았거나 GROUP BY 절에 명시되어 있지 않기 때문에 발생합니다. 관계형 데이터베이스 엔진 입장에서는 여러 ..