Bird
0
0

What is a correlated subquery in SQL?

easy📝 Conceptual Q11 of 15
SQL - Subqueries
What is a correlated subquery in SQL?
AA subquery that runs independently of the outer query
BA subquery that uses values from the outer query to filter results
CA query that joins two tables without conditions
DA query that only returns aggregate values
Step-by-Step Solution
Solution:
  1. Step 1: Understand subquery types

    A correlated subquery depends on the outer query's current row to run.
  2. Step 2: Identify correlation

    It uses columns from the outer query inside the subquery's WHERE clause.
  3. Final Answer:

    A subquery that uses values from the outer query to filter results -> Option B
  4. Quick Check:

    Correlated subquery = uses outer query values [OK]
Quick Trick: Correlated subqueries reference outer query columns [OK]
Common Mistakes:
MISTAKES
  • Thinking subquery runs once independently
  • Confusing with JOIN operations
  • Assuming it returns only aggregates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes