SQL practice: LEFT JOIN: Keep Everything On The Left
Chapter 13 · 11 questions · included in full access
Question 1 · easy
Solve it in your browserFind branches that have never had an order.
Question 2 · easy
Solve it in your browserList every customer with their order count, including the ones with zero.
Question 3 · medium
Solve it in your browserList every branch with how many employees it has, including any with none.
Question 4 · medium
Solve it in your browserFind products that have never been sold.
Question 5 · medium
Solve it in your browserList every product with the total quantity sold, showing 0 for the unsold ones.
Question 6 · medium
Solve it in your browserList every branch with its total revenue, showing 0 where there is none.
Question 7 · medium
Solve it in your browserList every employee and the number of orders they handled, including those who handled none.
Question 8 · medium
Solve it in your browserExplain why COUNT(*) gives the wrong answer in 13-2, and what it would show instead.
Question 9 · medium
Solve it in your browserList every customer with their count of Delivered orders only, still including customers with none. (Careful where you put the condition.)
Question 10 · hard
Solve it in your browserA report counting customers uses COUNT(*) after a LEFT JOIN to orders, and says every customer has at least one order. Why?
Question 11 · hard
Solve it in your browserList every customer with how many Delivered orders they have. Customers with none should show 0, but they vanish. Fix it.
These questions are part of full access.
The first chapters of every track are free. Full access is a one-time payment.
See pricing