Count total orders and total products for each customer – Mysql
I have 3 tables: customers (CustomerID) orders (OrderID, CustomerID) orders_products (OrderID, ProductID) I need to select each customer with their total orders and total number of products ordered by them. To count total orders by each customer, the query is:…