/* tematikus_summa_239_ */ 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-09-22') OR (x.idopont_szezonalis = 0 AND x.idopont_datum1 >= '2017-09-22' AND x.idopont_datum1 <= '2018-10-21') ) AND ( (x.idopont_arlejar > '0000-00-00' AND x.idopont_arlejar >= '2017-09-21') OR (x.idopont_arlejar = '0000-00-00') ) AND (x.idopont_idotartam >= 7%2F10 OR x.idopont_minimum >= 1) AND x.idopont_idotartam < 1 AND (a.ajanlat_megosztas = 1 OR b.iroda_id = 239) AND (b.orszag_id IN(15) OR ku.orszag_id IN(15)) AND (b.iroda_id IN(252,236,475,16,279,248,389,509,86,28,284,489,111,143,285,32,372,63,233,343,150,9,502,12,81,519,430,31,503,259,383,202,336,250,64,501,17,4,357,476,45,173,407,100,29,484,280,390,241,67,229,391,329,56,486,516,38,230,268,471,83,458,326,385,48,452,53,363,224,480,205,469,138,513,260,50,393,305,126,110,482,141,511,24,314,239,495,479,19,244,222,200,512,322)) / Unknown column '2F10' in 'where clause'