Город МОСКОВСКИЙ
00:21:46

SQL Server - First Value and Last Value window function

Аватар
MySQL Мониторинг
Просмотры:
21
Дата загрузки:
08.12.2023 05:18
Длительность:
00:21:46
Категория:
Обучение

Описание

The FIRST_VALUE() function is a window function that returns the first value from specified column in an ordered partition of a result set.

The LAST_VALUE() function is a window function that returns the first value from specified column in an ordered partition of a result set.

Syntax:-

FIRST_VALUE ( scalar_expression )
OVER (
[PARTITION BY partition_expression, ... ]
ORDER BY sort_expression [ASC | DESC], ...
)


LAST_VALUE ( scalar_expression )
OVER (
[PARTITION BY partition_expression, ... ]
ORDER BY sort_expression [ASC | DESC], ...
)

#practialit #sqlservertutorial #sql #easysql

Рекомендуемые видео