Company: Quicksell_13nov
Difficulty: medium
Problem Description You have two tables at hand: orders and shipments . The orders table records what customers bought, while shipments logs which of those orders have gone out the door. A fulfilled order should have exactly one matching row in shipments . Write a SQL query that finds every customer with at least one order that hasn't shipped yet . For each such customer, return their name along with how many of their orders remain unshipped. Schema orders Table Column Name Type Description order_id INT Unique ID per order (Primary Key). customer VARCHAR Name of the customer. product VARCHAR Name of the product purchased. shipments Table Column Name Type Description order_id INT ID of the shipped order (Foreign Key to orders.order_id ). shipped_date DATE Date when the order was shipped. Required Output Your query should return a result set with the following columns in this exact order: customer (VARCHAR) - The name of the customer. unshipped_orders_count (INT) - The total number of un