DataDriven
LearnPracticeInterviewDiscussDailyJobs

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

Domain
SQL
Difficulty
medium

Problem

The CFO wants orders bucketed by profitability for the operating review. Label each order in orders as 'high' when profit exceeds 100, 'moderate' when profit is between 0 and 100 inclusive, and 'negative' when profit is below 0, then count orders per tier. Return the tier label and its order count.

Summary

High, moderate, or in the red. Every order gets a label.

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