oracle 8.1.6 select count(*) from dual where exists (select 1 from ec_products p, ec_items i where i.product_id = p.product_id and i.order_id = :order_id and no_shipping_avail_p = 't')