Error: Column ” is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.


Error: Column ” is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

Description: When a GROUP BY clause is used in the SELECT clause, each columns in the SELECT clause must be either defined via aggregated column or must be included in the GROUP BY clause.

Solution: Add all columns in the SELECT clause into the GROUP BY clause or remove the column that causing problem from the SELECT clause.

One thought on “Error: Column ” is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

Leave a comment