DataDriven
LearnPracticeInterviewDiscussDailyJobs

Consistent High-Quantity Revenue

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

Domain
SQL
Difficulty
medium
Seniority
L4

Problem

Compute total transaction revenue for each user and product pair, but only for pairs where every single transaction had a quantity of at least 2. If any transaction for that pair falls below 2, exclude the entire pair. Show user, product, and total revenue, listed by user ascending and revenue descending.

Summary

Big orders, consistent revenue. A rare combination.

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