Monthly revenue from live subscriptions

SQLEasy8 min

Your task

Sum the MRR of subscriptions that have not been cancelled. Return one row with live_mrr_cents.

Tables

account
idINTEGERnameTEXTtierTEXT
1Northwindteam
2Acmesolo
3Globexteam
4Initechsolo
subscription
idINTEGERaccount_idINTEGERstarted_onTEXTcancelled_onTEXTmrr_centsINTEGER
112025-06-01NULL49000
222025-08-152026-01-319000
332025-09-01NULL49000
442026-01-052026-02-209000
522026-02-01NULL19000