Practice Customers Who Never Order
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Tables: Customers(id INT, name VARCHAR); Orders(id INT, customerId INT). Customers.id and Orders.id are unique. Orders.customerId references Customers.id. Return the name of every customer without any order, under the output column Customers. Test absence by customer identity, retaining different customers even if they share a name. Output order is unrestricted.
Source: Customers Who Never Order on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Customers table: +----+-------+ | id | name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ Orders table: +----+------------+ | id | customerId | +----+------------+ | 1 | 3 | | 2 | 1 | +----+------------+
+-----------+ | Customers | +-----------+ | Henry | | Max | +-----------+
Related LeetCode Problems
Practice more problems similar to Customers Who Never Order.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.