Independent Company Challenges

Uber-style SQL challenges

Independent Uber-style mobility marketplace SQL practice covering trips, drivers, riders, pricing, payments, and promotions.

These independent exercises use Uber-relevant business domains; they are not claimed to be questions used by Uber, and this site is not affiliated with the company.

Exercises
19
Difficulty
Beginner to Hard

What this collection tests

Skills and query patterns

Mobility marketplace operations, driver and rider analytics, trip economics, payments, and growth

Curated exercises

Choose a challenge

Work in the live editor where supported. Advanced guided labs state their engine boundary before you open the workspace.

  1. Challenge 1Beginner

    Active Drivers by City

    Which drivers are currently active, which city are they in, and what vehicle type do they drive?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  2. Challenge 2Beginner

    Completed Trips Count

    How many completed trips has each rider taken?

    • Joins
    • Aggregation
    • HAVING

    SQLite live

    Open challenge
  3. Challenge 3Beginner

    High-Rated Drivers

    Which drivers have a rating of 4.5 or above, and how many trips have they completed?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  4. Challenge 4Easy

    Latest Trip for Each Rider

    What is each rider's most recent trip — when, from where, and how much did it cost?

    • Window functions
    • Joins
    • Subqueries

    SQLite live

    Open challenge
  5. Challenge 5Easy

    Trips in Surge Pricing

    Which completed trips had surge pricing applied, and what were the surge multiplier and fare?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  6. Challenge 6Easy

    Total Fare by City

    What is the total fare revenue collected in each city for completed trips?

    • Joins
    • Aggregation
    • Filtering

    SQLite live

    Open challenge
  7. Challenge 7Medium

    Driver Performance by City

    For each city, what are the driver count, average rating, total trips, and total earnings?

    • Joins
    • Subqueries
    • Aggregation

    SQLite live

    Open challenge
  8. Challenge 8Medium

    Percentage of Drivers by Vehicle Type

    What percentage of active drivers does each vehicle type represent?

    • Joins
    • Subqueries
    • Aggregation

    SQLite live

    Open challenge
  9. Challenge 9Medium

    Peak Hour Analysis

    How many trips are completed each hour of the day, and what is the average fare for each hour?

    • Aggregation
    • Date analysis
    • Numeric functions

    SQLite live

    Open challenge
  10. Challenge 10Hard

    Rider Retention Analysis

    For riders who have taken at least 2 trips, what is the average number of days between consecutive trips?

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  11. Challenge 11Medium

    Promotion Effectiveness Analysis

    For each promotion that has been used at least once, what was the total discount given and average discount per use?

    • Joins
    • Aggregation
    • Numeric functions

    SQLite live

    Open challenge
  12. Challenge 12Beginner

    Vehicle Fleet Overview

    What vehicles are registered on the mobility marketplace — make, model, year, colour, type, and status?

    • Sorting

    SQLite live

    Open challenge
  13. Challenge 13Beginner

    Active Rider Directory

    Show all registered riders with their email, city, and lifetime trip count.

    • Joins
    • Sorting

    SQLite live

    Open challenge
  14. Challenge 14Easy

    Trips Without Ratings

    Which completed trips have no rating record at all?

    • Joins
    • NULL handling
    • Filtering

    SQLite live

    Open challenge
  15. Challenge 15Easy

    Cash Payment Trips

    Which completed trips were paid in cash, and who were the rider and driver?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  16. Challenge 16Medium

    Driver Earnings Summary

    For each driver, what are their total gross earnings, net earnings after commission, and tips received?

    • Joins
    • Aggregation
    • Numeric functions

    SQLite live

    Open challenge
  17. Challenge 17Medium

    Promotion Utilisation Rate

    For each active promotion, what percentage of its maximum allowed uses has already been consumed?

    • Numeric functions
    • NULL handling
    • Filtering

    SQLite live

    Open challenge
  18. Challenge 18Hard

    Top-Earning Driver per City

    In each city, which driver has earned the most in net pay, and how much have they earned?

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  19. Challenge 19Hard

    Trip Distance Segmentation

    For completed trips, what are the count, average fare, and total fare in each distance tier?

    • Aggregation
    • CASE expressions
    • Numeric functions

    SQLite live

    Open challenge
01

Attempt

Write a query or design from the brief before opening any hints.

02

Validate

Run it against the included dataset and inspect the output.

03

Explain

Compare the verified answer and explain each choice aloud.

Learn before practicing Uber

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Interview Practice

Return to the complete interview preparation experience.