---
title: "Discussion on \"SQL Server LAST_VALUE Window Function\" | Hashnode"
description: "Discussion on \"SQL Server LAST_VALUE Window Function\". As the name suggests, Last_value returns the last value in an ordered result-set. It's the opposite of the First_value window function."
url: "https://hashnode.com/posts/sql-server-lastvalue-window-function/622b5bd7323e71ad27f751b7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SQL Server LAST\_VALUE Window Function](https://mssqlserver.dev/sql-server-lastvalue-window-function?utm_source=hashnode&utm_medium=feed)

As the name suggests, Last\_value returns the last value in an ordered result-set. It's the opposite of the First\_value window function.

Mar 3, 2022 · 8 min read · mssqlserver.dev  
Updated Feb 10, 2023  
Read the article

-   [#sql](https://hashnode.com/tag/sql)
-   [#sql-server](https://hashnode.com/tag/sql-server)
-   [#databases](https://hashnode.com/tag/databases)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#mssql](https://hashnode.com/tag/mssql)

## Written by

[kiran sabne](https://hashnode.com/@kiransabne)

@kiransabne

  
[View profile](https://hashnode.com/@kiransabne)

SQL Developer and Backend Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
