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