Product Worth over $1000

ASKED IN INTERVIEW
2pts
Shopify

Problem Statement

Shopify Plus merchants often deal with luxury goods. To analyze premium inventory, find the products that have never been sold for a price strictly less than $1000.

A product must have been sold at least once to be included in the results.

Rules:

  • A product qualifies if its minimum sale price is $1000 or higher.
  • Output columns: product_id, product_name.
  • Results must be sorted by product_id in ascending order.
Tests your understanding of
Filtering, Aggregation and Subqueries

Input Tables

products
product_id(INTEGER)product_name(VARCHAR)
1MacBook Pro
2iPhone SE
3Hermes Bag
4Office Chair
sales
sale_id(INTEGER)product_id(INTEGER)price(DECIMAL)
10112000
10211800
1032400
10435000
10541200
1064950
categories
product_id(INTEGER)category_name(VARCHAR)
1Electronics
3Luxury

Expected Output

product_id(INTEGER)product_name(VARCHAR)
1MacBook Pro
3Hermes Bag

Tags

EasyASKED IN INTERVIEWFilteringAggregationSubqueries
10-15 min
65%

Hints