Rewrite the SELECT statement so that the column or expression listed in the SELECT list is also found in the GROUP BY clause.
Remove the GROUP BY function (ie: MIN Function, MAX Function, SUM Function, COUNT Function) from the SELECT statement.
Remove the expression from the SELECT list that was not in the GROUP BY clause.
For example, if you had tried to execute the following SELECT statement:
SELECT department, MIN(salary) AS "Lowest salary" FROM employees;
You would receive the following error message:
ou could correct this by including department in the GROUP BY clause as follows:
SELECT department, MIN(salary) AS "Lowest salary" FROM employees GROUP BY department;