PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates proficiency in data manipulation and analytical querying—aggregation, window functions, ranking and revenue attribution—alongside conceptual knowledge of normalization versus denormalization and ETL pipeline design.

  • Medium
  • Amazon
  • Data Manipulation (SQL/Python)
  • Data Scientist

Analyze Top 10 Items' Revenue Contribution by Category

Company: Amazon

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

sales +----------+------------+---------+---------+------------+ | order_id | category | item_id | revenue | order_date | +----------+------------+---------+---------+------------+ | 1001 | Books | B12 | 19.99 | 2023-07-01 | | 1002 | Books | B45 | 9.99 | 2023-07-02 | | 1003 | Toys | T88 | 29.99 | 2023-07-02 | | 1004 | Toys | T12 | 15.99 | 2023-07-03 | | 1005 | Electronics| E33 |199.99 | 2023-07-03 | +----------+------------+---------+---------+------------+ ##### Scenario SQL live-coding interview on product-sales dataset. ##### Question Write a SQL query to return the top 10 items by total revenue within each product category. For every category, compute the percentage of category revenue that those top-10 items contribute. Explain the difference between normalization and denormalization and give scenarios for each. Outline the key steps of an ETL pipeline you would build for this dataset. ##### Hints Think CTEs, ROW_NUMBER(), SUM() OVER, two-level aggregation.

Quick Answer: This question evaluates proficiency in data manipulation and analytical querying—aggregation, window functions, ranking and revenue attribution—alongside conceptual knowledge of normalization versus denormalization and ETL pipeline design.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Find recommended friend pairs by shared songs - Amazon (medium)
  • Find recommended friend pairs by shared listening - Amazon (easy)
  • Write SQL window functions for D7 retention - Amazon (medium)
  • Find daily first-order merchants with SQL - Amazon (Medium)
  • Design student–course data models and SQL - Amazon (Medium)