SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Second Highest Delivery Fee

Unsolved

DoorDash pricing analysts want to know the second-highest distinct delivery fee ever charged. Fees can repeat, so the top fee appearing twice does not make it the second highest as well. Write an SQL query that returns a single row with a single column `second_highest_fee`. If there is no second distinct fee, the value must be NULL.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 DoorDash🏢 Amazon🏢 Uber

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM delivery_orders
Full source dataset
8 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine