How do you calculate month-over-month revenue growth?
You have an orders table containing the date and amount of each order. You need a single SQL query that returns monthly revenue and its percentage change from the previous month. How would you write it? What happens if a month has no sales or its revenue is zero?
ExplainWindow functionsMiddleAnalystData Engineer