Search ⌘K
Etsy
Etsy

Analytics Reporting Track · Hard · 35 min

Revenue Rank Within Category

Merchandising wants the top products by revenue inside each category. Return the top two products per category with category, product_name, total_revenue, an...

Analytics Reporting Track
Hard
35 min
query basics
aggregation
joins

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

Objective

Practice query basics through a Etsy-tagged business scenario.

Approach

Use this track to train on SQL that mirrors day-to-day analytics workflows and recurring reporting asks.

Company context

Company labels are directional practice context, not official interview guidance.

Prereq: query basics
Prereq: filtering
Prereq: aggregation
Prereq: date functions

Merchandising wants the top products by revenue inside each category. Return the top two products per category with category, product_name, total_revenue, and revenue_rank. Sort by category, revenue_rank, then product_name.

products
product_id INT
category VARCHAR(30
product_idcategory
1HomeOak Tray
2HomeLinen Runner
3JewelrySilver Ring
4JewelryPearl Necklace
5JewelryCharm Bracelet
order_lines
line_id INT
product_id INT
line_revenue NUMERIC(10
2
line_idproduct_idline_revenue2
1011120.00
102180.00
1032150.00
104390.00
105360.00
1064200.00
1075110.00
Editor
SQL workspace

Run queries against the protected question data, then submit once the result shape looks right.

Sign in to run SQL

Create a free account or sign in before running queries against protected question data.