Error: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'husbandr_main.st.sort_order' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Query: SELECT at.* FROM animal_types as at LEFT JOIN setting_animal_types as st ON at.id = st.animal_types_id WHERE st.user_id = '1423' GROUP BY at.id ORDER BY -st.sort_order DESC,st.sort_order ASC, at.common_name ASC