select count(*) from evaluation_task_groups where group_id not in ([join $done_students ","]) and etg.group_id not in ([join $done_students ","]) select count(*) from evaluation_task_groups etg, evaluation_tasks et where etg.task_item_id = et.task_item_id and et.task_id = :task_id $not_in_clause 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 count(*) from persons p $not_in_clause select count(*) from persons p, dotlrn_member_rels_approved app $not_in_clause and app.community_id = :community_id and app.user_id = p.person_id and app.role = 'student' select p.person_id as party_id, p.last_name||', '||p.first_names as party_name from persons p $not_in_clause $orderby_na 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' $orderby_na $sql_query