Database query failed: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'u.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Last SQL query: SELECT bookAuthor, id, pic_small FROM ( SELECT quotes.bookAuthor AS bookAuthor, authors.id, authors.pic_small FROM quotes INNER JOIN authors ON (quotes.bookAuthor = authors.author) WHERE quotes.elName = 'Ow' AND quotes.publish = 0 UNION SELECT quotes.bookAuthor2 AS bookAuthor, authors.id, authors.pic_small FROM quotes INNER JOIN authors ON (quotes.bookAuthor2 = authors.author) WHERE quotes.elName = 'Ow' AND quotes.publish = 0 UNION SELECT quotes.bookAuthor3 AS bookAuthor, authors.id, authors.pic_small FROM quotes INNER JOIN authors ON (quotes.bookAuthor3 = authors.author) WHERE quotes.elName = 'Ow' AND quotes.publish = 0 ) AS u GROUP BY u.bookAuthor ORDER BY u.bookAuthor ASC