What makes a subquery a correlated subquery?
Correct answer D. It refers to a column of the outer query, so it is evaluated for each outer row
A correlated subquery references a column from the enclosing query, for example WHERE o.cust_id = c.id, so its result depends on the current outer row and it is logically re-evaluated for each one. A non-correlated subquery is independent and can be run once. Returning a single value makes a subquery scalar, which is a separate property; a scalar subquery may or may not be correlated.
Answer checked How we write and check questions
Discussion