select keyword_id
from cr_keywords
where heading = :heading and
parent_id = :main_keyword_id
select instance_name
from apm_packages
where package_id = :package_id
select keyword_id,
heading
from (select ck2.keyword_id,
ck2.heading,
tree_level(ck2.tree_sortkey) as tree_level
from cr_keywords ck1, cr_keywords ck2
where ck1.keyword_id = :keyword_id and
ck1.tree_sortkey between ck2.tree_sortkey and
tree_right(ck2.tree_sortkey)) k
where tree_level > 1
order by tree_level asc