18 Subqueries & CTEs questions from the SQL bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.a WITH-clause named temporary result set that improves readability and enables recursion
B.tests whether a subquery returns any rows, short-circuiting on the first match
C.a CTE that references itself to traverse hierarchies such as an org chart
D.a query nested inside another, used in SELECT, FROM, or WHERE
Answer + AI explanation with Pro
2. Which term means: "a query nested inside another, used in SELECT, FROM, or WHERE"?
Mid
A.Subquery
B.Recursive CTE
C.IN vs EXISTS
D.EXISTS
Answer + AI explanation with Pro
3. Which statement is correct?
Mid
A.Subquery — a subquery that references the outer query and is re-evaluated for each outer row
B.Subquery — tests whether a subquery returns any rows, short-circuiting on the first match
C.Subquery — a CTE that references itself to traverse hierarchies such as an org chart
D.Subquery — a query nested inside another, used in SELECT, FROM, or WHERE
Answer + AI explanation with Pro
4. What is Correlated subquery?
Senior
A.a CTE that references itself to traverse hierarchies such as an org chart
B.a WITH-clause named temporary result set that improves readability and enables recursion
C.tests whether a subquery returns any rows, short-circuiting on the first match
D.a subquery that references the outer query and is re-evaluated for each outer row
Answer + AI explanation with Pro
5. Which term means: "a subquery that references the outer query and is re-evaluated for each outer row"?
Senior
A.CTE
B.Correlated subquery
C.Recursive CTE
D.Subquery
Answer + AI explanation with Pro
6. Which statement is correct?
Senior
A.Correlated subquery — a query nested inside another, used in SELECT, FROM, or WHERE
B.Correlated subquery — a subquery that references the outer query and is re-evaluated for each outer row
C.Correlated subquery — a WITH-clause named temporary result set that improves readability and enables recursion
D.Correlated subquery — tests whether a subquery returns any rows, short-circuiting on the first match
Answer + AI explanation with Pro
7. What is CTE?
Mid
A.a query nested inside another, used in SELECT, FROM, or WHERE
B.a WITH-clause named temporary result set that improves readability and enables recursion
C.a subquery that references the outer query and is re-evaluated for each outer row
D.IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
Answer + AI explanation with Pro
8. Which term means: "a WITH-clause named temporary result set that improves readability and enables recursion"?
Mid
A.Correlated subquery
B.Subquery
C.CTE
D.EXISTS
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.CTE — tests whether a subquery returns any rows, short-circuiting on the first match
B.CTE — IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
C.CTE — a WITH-clause named temporary result set that improves readability and enables recursion
D.CTE — a subquery that references the outer query and is re-evaluated for each outer row
Answer + AI explanation with Pro
10. What is Recursive CTE?
Senior
A.a subquery that references the outer query and is re-evaluated for each outer row
B.a WITH-clause named temporary result set that improves readability and enables recursion
C.IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
D.a CTE that references itself to traverse hierarchies such as an org chart
Answer + AI explanation with Pro
11. Which term means: "a CTE that references itself to traverse hierarchies such as an org chart"?
Senior
A.CTE
B.Recursive CTE
C.Correlated subquery
D.IN vs EXISTS
Answer + AI explanation with Pro
12. Which statement is correct?
Senior
A.Recursive CTE — a subquery that references the outer query and is re-evaluated for each outer row
B.Recursive CTE — a CTE that references itself to traverse hierarchies such as an org chart
C.Recursive CTE — a query nested inside another, used in SELECT, FROM, or WHERE
D.Recursive CTE — a WITH-clause named temporary result set that improves readability and enables recursion
Answer + AI explanation with Pro
13. What is EXISTS?
Mid
A.IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
B.a WITH-clause named temporary result set that improves readability and enables recursion
C.tests whether a subquery returns any rows, short-circuiting on the first match
D.a subquery that references the outer query and is re-evaluated for each outer row
Answer + AI explanation with Pro
14. Which term means: "tests whether a subquery returns any rows, short-circuiting on the first match"?
Mid
A.CTE
B.Recursive CTE
C.IN vs EXISTS
D.EXISTS
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.EXISTS — tests whether a subquery returns any rows, short-circuiting on the first match
B.EXISTS — a query nested inside another, used in SELECT, FROM, or WHERE
C.EXISTS — IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
D.EXISTS — a WITH-clause named temporary result set that improves readability and enables recursion
Answer + AI explanation with Pro
16. What is IN vs EXISTS?
Senior
A.tests whether a subquery returns any rows, short-circuiting on the first match
B.a subquery that references the outer query and is re-evaluated for each outer row
C.IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
D.a WITH-clause named temporary result set that improves readability and enables recursion
Answer + AI explanation with Pro
17. Which term means: "IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries"?
Senior
A.CTE
B.EXISTS
C.Recursive CTE
D.IN vs EXISTS
Answer + AI explanation with Pro
18. Which statement is correct?
Senior
A.IN vs EXISTS — a subquery that references the outer query and is re-evaluated for each outer row
B.IN vs EXISTS — IN compares against a value list; EXISTS checks row existence and is often faster for large subqueries
C.IN vs EXISTS — tests whether a subquery returns any rows, short-circuiting on the first match
D.IN vs EXISTS — a WITH-clause named temporary result set that improves readability and enables recursion
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Subqueries & CTEs question come with Pro.