SELECT f.* FROM flat AS f LEFT JOIN history as h ON (f.id = h.id_flat) WHERE (`hot_flat`<>'checked') AND (`cheap_flat`<>'checked') AND (h.flag_delete <> '1') GROUP BY f.id ORDER BY MAX(h.date) desc limit 0, 20
Mysql query error: Got error 28 from storage engine