는 다음과 같은 SQL 문을 고려해SQL : GROUP BY 문에서 더 많은 정보를 얻는 방법
SELECT
invoice.customer_name,
invoice.customer_id,
invoice.shop_location,
sum(invoice.cost)
FROM invoice
GROUP BY
invoice.customer_name, invoice.customer_id, invoice.shop_location
가 아니었다면 다른 행과 동일한 것이다 행을 식별 할 수있는 문을 수행 할 수있는 작업 그 (것)들의 invoice.shop_location
가치를 위해? 제거 Invoice.ShopLocation이 분야의 어떤 일치 나머지
아마도 내 질문에 명확하지 않습니다. 다른 invoice.shop_location 때문에 결과에 어떤 행이 있는지 알고 싶습니다. – CJ7
Sachin의 쿼리에 'HAVING count (DISTINCT invoice.shop_location)> 1'을 추가하면 정확하게 수행 할 수 있습니다. –