updated enquiry view sql to show enquiry status