select food_type, rest_id, rest_name, max(favorites) as favoritesfrom rest_info group by food_type이렇게 하면 안되는 이유는 ?food_type으로 그룹화를 해주었으나 rest_id, rest_name은 개별 데이터이기 때문이다.max는 그룹에 대한 통계 데이터이기 때문에 사용가능. 튜터님이 오류 발생 예시로 학생정보 조회 테이블에서 성별로 그룹화했을 때, 컬럼에 이름을 추가하면 어떤 이름이 뜰 것 같냐고 물어보셨다. 오류를 이 예시로 이해하면 좋을 듯 하다. select food_type, rest_id, rest_name, favorites from rest_info where (food_type, favorites) in ..