Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 43
    Don't use SELECT *.
    – shmosel
    Commented Jan 27, 2017 at 5:29
  • 4
  • 4
    If you want compatibility for old queries, you can turn off the only_full_group_by SQL mode.
    – Barmar
    Commented Jan 27, 2017 at 5:33
  • 15
    Try using ANY_VALUE(proof_type): dev.mysql.com/doc/refman/5.7/en/group-by-handling.html SELECT *, ANY_VALUE(proof_type) FROM tbl_customer_pod_uploads WHERE load_id = '78' AND status = 'Active' GROUP BY proof_type
    – AlexGach
    Commented Dec 29, 2017 at 21:56
  • 3
    The tricky thing here is that if you don't set sql_mode at all in my.cnf ( i.e it's absent) when you upgrade the mysql 5.7 you suddenly get this only_full_group_by issue by default . set sql_mode='' in my.cnf solves the issue
    – zzapper
    Commented Jan 12, 2018 at 14:42