select o.offer_nr, o.organization_id
from iv_offers o, cr_items oi
where oi.latest_revision = o.offer_id
and oi.item_id = :offer_id
select p.title as project_title, p.project_code, contact_id, cc_contact_ids, cc_emails
from pm_projectsx p, cr_items oi
where oi.latest_revision = p.project_id
and oi.item_id = :project_id
update cr_items
set publish_status = 'expired'
where item_id = :file_ids