DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Heaviest Carts

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

Domain
SQL
Difficulty
medium
Seniority
mid

Problem

The growth team is segmenting customers by age cohort and wants to know who the biggest spenders are inside each bucket. For every age bucket, return the customer id alongside their total spend for the three customers who spent the most, from the biggest spender down.

Summary

Inside every age group, a few customers carry the basket. Find them.

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