Marketplace Seller Analytics Path · Mission 9 of 25Medium

Marketplace revenue concentration

First window function — SUM() OVER () for percent-of-total. Practice computing each marketplace's share of total gross revenue using a window function instead of a subquery, and producing the concentration-of-revenue output the strategy team uses for diversification planning.

Back to Marketplace Seller Analytics

The Brief

Eleanor VossCFOmarketplace-ops

Strategy offsite next week. Pull all-time gross revenue and percent-of-total per marketplace. Three columns: marketplace_name, gross_revenue (rounded to 2 decimals), pct_of_total (rounded to 1 decimal). Use SUM(...) OVER () for the total denominator — cleaner than a scalar subquery. Sort gross_revenue descending, marketplace_name ascending. Concentration above 60% on any single marketplace is the strategic-risk question for diversification planning.

You'll practice

Window % of totalPARTITION BYCumulative share

Tables & columns available

fact_ordersfact7 columns
ColumnTypeKey
order_idINTPK
listing_idINTFK → dim_listings
marketplace_idINTFK → dim_marketplaces
order_tsTEXT
unitsINT
gross_amountREAL
refundedINT
dim_marketplacesdim4 columns
ColumnTypeKey
marketplace_idINTPK
marketplace_nameTEXT
marketplace_fee_pctREAL
fba_supportedINT

Hints (4)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

JOIN dim_marketplaces on marketplace_id.

Hint 2

ROUND(SUM(o.gross_amount), 2) AS gross_revenue per marketplace.

Hint 3

Window aggregate over no PARTITION (i.e. OVER ()) gives the grand-total denominator inline — pct_of_total = revenue / grand_total * 100.

Hint 4

GROUP BY marketplace_name and order DESC by revenue so the dominant platform leads.