postgresql7.4 select eg.grade_plural_name, eg.grade_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id order by grade_plural_name desc select person__name(:student_id) as student_name, p.email from parties p where p.party_id = :student_id select evaluation__class_total_grade(:student_id,:package_id)