hardWestern Digital · joinsPro
Total shipped, joined across three tables
Western Digital stores drives, the factories that make them, and shipment records in three separate tables. For each drive model, return its name, its factory's name, and the total quantity shipped so far.
Drives that haven't shipped yet should still appear, with a total of 0.
Return model, factory_name, and total_shipped.
Schema
▸factories
| id | INT |
| factory_name | TEXT |
| country | TEXT |
▸drives
| id | INT |
| model | TEXT |
| factory_id | INT |
▸shipments
| id | INT |
| drive_id | INT |
| quantity | INT |
Pro
The example input, expected output, and walkthrough for this question unlock with a Pro plan.
Pro
This is a Pro question
Premium practice questions unlock with a Pro plan. The full solution, expected output, and grading are available to Pro members.