Skip to main content

Sales Report

MediumPremium

You are given the following tables:

transactions table:

iduser_idcreated_atproduct_idquantity
integerintegerdatetimeintegerinteger

products table:

idnameprice
integerstringfloat

users table:

idnamesex
integerstringstring

Write a query to report the number of users, number of transactions placed and total order amount per month in the year 2020. Your output should have the following columns: month_name, num_customers, num_orders, order_amt. Order the result in descending month.