postgresql
7.3
SELECT
t.name as cat_name,
t.category_id as cat_id,
tm.tree_id,
tt.name as tree_name
FROM
category_tree_map tm,
categories c,
category_translations t,
category_tree_translations tt
WHERE
c.tree_id = tm.tree_id and
c.category_id = t.category_id and
tm.object_id = :package_id and
tm.tree_id = tt.tree_id and
c.deprecated_p = 'f'
ORDER BY
tt.name,
t.name
SELECT DISTINCT
p.first_names || ' ' || p.last_name as name,
p.person_id
FROM
persons p,
acs_object_party_privilege_map ppm
WHERE
ppm.object_id = :package_id
and ppm.privilege = 'read'
and ppm.party_id = p.person_id
ORDER BY name
select pm_project__get_root_folder (:package_id, 'f')