and etg.group_id not in ([join $done_students ","]) dotlrn_member_rels_approved app, and app.community_id = :community_id and app.user_id = ev.party_id and app.role='student' where p.person_id not in ([join $done_students ","]) , cc_users cu where p.person_id = cu.person_id and cu.member_state = 'approved' select p.person_id as party_id, p.last_name||', '||p.first_names as party_name from persons p $not_in_clause select app.user_id as party_id, p.last_name||', '||p.first_names as party_name from dotlrn_member_rels_approved app, persons p $not_in_clause and app.community_id = :community_id and app.user_id = p.person_id and app.role = 'student' $sql_query $orderby_na