select prod_name,quant_sold from (select prod_id,sum(quantity) quant_sold from OrderItems group by prod_id) a,Products b where a.prod_id=b.prod_id ;