DataDrivenDataDriven
LearnPracticeInterviewDiscussDailyJobs

Yesterday's Crown

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

Domain
SQL
Difficulty
hard
Seniority
L4

Problem

A cost dashboard shows, for each billing day, the top-spending service from the day before, where a service's spend on a day is the total of all its charges that day. Return the billing day alongside that prior-day service and its spending total.

Summary

Every dawn inherits the spending of the day before.

Practice This Problem

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

Related

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