oracle 8.1.6 select shipping_method, nvl(count(*),0) as shipping_method_count from ec_orders_shippable where shipping_method not in ('no_shipping', 'pickup') and shipping_method is not null group by shipping_method