postgresql7.3
select evaluation__party_name(:party_id,:task_id)
select ese.grade
from evaluation_student_evals ese, evaluation_tasks et
where ese.party_id = :party_id
and ese.task_item_id = et.task_item_id
and et.task_id = :task_id
and content_revision__is_live(ese.evaluation_id) = true
select 1
from evaluation_student_evalsi ese, evaluation_tasks et
where ese.task_item_id = et.task_item_id
and et.task_id = :task_id
and ese.party_id = :party_id
and ese.grade = :grade
and ese.description = :comments
and content_revision__is_live(ese.evaluation_id) = true
select 1 from evaluation_student_evalsi ese, evaluation_tasks et
where ese.task_item_id = et.task_item_id
and et.task_id = :task_id
and ese.party_id = :party_id
and ese.grade = :grade
and ese.description is null
and content_revision__is_live(ese.evaluation_id) = true
select ese.evaluation_id
from evaluation_student_evals ese, evaluation_tasks et
where ese.task_item_id = et.task_item_id
and et.task_id = :task_id
and ese.party_id = :party_id
and content_revision__is_live(ese.evaluation_id) = true