select live_revision
from cr_items, attachments
where cr_items.item_id = attachments.item_id
and attachments.object_id = :object_id
and attachments.item_id = :attachment_id
select live_revision
from cr_items ci,
attachments at
where ci.live_revision = at.item_id
and at.item_id = :attachment_id
and at.object_id = :object_id;