Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how many orders has customer made database python

SELECT customers_firstname, customers_lastname,
COUNT(orders_id) AS Number
FROM customers LEFT JOIN orders AS o
USING (customers_id) GROUP BY (o.customers_id)
ORDER BY Number DESC LIMIT 5;
Source by www.daniweb.com #
 
PREVIOUS NEXT
Tagged: #orders #customer #database #python
ADD COMMENT
Topic
Name
2+2 =