Window function
Meaning in data science & analytics, with examples
In data science & analytics, window function means: A SQL function that calculates a value across a set of rows related to the current row, such as a running total or a rank, without merging those rows into one.
In Turkish: pencere fonksiyonu, window function
How it is used
Written with OVER, often together with PARTITION BY and ORDER BY. Common examples are ROW_NUMBER, RANK, LAG, LEAD and moving averages. A favourite topic in SQL interviews for analyst jobs.
Example sentences
Use a window function with LAG to compare each month with the previous one.
I used a window function to rank products by sales within each category.
Common collocations
- running total
- PARTITION BY
- rank within a group
- moving average
Related terms
This word in other fields
The same English word can have a different meaning in another field:
More terms: SQL and Querying
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
