MySQL GROUP BY clauses should list all SELECTed columns

Not including all SELECTed fields can result in ambiguous GROUP BY results, and is non-standard SQL

Ref: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by