Skip to main content

Monthly Sales Report

MediumPremium

You are given the following tables:

transactions table:

iduser_idcreated_atproduct_idquantity
integerintegerdatetimeintegerinteger

products table:

idnameprice
integerstringfloat

users table:

idnamesex
integerstringstring

Modify the previous query to report for multiple years. The answer should have the results by month-year. Your output should have the following columns: month_year, num_customers, num_orders, order_amt. Order the result in descending month_year