SpinTheMic
Pro

Interview practice question

Each product's share of category revenue

Data Analyst · SQL for Analytics · Intermediate

How do you show each product's revenue along with its percentage share of its category's revenue?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Aggregate revenue per product.
  • SUM(revenue) OVER (PARTITION BY category).
  • Share = product revenue / category total.
  • Keep row detail.
  • Cast to decimal.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics