select count (*) '商品数量',b.ord_id  from ord a ,ordgood b where a.ordgood_ordid=b.ord_id group by b.ord_id