postgresql7.3 select et.task_name, eg.grade_id, eg.grade_plural_name, eg.weight as grade_weight, et.weight as task_weight, to_char(et.due_date, 'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, et.number_of_members, et.online_p from evaluation_grades eg, evaluation_tasks et where et.task_id = :task_id and et.grade_id = eg.grade_id 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 where etg.task_id = :task_id $not_in_clause where p.person_id not in ([join $done_students ","]) select count(*) from persons p $not_in_clause select count(*) from persons p, registered_users ru, dotlrn_member_rels_approved app $not_in_clause and app.community_id = :community_id and app.user_id = ru.user_id and app.user_id = p.person_id and app.role = 'student' select acs_group__name(etg.group_id) as party_name, etg.group_id as party_id from evaluation_task_groups etg where etg.task_id = :task_id $not_in_clause $orderby_na 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 registered_users ru, dotlrn_member_rels_approved app, persons p $not_in_clause and app.community_id = :community_id and app.user_id = ru.user_id and app.user_id = p.person_id and app.role = 'student' $orderby_na $sql_query