select project_id
from logger_projects
where exists (select 1
from logger_project_pkg_map
where package_id = :package_id
and project_id = logger_projects.project_id)
and not exists (select 1
from logger_project_pkg_map
where package_id <> :package_id
and project_id = logger_projects.project_id)
select project_id
from logger_project_pkg_map
where package_id = :package_id