select f.facility_id, f.name, f.description, f.enabled_p, (select count(room_id) from rr_rooms where facility_id = f.facility_id) as roomcount from rr_facilities f where package_id = :package_id order by enabled_p desc, name