Left join to find missing match

SQL Easy 2 views
Back to Questions

Problem Description

List all customers and their latest order_id if any. Customers without orders should still show.

Input Format

SQL query

Output Format

Result set

Sample Test Case

Input:
Customers, Orders
Output:
Customers with optional order

Constraints

Use left join and max

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next