Query failed: SELECT DISTINCT b.id, b.isbn, b.isbn13, b.title, b.publisher_id, b.imprint_id, b.series, b.pages, b.publication_date, b.street_date, b.edition, b.reprint, b.url, b.url_text, b.price, b.tagline, b.setting_place, b.setting_time, b.mood, b.temperature, gm.genre_id, p.name as publisher_name, bt.text as summary, i.name as imprint_name FROM book b, book_author ba, author a, publisher p LEFT JOIN book_text bt on bt.type = 'Summary' and bt.book_id = b.id LEFT JOIN book_character bc on bc.book_id = b.id LEFT JOIN imprint i on b.imprint_id = i.id , genre g, genre_map gm WHERE b.id = ba.book_id AND a.id = ba.author_id AND b.publisher_id = p.id AND b.publication_date between from_unixtime(1498881599) and from_unixtime(1501559940) and gm.book_id = b.id and ( ) ORDER BY b.publication_date DESC, gm.genre_id DESC