orm: not every query needs a group by clause
If there are annotations in an SQL statement, but there are no aggregate functions used (such as SUM, COUNT, etc), then a GROUP BY clause is not technically required. Using one implies sorting of the results to ensure uniqueness--prior to sorting them according to the requested sort in the ORDER BY clause.
Please register or sign in to comment