/* procedure name:NET_PopularProduct_SelectMaster* objective :Weekly Best Items top 5*/CREATE PROCEDURE NET_PopularProduct_SelectMaster as BEGIN select top 5 o.productid,sum(o.quantity) as total,p.modelname from orderdetails o,products p where o.productid=p.productid group by o.productid,p.modelname order by total desc END