DataDriven
LearnPracticeInterviewDiscussDailyJobs

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

Domain
SQL
Difficulty
hard
Seniority
L4

Problem

The merchandising team needs a monthly leaderboard of top-grossing products. Revenue is calculated as quantity times the product's listed price. Exclude any transaction where total_amount is negative, as those represent refunds. If two products tie in a given month, include both. Return the month, product name, and total revenue.

Summary

Every month has a winner.

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