TASK #131 · Medium · FacebookNumber of orders by each registered customer
Your brief
Given a database with information about purchases and registered customers.
The purchases table stores purchase information,
the registered_customers table stores registered customer information.
Write a query to identify the number of orders placed by each registered customer. Display the customer ID and the total number of orders placed by each customer.
Write a query to identify the number of orders placed by each registered customer. Display the customer ID and the total number of orders placed by each customer.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
purchasespurchase_id, date, amount, product_id, customer_idregistered_customerscustomer_id, customer_name, join_date, state, country