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:

    I sometimes have the sense that I live my life as a writer with my nose pressed against the wide, shiny plate glass window of the “mainstream” culture. The world seems full of straight, large-circulation, slick periodicals which wouldn’t think of reviewing my book and bookstores which will never order it.
    Jan Clausen (b. 1943)

    The function of the actor is to make the audience imagine for the moment that real things are happening to real people.
    George Bernard Shaw (1856–1950)