Churned accounts and when

SQLMedium10 min

Your task

List the subscriptions that were cancelled. Return id and cancelled_on, earliest cancellation first.

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