PrepZone Logo
PrepZone
Back to Database

Database · Hard

Compute month-over-month revenue growth percentage.

DatabaseSQL QueriesStaffWindow Functions

Answer preview

Aggregate revenue per month, fetch the previous month with LAG(), and guard the division with NULLIF(prev, 0) so a zero-revenue month cannot raise a divide-by-zero error.…