postgresql7.4 SELECT g.type_id, g.name, g.lower_bound, g.upper_bound FROM cc_uos_grade_type g WHERE g.package_id = :package_id [template::list::orderby_clause -orderby -name "grades"]