AI engineering glossary · SQL databases
What is window function?
Window function (also called Analytic function): A function that computes a value for each row using a set of related rows, its window, without collapsing rows the way GROUP BY does. Examples are ranking, running totals and previous-row lookups, written with OVER.
Window function: an example
SUM(amount) OVER (PARTITION BY city) shows each order beside its city's total.
Related terms
More SQL databases terms
Where you learn it
Window function is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.