Monthly revenue growth
For every calendar month that has completed sales, show the month's revenue and its growth compared with the previous calendar month.
monthis the first day of the month, as a date (for example2026-01-01)- revenue is the sum of
quantity * unit_priceover completed orders, usingorder_tsto decide the month growth_pct = 100 * (revenue - previous month revenue) / previous month revenue, rounded to 1 decimal place- if the previous calendar month had no completed sales (or this is the first month),
growth_pctis NULL. Careful, "previous calendar month" is not the same as "previous row".
output columns
monthrevenuegrowth_pctuses ,
ctrl + enter to run on the sample data · ctrl + shift + enter to submit
run your query to see the output here. Submit checks it against the sample data, hidden test cases, random data and a large dataset.