Top partners per city

SQL

Top partners per city

Swiggy SQL Interview Question
mediumPremium

About this question

A medium SQL question from Swiggy data analyst and business analyst interviews about the two highest-earning restaurants in each city. It tests top N per group, ranking with ROW_NUMBER and window functions.

The full question, its data and the solution are part of Premium, along with every other question in the library.

  • The full question and its datasets
  • The editor with instant grading
  • A worked solution and common mistakes