/* kereses_summa_200_ */ SELECT COUNT(DISTINCT a.ajanlat_id) AS summa FROM ajanlat a LEFT JOIN ajanlat_korutazas ku ON (a.ajanlat_id = ku.ajanlat_id), arajanlat b LEFT JOIN orszag c ON (b.orszag_id = c.orszag_id) LEFT JOIN hajo h ON (b.hajo_id = h.hajo_id), irodak o, idopont x, arak k WHERE a.ajanlat_id = b.ajanlat_id AND a.ajanlat_id = x.ajanlat_id AND x.idopont_id = k.idopont_id AND b.iroda_id = o.iroda_id AND a.ajanlat_status = 1 AND x.idopont_status = 1 AND ( (x.idopont_szezonalis = 1 AND x.idopont_datum2 <= '2017-12-02' AND x.idopont_datum2 >= '2017-05-27') OR (x.idopont_szezonalis = 0 AND x.idopont_datum1 >= '2017-05-27' AND x.idopont_datum1 <= '2017-12-02') ) AND ( (x.idopont_arlejar > '0000-00-00' AND x.idopont_arlejar >= '2018-10-23') OR (x.idopont_arlejar = '0000-00-00') ) AND (x.idopont_idotartam >= 1%2F12 OR x.idopont_minimum >= 1) AND (IF (k.eurosar = 0, k.ardecimal, ROUND(310.00 * k.ardecimal)) >= 12200%2F708500) AND (a.ajanlat_megosztas = 1 OR b.iroda_id = 200) AND b.utazasmod_id IN(1) AND (b.iroda_id IN(200)) / Unknown column '2F12' in 'where clause'