I have a derived table that looks like this
it is derived form a larger table that has many other fields, and the Sales column is the sum of individual sales for that salesperson in the original table
I’d like to get the top sales person in each quarter, so the result should look like
But if I try to use
SELECT Quarter, Max(Sales), Salesperson from t1 group by Quarter
The query fails with an error because Salesperson is not in the GROUP BY clause
But if I try to use
SELECT Quarter, Max(Sales), Salesperson from t1 group by Quarter
The query fails with an error because Salesperson is not in the GROUP BY clause