postgresql7.1
select site_node__url(min(node_id))
from site_nodes
where object_id = :(select package_id
from cal_items ci
where cal_item_id = :cal_item_id
and ci.on_which_calendar = calendars.calendar_id)
select site_node__url(min(node_id))
from site_nodes
where object_id = (select package_id
from calendars
where calendar_id = :object_id)