Expression #18 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'prodKATAKLOPdb0001.likes.like_ID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_bySELECT *,message.datecreated FROM prodKATAKLOPdb0001.message LEFT JOIN likes ON likes.like_messageID = message.message_ID LEFT JOIN horseslink ON horseslink.horseslink_UserID = message.message_senderID WHERE story=0 AND message_senderID='54' GROUP BY message_ID ORDER BY message_ID DESC