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.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.