Pogoda jutro Pogoda Poznań
-1-1
SELECT ao.emmission_type_id, IF(stop_date = '0000-00-00 00:00:00','2018-12-20 14:31:51',stop_date) AS stop_date2, aod.id, ao.emmission FROM db211488.adsys2_orders ao INNER JOIN db211488.adsys2_orders_dates aod ON aod.order_id = ao.id INNER JOIN db211488.adsys2_orders_sections aos ON aos.order_id = ao.id INNER JOIN db211488.adsys2_sections as2 ON as2.id = aos.section_id WHERE ao.placement_id = '10' AND aod.start_date < '2018-12-13 14:31:51' AND as2.name = 'komunikacja' AND emmission = 1 HAVING stop_date2 > '2018-12-13 14:31:51' ORDER BY aod.id