Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikaremi/sql_window_functions

Using window functions in SQL server
https://github.com/mikaremi/sql_window_functions

Last synced: about 1 month ago
JSON representation

Using window functions in SQL server

Awesome Lists containing this project

README

        

# SQL_WINDOW_FUNCTIONS
Using window functions in SQL server

Window functions operate on a set of rows and return a single aggregated value for each row. The term Window describes the set of rows in the database on which the function will operate. We define the Window (set of rows on which functions operates) using an OVER() clause.

## Types of window functions.
* Aggregate Window Functions
(SUM(), MAX(), MIN(), AVG(). COUNT())
* Ranking Window Functions
(RANK(), DENSE_RANK(), ROW_NUMBER(), NTILE())
* Value Window Functions
(LAG(), LEAD(), FIRST_VALUE(), LAST_VALUE())