DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Subscription Ghost

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium
Seniority
L5

Problem

A billing-integrity team is chasing accidental recurring charges: a customer billed the same amount for the same product about a month after the last time, usually a duplicate subscription or a botched retry. Within each user and product pairing, compare every charge to the one immediately before it in time, and surface the charges that repeat the previous amount exactly and land 35 days or fewer after it.

Summary

Some charges come back to haunt the same card a month later.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • SQL Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons