The GROUP BY clause is always the very last clause in the SELECT statement, no matter in which order the calling code orders the clauses. This leads to an SQL exception when used together with ORDER BY or LIMIT.
According to https://www.sqlite.org/syntaxdiagrams.html#select-stmt, this is invalid syntax.
The
GROUP BY
clause is always the very last clause in theSELECT
statement, no matter in which order the calling code orders the clauses. This leads to an SQL exception when used together withORDER BY
orLIMIT
. According to https://www.sqlite.org/syntaxdiagrams.html#select-stmt, this is invalid syntax.