SQL practice: EXISTS and Correlated Subqueries
Chapter 17 · 9 questions · included in full access
Question 1 · easy
Solve it in your browserUse EXISTS to find customers who ordered at branch 1.
Question 2 · easy
Solve it in your browserUse NOT EXISTS to find products never sold.
Question 3 · medium
Solve it in your browserUse NOT EXISTS to find branches with no orders.
Question 4 · medium
Solve it in your browserFind employees earning above the average salary of their own branch.
Question 5 · medium
Solve it in your browserFind customers who have at least one Delivered order, using EXISTS.
Question 6 · medium
Solve it in your browserFind products that cost more than the average price within their own category.
Question 7 · medium
Solve it in your browserFind employees who have at least one person reporting to them.
Question 8 · hard
Solve it in your browserRewrite 17-2 using a LEFT JOIN instead, and confirm you get the same two products.
Question 9 · hard
Solve it in your browserList employees who don't manage anyone. It returns nothing, even though most employees manage no one. 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