Reason for Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

sql group by not contained in either an aggregate function or the group by clause
sql error not in aggregate function or group by clause
in select clause is neither an aggregate nor in the group by clause
column is not contained in the entity selection list
group by invalid in select list
analysisexception cannot combine select distinct with aggregate functions or group by
reference to a column in the aggregation context may not appear outside of an aggregate function
group by invalid column name