Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'skeptic.b.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by--select * from lists l,contra_books b where l.cat_id=6 and b.list_id=l.id and b.book_id=610 group by b.list_id