Write SQL and Python, run instantly in your browser, and track your progress.
Product operations requests a view of fulfilled item volume. Provide the total delivered units for each product. Sort from the highest delivered quantity to the lowest; break ties by the smallest product identifier.
| Column Name | Type |
|---|---|
| order_item_id | INTEGER |
| order_id | INTEGER |
| product_id | INTEGER |
| quantity | INTEGER |
Product operations requests a view of fulfilled item volume. Provide the total delivered units for each product. Sort from the highest delivered quantity to the lowest; break ties by the smallest product identifier.
| Column Name | Type |
|---|---|
| order_item_id | INTEGER |
| order_id | INTEGER |
| product_id | INTEGER |
| quantity | INTEGER |
| unit_price | REAL |
| unit_price | REAL |
| line_subtotal | REAL |
| line_subtotal | REAL |
| tax_amount | REAL |
| tax_amount | REAL |
| discount_amount | REAL |
| discount_amount | REAL |
| fulfillment_status | TEXT |
| fulfillment_status | TEXT |
| return_requested_at | TEXT |
| return_requested_at | TEXT |
| return_reason | TEXT |
| return_reason | TEXT |
| order_item_id | order_id | product_id | quantity | unit_price | line_subtotal | tax_amount | discount_amount | fulfillment_status | return_requested_at | return_reason |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 10 | 1 |
| order_item_id | order_id | product_id | quantity | unit_price | line_subtotal | tax_amount | discount_amount | fulfillment_status | return_requested_at | return_reason |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 10 | 1 |
| product_id | units_delivered |
|---|---|
| 50 | 8 |
| 24 | 7 |
| 35 | 6 |
| 28 | 5 |
| 23 | 4 |
| product_id | units_delivered |
|---|---|
| 50 | 8 |
| 24 | 7 |
| 35 | 6 |
| 28 | 5 |
| 23 | 4 |
Showing first 5 of 30 rows. Product 50 has the most delivered units (8).
Showing first 5 of 30 rows. Product 50 has the most delivered units (8).
| 50.96 |
| 50.96 |
| 50.96 |
| 50.96 |
| 4.14 |
| 4.14 |
| 0.0 |
| 0.0 |
| shipped |
| shipped |
| 2 | 2 | 8 | 3 | 200.51 | 601.53 | 53.2 | 0.0 | delivered |
| 2 | 2 | 8 | 3 | 200.51 | 601.53 | 53.2 | 0.0 | delivered |
| 3 | 3 | 44 | 2 | 34.13 | 68.26 | 6.25 | 0.99 | shipped |
| 3 | 3 | 44 | 2 | 34.13 | 68.26 | 6.25 | 0.99 | shipped |
| 4 | 4 | 47 | 1 | 290.99 | 290.99 | 23.29 | 0.0 | shipped |
| 4 | 4 | 47 | 1 | 290.99 | 290.99 | 23.29 | 0.0 | shipped |
| 5 | 5 | 36 | 3 | 189.87 | 569.61 | 46.78 | 79.38 | backordered |
| 5 | 5 | 36 | 3 | 189.87 | 569.61 | 46.78 | 79.38 | backordered |