postgresql7.4
select number_of_members from evaluation_tasks where task_id = :task_id
select task_name, number_of_members as n_of_members from evaluation_tasks where task_id = :task_id
select p.last_name ||', '|| p.first_names as student_name,
p.person_id as student_id
from cc_users p
where p.person_id not in (select map.object_id_two from acs_rels map, evaluation_task_groups etg
where map.object_id_two = p.person_id
and map.object_id_one = etg.group_id
and etg.task_id = :task_id
and map.rel_type = 'evaluation_task_group_rel')
$orderby
select g.group_id as evaluation_group_id, g.group_name,
count(map.object_id_two) as number_of_members
from groups g, evaluation_task_groups etg,
acs_rels map
where g.group_id = etg.group_id
and etg.group_id = map.object_id_one
and map.rel_type = 'evaluation_task_group_rel'
and etg.task_id = :task_id
group by g.group_id, g.group_name
$orderby_groups
select p.last_name||', '||p.first_names from cc_users p, acs_rels map
where p.person_id = map.object_id_two
and map.object_id_one = :evaluation_group_id
select count(*) from evaluation_task_groups where task_id = :task_id