Data Science & Analytics vocabulary · SQL and Querying

Window function

Meaning in data science & analytics, with examples

nounAdvanced term

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

  1. Use a window function with LAG to compare each month with the previous one.

  2. 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

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: