Select (SQL) - Window Function

Window Function

A window function in SQL:2003 is an aggregate function applied to a partition of the result set.

For example,

sum(population) OVER( PARTITION BY city )

calculates the sum of the populations of all rows having the same city value as the current row.

Partitions are specified using the OVER clause which modifies the aggregate. Syntax:

:: = OVER ( )

The OVER clause can partition and order the result set. Ordering is used for order-relative functions such as row_number.

Read more about this topic:  Select (SQL)

Famous quotes containing the words window and/or function:

    ‘Who is it that this dark night
    Underneath my window plaineth?’
    Sir Philip Sidney (1554–1586)

    For me being a poet is a job rather than an activity. I feel I have a function in society, neither more nor less meaningful than any other simple job. I feel it is part of my work to make poetry more accessible to people who have had their rights withdrawn from them.
    Jeni Couzyn (b. 1942)