DevPath · Learn to code ESPTEN

Databases

🪆 Subqueries and CTEs

Nest queries to answer complex questions: scalar subqueries and subqueries in WHERE, correlated EXISTS and CTEs with WITH.

What you'll learn

Lessons

Scalar subqueries and subqueries in WHEREUse the result of one query inside another: compare against a computed value and with IN. EXISTS and correlated subqueriesSubqueries that reference the outer row and EXISTS to check existence. CTEs with WITHName a subquery with WITH to make the query readable and reusable.
Practice this module in the app

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →