A client needs a sales report by country state/province. There is an orders table that stores the customer’s country and state/province, and there is an orders_products table that stores the order to product association and the product’s price.
The client wants the following statistics per country & state/province: total sales, % sales, avg order value.
I hope I have provided enough information. If you need anything else, please let me know.
Thanks!
== Assumed Tables ==
orders (id, country_id, state_id)
orders_products (id, order_id, product_id, price)
== Queries ==
Total sales:
Average Sale Amount:
The % of total sales per state/country: