Loading problem...
Your analytics team stores catalog metadata in Product and transaction events in Sales.
Table: product
Table: sales
Task:
Output requirements:
Supported submission environments:
product:
| product_id | product_name | unit_price |
|------------|--------------|------------|
| 1 | Atlas Phone | 1000 |
| 2 | Boreal Pad | 800 |
| 3 | Comet Watch | 1400 |
sales:
| seller_id | product_id | buyer_id | sale_date | quantity | price |
|-----------|------------|----------|-------------|----------|-------|
| 1 | 1 | 1 | 2019-01-21 | 2 | 2000 |
| 1 | 2 | 2 | 2019-02-17 | 1 | 800 |
| 2 | 2 | 3 | 2019-06-02 | 1 | 800 |
| 3 | 3 | 4 | 2019-05-13 | 2 | 2800 |[
{"product_id":1,"product_name":"Atlas Phone"}
]Product 1 has sales only within Q1 2019. Product 2 has a Q2 sale, and product 3 has only post-Q1 sales.
product:
| product_id | product_name | unit_price |
|------------|--------------|------------|
| 10 | North Hub | 350 |
| 11 | South Hub | 450 |
| 12 | East Hub | 500 |
sales:
| seller_id | product_id | buyer_id | sale_date | quantity | price |
|-----------|------------|----------|-------------|----------|-------|
| 7 | 10 | 101 | 2019-01-01 | 1 | 350 |
| 8 | 10 | 102 | 2019-03-31 | 1 | 350 |
| 8 | 11 | 103 | 2019-03-31 | 1 | 450 |
| 9 | 11 | 104 | 2018-12-31 | 1 | 450 |
| 9 | 12 | 105 | 2019-04-01 | 1 | 500 |[
{"product_id":10,"product_name":"North Hub"}
]Date boundaries are inclusive. Product 11 is disqualified by a pre-window sale, and product 12 is disqualified by an out-of-window April sale.
product:
| product_id | product_name | unit_price |
|------------|--------------|------------|
| 21 | Vertex Cam | 600 |
| 22 | Pulse Dock | 200 |
sales:
| seller_id | product_id | buyer_id | sale_date | quantity | price |
|-----------|------------|----------|-------------|----------|-------|
| 5 | 21 | 9 | 2019-04-15 | 1 | 600 |
| 6 | 22 | 10 | 2018-11-02 | 2 | 400 |[]No product is sold exclusively within Q1 2019.
Constraints