select dotlrn_pers_communities_full.*, (select count(*) from dotlrn_member_rels_approved where dotlrn_member_rels_approved.community_id = dotlrn_pers_communities_full.community_id) as n_members from dotlrn_pers_communities_full order by dotlrn_pers_communities_full.pretty_name, dotlrn_pers_communities_full.description