Non aggregates require a GROUP BY expression

The SQL SELECT statement contains aggregate and non-aggregate select list items, and this requires a GROUP BY expression.

Resolution:

Edit the statement and use GROUP BY or change the statement's structure.