About the “Surge Pricing Driver Eligibility” SQL Problem
Business Scenario
During peak hours, QuickRide activates a 2.5x surge pricing multiplier. Only active online drivers in premium vehicle classes ('XL' and 'Black') who maintain a rating of 4.85 or higher and have at least 100 completed trips qualify for priority dispatch.
Expected Output & Criteria
Online top-rated XL and Black tier drivers eligible for surge dispatch.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMThis challenge executes directly against the following relational schema in your browser:
CREATE TABLE driver_profiles (
driver_id INT PRIMARY KEY,
driver_name VARCHAR(80) NOT NULL,
vehicle_tier VARCHAR(20) NOT NULL,
rating NUMERIC(3, 2) NOT NULL,
lifetime_trips INT NOT NULL,
is_online BOOLEAN NOT NULL
);Target SQL Clauses & Operators
Want more Fundamentals practice?
Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.