select item_id as first_slide_item_id
from cr_items
where content_type = 'cr_wp_slide'
and parent_id = :pres_item_id
and exists (select 1 from cr_wp_slides s where s.slide_id=cr_items.live_revision and s.sort_key=1)
select p.pres_title, p.page_signature
from cr_wp_presentations p, cr_items i
where i.item_id = :pres_item_id
and i.live_revision = p.presentation_id
select first_names || ' ' || last_name as owner_name, person_id as owner_id
from persons, acs_objects
where persons.person_id = acs_objects.creation_user
and acs_objects.object_id = :pres_item_id
select s.slide_title, '$subsite_name/display/$pres_item_id/' || i.item_id || '.wimpy' as url
from cr_wp_slides s, cr_items i
where i.parent_id = :pres_item_id
and i.live_revision = s.slide_id
order by s.sort_key