SpinTheMic
Pro

Interview practice question

Active subscribers per day from start and end dates

Data Analyst · SQL for Analytics · Experienced

You have a subscriptions table with start and end dates. How do you count active subscribers on each day?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Date spine join where start <= day < end (or end NULL).
  • Or event approach: +1 at start, −1 at end, running sum.
  • Handle open-ended subscriptions.
  • Inclusive/exclusive end dates.
  • Efficient for long ranges.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics