(select D.field_id_28 as subtitle, L.cat_id as languageCat, P.field_id_4 as imgSrc, T.url_title, C.cat_id, T.entry_id, T.title, D.field_id_1 as short_description, MIN(D.field_id_31) as start_date, MAX(D.field_id_32) as end_date from
exp_channel_titles T
LEFT JOIN exp_channel_data D on T.entry_id = D.entry_id and FROM_UNIXTIME(D.field_id_31,'%Y-%m-%d') > DATE_SUB(NOW(), INTERVAL 14 DAY)
JOIN exp_category_posts C on T.entry_id = C.entry_id and C.cat_id <> 39 and C.cat_id <> 45 and C.cat_id <> 44
JOIN exp_category_posts L on T.entry_id = L.entry_id and (L.cat_id = 44 OR L.cat_id = 45)
LEFT OUTER JOIN exp_relationships I on I.parent_Id = T.entry_id and I.field_id = 6
LEFT OUTER JOIN exp_channel_data P on P.entry_id = I.child_id
where D.field_id_31 <> 0 and T.channel_id = 7 group by entry_id)order by start_date;