Is there a sql code or way to generate a list of the top customers in our store? We basically want to find out which customers purchased the most products from our aspdotnetstorefront.
Thanks!
Is there a sql code or way to generate a list of the top customers in our store? We basically want to find out which customers purchased the most products from our aspdotnetstorefront.
Thanks!
Try this query:
..that should give you results like thisHTML Code:select c.Customerid, c.Firstname+' '+c.Lastname as Name,c.Email, (select count(*) from Orders_shoppingcart o where o.customerid=c.customerid) as NoOfProductsOrdered from Customer c order by NoOfProductsOrdered desc
HTML Code:CustomerID Name Email NoOfProductsOrdered =================================================== 58640 Customer A customera@test.com 4
purchased the most products by what criteria (qty, frequency, total price)?
AspDotNetStorefront
Shopping Cart