Yuriy Markiv blog

TECH

SQL: expression of select is not in group by clause and contains nonaggregated column

07 October, 2019 | tech

Q: expression of select is not in group by clause and contains nonaggregated column, how to fix?

A: columns list in SELECT should match columns list in GROUP BY except aggregated columns like SUM, AVG, MIN, MAX, COUNT.

see more here