# Scalar Subquery

*noun*

say it: **“SKAY-ler SUB-kweer-ee”** **/ˈskeɪlər ˈsʌbkwɪəri/**

A subquery that returns exactly one value, so it can be used wherever a single value fits.

## What is **Scalar Subquery** in a relational database?

**Scalar Subquery** — A subquery required to return one column and no more than one row.

```sql
SELECT order_id
FROM purchase_order
WHERE total_amount > (
    SELECT AVG(total_amount)
    FROM purchase_order
);
```

## In a sentence

- “A **scalar subquery** puts the overall average price in a column beside each product.”

Level: Apprentice · [More SQL terms at this level](https://www.ask-codey.com/glossary?category=sql&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/scalar-subquery
