Question 9 of 10Pro Only
How would you write a SQL query to calculate month-over-month revenue growth percentage for each product category, including handling months with zero or no sales?
Sample answer preview
Calculating month-over-month revenue growth by product category requires combining aggregation, window functions, and careful NULL handling. This is a common BI requirement for trend analysis. The approach involves several logical steps.
LAGmonth-over-monthPARTITION BYCOALESCENULLIFdate grid