
SQL Window Functions SQL window functions operate over a set of rows related to the current row within the result set. - Aggregate functions, return a single value for a group of rows, - Window functions return a single value for each row from the underlying query, based on the related set of rows. Lets say is a employees salaries table. - Simple SQL can return listing of employees ordered by salaries - Using Aggregate like Sum can show total money paid as salary to all employess. - Adding group by to it can show salary total by department. - Using window functions can show number next to each employees showing his rank. SQL window functions are also called OLAP (Online Analytical Processing) functions. Window functions are a subset of SQL functions that operate over a set (or "window") of rows related to the current row within the result set. Unlike aggregate functions, which return a single value for a group of rows, window functions return a single ...