stratascratch
  • Interview Questions
    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs
    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log in
  • Interview Questions

    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs

    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log inSign up
Back to Mini Analyses
  1. Assignment
  2. Your Solution
  3. Solution
  4. Solutions from Users
  5. Discussion

Seller Return Rates

You must be logged in to download the datasets

Amazon: Compute each seller's return rate for the quarter and flag the sellers above the review threshold.

Assignment

The Marketplace Trust team reviews third-party sellers whose return rate is above 10% in a quarter. They have exported the orders, returns and seller list for the first quarter and asked for the return rate of each seller for orders placed in January through March, and the list of sellers to review.

Deliverables

  • The return rate of each seller for orders placed in the first quarter.
  • The sellers whose return rate is above 10%.
  • A short closing report of your findings for the Marketplace Trust team, including anything they should double-check before relying on the numbers.

Data Description

amazon_marketplace_orders.csv has one row per order:

  • order_id
  • seller_id
  • order_date
  • item_price

amazon_marketplace_returns.csv has one row per return record:

  • return_id
  • order_id - the order the return belongs to
  • return_date
  • source - the system that recorded the return: customer_app or warehouse_scan
  • refund_amount

amazon_marketplace_sellers.csv has one row per seller:

  • seller_id
  • seller_name
  • category

Practicalities

You can solve this in Python, SQL, or a mix of both — StrataScratch notebooks support both languages in the same notebook.

Assume this data comes directly from the order and returns systems and hasn't been cleaned, so review it carefully before relying on the numbers. When something looks off, work out what it is and decide how to handle it; when a definition or a final decision is genuinely ambiguous, choose a reasonable option and explain why. There's often more than one valid way to compute a result, so explain the approach you take and the reasoning behind your choices.

What's assessed: your results, and how clearly you explain what you see in the data and justify the choices you make.