select e.id, e.hour, e.showHour, egl.name, egl.organizer, egl.description, e.dateStart, e.dateFinish from event_data e left join event_data_has_global_languages egl on e.id = egl.event_data_id where ((e.dateStart >= '2017-12-15 00:00:00') or (e.dateFinish >= '2017-12-15 00:00:00')) AND egl.global_languages_code = 'slo' order by e.dateStart, e.showHour = 'n' desc, hour