I have a sql table with the names and orders of customers that they place over time.
table column names: id, customer name, order value, status, as well as created and changed.
I can group customer names and the number of orders.
using sql query like this.
SELECT Customer,count(OrderPrice) FROM Orders GROUP BY Customer
It works great. But I want the result to be ordered by the number of orders (quantity). A customer with a large number of orders is at the top of the list.
I appreciate any help.
Thank.
source
share