Invalid query: Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'jayisgames.i.icon_basename' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Whole query: SELECT e.entry_id AS id, e.entry_blog_id AS blogId, e.entry_title AS title, e.entry_excerpt AS excerpt, e.entry_authored_on AS authoredOn, i.icon_basename AS iconBasename, fi.fileinfo_url AS url, r.ajaxrating_votesummary_vote_count AS voteCount, IF(r.ajaxrating_votesummary_vote_count = 0,-1,IF(r.ajaxrating_votesummary_vote_count < 20,0,TRUNCATE((r.ajaxrating_votesummary_total_score / r.ajaxrating_votesummary_vote_count),2))) AS rating, c.category_basename AS categoryName, em.entry_meta_vchar_idx AS gamesFeatured FROM mt_objecttag AS o JOIN mt_tag AS t ON t.tag_id = o.objecttag_tag_id JOIN mt_entry AS e ON e.entry_id = o.objecttag_object_id AND e.entry_blog_id = o.objecttag_blog_id JOIN mt_placement AS p ON placement_entry_id = e.entry_id LEFT JOIN mt_category AS c ON placement_category_id = category_id LEFT JOIN icons AS i ON (e.entry_id = i.icon_id) LEFT JOIN mt_fileinfo AS fi ON (fi.fileinfo_entry_id = e.entry_id) LEFT JOIN mt_ajaxrating_votesummary AS r ON (e.entry_id = r.ajaxrating_votesummary_obj_id) LEFT JOIN mt_entry_meta AS em ON (e.entry_id = em.entry_meta_entry_id AND entry_meta_type like 'field.games_featured') WHERE o.objecttag_blog_id = 1 AND o.objecttag_object_datasource = 'entry' AND e.entry_status = 2 AND p.placement_is_primary = 1 AND t.tag_name IN ('ezkijamsaccount') AND fi.fileinfo_templatemap_id = 31 GROUP BY o.objecttag_object_id HAVING COUNT(DISTINCT t.tag_name) = 1 ORDER BY e.entry_authored_on DESC, rating DESC, r.ajaxrating_votesummary_vote_count DESC