Millennium
Interview Question
Software Engineer Interview
Millennium
Given a product table [ProductId, Name] with records [1, Apple], [2, Orange], [3, Pear] and an order table [ProductId, Quantity] with records [1, 7], [2, 8], write the SQL query to produce [ProductId, Name, Quantity] where missing quantities are shown as 0. The output should be: [1, Apple, 7], [2, Orange, 8], [3, Pear, 0].
Unlock the Full Solution
Enter your email to get instant access to the complete solution, explanation, and similar practice problems.

