select package_id from apm_packages p, site_nodes n where p.package_key = :package_key and n.object_id = package_id