select top 1 a.report_id, a.title, a.teaser, c.image_id, c.path, c.image_type, a.effective_date, a.service from report a, report_images b, images c where a.report_id = b.report_id and b.image_id = c.image_id and a.report_id = b.report_id and a.report_type ='HOV' and a.current_status ='STL' and b.use_as_lead_image ='T' and (a.report_id in (select report_id from report_theme where theme in ('AC','CT','EB','ME','PA','PRV','RE','SHL','YTH','HIV'))) and service ='PNP' and (a.report_id in (select report_id from report_country where country_id in ('MGP'))) order by a.effective_date desc
|