Back to problems

Compute monthly new subscribers and YoY deltas

SQL · Intuit · Medium

Using the accounts table described below, write a single SQL query that returns, for each month from June 2019 onward, the number of new subscribers in that month together with a year-over-year comparison against the same month one year earlier. A company counts as a new subscriber in a given month if its subscription_date is not null and that date is the earliest subscription_date for that account_id and falls within the month. You may assume there is one row per…

Checking your access…