← All SQL interview questions

Rank support agents within their team

MediumWindow FunctionsEXLRSystemsSwiggy

A support operations lead publishes a leaderboard per team without losing the individual rows.

From agent_performance, return agent_name, team, tickets_closed and team_rank, where team_rank is the agent's position within their own team ordered by tickets_closed descending. Agents tied on volume must share the same rank, and the next rank should not be skipped.

Sample data

Practising alone only goes so far — our live cohorts pair SQL depth with dashboards, agentic analytics projects and mock interviews.

Explore the program