# Window Functions By the SQL specification, window functions (also know as analytical functions) are a kind of aggregation, but which does not "filter" the result set of a query. The aggregated data is mixed with the query result set. That sort of functions are used with the `OVER` clause. Window functions may appear only in the select list or the `ORDER BY` clause of a query. Additional to the `OVER` clause, Firebird window functions may use partitions, order and frames (FB 4.0). Syntax: ``` ::= ([ [, ...]]) OVER { | } ::= ([] [] [] []) ::= PARTITION BY [, ...] ::= ORDER BY [] [] [, [] []] ... ::= {RANGE | ROWS} ::= { | } ::= {UNBOUNDED PRECEDING | PRECEDING | CURRENT ROW} ::= BETWEEN {UNBOUNDED PRECEDING | PRECEDING | FOLLOWING | CURRENT ROW} AND {UNBOUNDED FOLLOWING | PRECEDING | FOLLOWING | CURRENT ROW} ::= {ASC | DESC} ::= NULLS {FIRST | LAST} ``` ``` ::= SELECT [] []