Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLcorrelated subqueriesSingle-choice MCQ

In standard SQL (e.g. PostgreSQL), a correlated subquery is used as a scalar value in the SELECT list. For one outer row, the subquery happens to match two child rows. What occurs?

SELECT o.id, (SELECT s.region FROM stores s WHERE s.id = o.store_id) AS region FROM orders o;