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:

    The minister’s wife looked out of the window at that moment, and seeing a man who was not sure that the Pope was Antichrist, emptied over his head a pot full of..., which shows to what lengths ladies are driven by religious zeal.
    Voltaire [François Marie Arouet] (1694–1778)

    Think of the tools in a tool-box: there is a hammer, pliers, a saw, a screwdriver, a rule, a glue-pot, nails and screws.—The function of words are as diverse as the functions of these objects.
    Ludwig Wittgenstein (1889–1951)