Test Page for Excel

Database Name :bluechl5_bluechiphome
select a.id as PID, d.id as EnquiryID, CONCAT(d.firstname,' ',d.lastname) as Enquirer, QUOTE(d.mobile1) as Mobile, d.email as Email, g.areaname as Area, c.project_name as ProjectName, k.beds as Beds, a.unitno as UnitNo, a.street_floor as StreetFloor, f.value as UnitModel, k.bua as BUA, a.plot_area as PlotArea, a.view as View, IF(a.finance_avail=1,'Yes','No') as Mortgaged, IF(a.rented=1,'Yes','No') as Rented, a.annual_rent as AnnualRent, IF(a.title_deed=1,'Yes','No') as TitleDeed, e.value as CustomerType, FORMAT(a.list_price,2) as ListPrice, a.comments as Remarks, a.rank as Rank, DATE_FORMAT(m.follow_up_date,'%d %M %Y') as Last_FollowUp, m.comments as Comments FROM property_info a LEFT JOIN areas_enquired b ON a.areas_enquired=b.id LEFT JOIN projects c ON a.projects=c.id LEFT JOIN enquiry_info d ON b.enquiry_info=d.id LEFT JOIN customer_types e ON d.customer_types=e.id LEFT JOIN proptype_models j ON (c.id=j.projects && j.unitmodels=a.unitmodels) LEFT JOIN property_type k ON k.id=j.property_type LEFT JOIN unitmodels f ON a.unitmodels=f.id LEFT JOIN areas g ON b.areas=g.id LEFT JOIN areas_enquired h ON (d.id=h.enquiry_info && b.id=h.id) LEFT JOIN agents i ON d.agents=i.id LEFT JOIN enquiry_followup m ON (m.areas_enquired=b.id && m.follow_up_date=(select max(x.follow_up_date) from enquiry_followup x where x.areas_enquired=m.areas_enquired ) ) WHERE g.countries='1' && i.countries='1' && i.id='66' && (h.active='1' && a.mark_for_deletion='0') && d.customer_types IN ('2','4','6','8') && c.project_types IN ('0','1','2','3','6','9','10','4','5','7','8','11') ORDER BY g.areaname ASC, d.id ASC, a.id ASC, c.project_name ASC, a.rank ASC, m.follow_up_date DESC, a.xmllastupdated DESC
The query is ended here