Loading...

Endpoint Ranking

A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
hard

Problem

The SRE team wants the slowest endpoints surfaced for a performance review. For each endpoint in api_calls, count its calls and compute its average latency, skipping rows where latency is NULL. Then rank endpoints by average latency, slowest first, with ties sharing a position. Return the endpoint, call count, average latency, and position.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.