Select a Column in SQL not in Group By
The columns in the result set of a select query with group by clause must be: an expression used as one of the group by criteria , or … an aggregate function , or … a literal value So, you can’t do what you want to do in a single, simple query. The first thing … Read more