Loading...

Regional Profits

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

Domain
SQL
Difficulty
easy

Problem

Headquarters is preparing the quarterly P&L deck and needs a regional breakdown. For every region that has order data, show the total profit and the number of orders. Some orders have missing region information and should be left out. Regions should appear from highest total profit to lowest.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.