# LEAD

A window function returning a value from a later row in the window partition.

## What is **LEAD** in a relational database?

**LEAD** — A window function returning a value from a later row in the window partition.

```sql
SELECT ordered_on,
       LEAD(total_amount) OVER (ORDER BY ordered_on) AS next_total
FROM purchase_order;
```

Level: Journeyman · [More Database terms at this level](https://www.ask-codey.com/glossary/subjects/database/journeyman)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/lead
