---
title: "Window Function — Database Glossary | Xata"
description: "A function that performs a calculation across a set of rows related to the current row without collapsing them into a single output row. Examples: ROW_N..."
source: "https://xata.io/glossary/window-function"
---

# Window Function

SQL

A function that performs a calculation across a set of rows related to the current row without collapsing them into a single output row. Examples: ROW_NUMBER(), RANK(), LAG(), LEAD(), SUM() OVER(). Defined with the OVER() clause.

Related terms

[Aggregate Function](/glossary/aggregate-function)

[← Back to glossary](/glossary)
