Can any one help me refactor this SQL statment so I can read it?
Code:
SELECT Tblevents.eventid, Tblevents.eventname, Tblevents.details, Tblevents.date, qry_home_cs_all.CountOfcontactid AS Totalatt, qry_CS_status_1.CountOfContactid AS Uni, qry_CS_status_2.CountOfContactid AS Biz, qry_CS_status_3.CountOfContactid AS Other, Tblevents.event_type FROM (((qry_CS_status_1 RIGHT JOIN Tblevents ON qry_CS_status_1.eventid=Tblevents.eventid) LEFT JOIN qry_CS_status_3 ON Tblevents.eventid=qry_CS_status_3.eventid) LEFT JOIN qry_CS_status_2 ON Tblevents.eventid=qry_CS_status_2.eventid) LEFT JOIN qry_home_cs_all ON Tblevents.eventid=qry_home_cs_all.eventid WHERE (((Tblevents.event_type)=2)) ORDER BY Tblevents.eventid DESC;