PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates data manipulation and analytical SQL skills in the Data Manipulation (SQL/Python) domain, focusing on window functions for ranking and temporal comparison, joins, and aggregation when analyzing orders and driver requests.

  • Medium
  • DoorDash
  • Data Manipulation (SQL/Python)
  • Data Scientist

Analyze Driver Requests for Food Delivery Orders

Company: DoorDash

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

ORDER_TABLE order_id | restaurant_id | created_at | total_value 1 | 101 | 2024-06-01 12:01 | 45.50 2 | 102 | 2024-06-01 12:05 | 23.00 3 | 101 | 2024-06-01 12:10 | 30.00 ​ REQUEST_TABLE request_id | order_id | driver_id | offer_amount | request_time 1001 | 1 | 501 | 7.50 | 2024-06-01 12:01 1002 | 2 | 502 | 6.00 | 2024-06-01 12:05 1003 | 3 | 503 | 8.00 | 2024-06-01 12:10 ##### Scenario You have two tables—orders and driver requests—for a food-delivery marketplace. ##### Question Return every order that has at least one driver request. For each order, rank driver offers by amount and flag the highest. Count orders where the latest offer is higher than the previous one and compute the average improvement. Explain bounded vs. unbounded window frames, and show an example query using each. ##### Hints JOIN the tables, use ROW_NUMBER() or RANK() OVER (PARTITION BY order_id ORDER BY offer_amount DESC), apply LAG for deltas, and illustrate ROWS BETWEEN clauses.

Quick Answer: This question evaluates data manipulation and analytical SQL skills in the Data Manipulation (SQL/Python) domain, focusing on window functions for ranking and temporal comparison, joins, and aggregation when analyzing orders and driver requests.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Calculate Order Request Metrics - DoorDash (hard)
  • Analyze Restaurant Customer Metrics - DoorDash (medium)
  • Write SQL for monthly spend and ratios - DoorDash (medium)
  • Write SQL for late-delivery metrics by window - DoorDash (Medium)
  • Compute rolling cold-delivery rates with windows - DoorDash (Medium)