postgresql7.1 select acs_object_id_seq.nextval as ticket_id, (select count(*) from ttl_va_areas where context_id = :package_id) as num_areas