SELECT * FROM #__trybooking WHERE isPublic = 1 AND isOpen = 1 AND state = 1 AND eventEndDate >= now() UNION ( SELECT * FROM #__events_items WHERE isPublic = 1 AND isOpen = 1 AND state = 1 AND eventEndDate >= now() ORDER BY eventStartDate asc) ORDER BY eventStartDate asc