SQL practice: EXISTS and Correlated Subqueries

Chapter 17 · 9 questions · included in full access

  1. Question 1 · easy

    Use EXISTS to find customers who ordered at branch 1.

    Solve it in your browser
  2. Question 2 · easy

    Use NOT EXISTS to find products never sold.

    Solve it in your browser
  3. Question 3 · medium

    Use NOT EXISTS to find branches with no orders.

    Solve it in your browser
  4. Question 4 · medium

    Find employees earning above the average salary of their own branch.

    Solve it in your browser
  5. Question 5 · medium

    Find customers who have at least one Delivered order, using EXISTS.

    Solve it in your browser
  6. Question 6 · medium

    Find products that cost more than the average price within their own category.

    Solve it in your browser
  7. Question 7 · medium

    Find employees who have at least one person reporting to them.

    Solve it in your browser
  8. Question 8 · hard

    Rewrite 17-2 using a LEFT JOIN instead, and confirm you get the same two products.

    Solve it in your browser
  9. Question 9 · hard

    List employees who don't manage anyone. It returns nothing, even though most employees manage no one. Fix it.

    Solve it in your browser

These questions are part of full access.

The first chapters of every track are free. Full access is a one-time payment.

See pricing