subspørringer
Subspørringer are queries nested inside another SQL query. The inner query provides values or a result set that the outer query uses to complete its operation. They can appear in the SELECT clause as scalar values, in the FROM clause as derived tables, or in the WHERE clause to filter rows.
They serve several purposes, such as filtering by a value produced by another query, computing a value
Two common forms are scalar and EXISTS subspørringer. A scalar subspørring returns a single value, for example:
Subspørringer can also be used with IN, ANY, or ALL to compare against multiple values. In practice,