← Problems5. Top N products per categoryEasySQL
00:00 / 20:00

Top N products per category

Easy·Acceptance ·Asked at Microsoft

Return the three highest-revenue products in each category. Break ties on product_id ascending.

Topics

aggregation

Similar problems

Community-reported interview topic. Not an official company question and no affiliation is implied.

solution.sql
Loading editor…
Draft not saved yet · Spaces 4 · UTF-8 · ⌘↵ run, ⌘⇧↵ submit
Nothing run yet

Run against the public tests, or submit to score against all of them.