best selling products
I want to display the top 10 selling products.
Obviously products are in a products table, I have my orders table and ordersdetail table that holds products ordered, quantity etc.
Any ideas on where to start? I had thought along the lines of
SELECT *
FROM products, orderdetails
WHERE products.ProdID = orderdetails.DetailProductID
ORDER BY orderdetails.DetailQuantity
but no such joy there.
should there be a COUNT or SUM statement?