---
title: "Discussion on \"SQL Server LAG Window Function\" | Hashnode"
description: "Discussion on \"SQL Server LAG Window Function\". The LAG function gives access to the data of the preceding rows or the row at a given offset that is preceding the current row in the same result set"
url: "https://hashnode.com/posts/sql-server-lag-window-function/6226245cecb2d35f765e6a69"
---

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

Discussion

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

The LAG function gives access to the data of the preceding rows or the row at a given offset that is preceding the current row in the same result set

Mar 2, 2022 · 6 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)
-   [#mysql](https://hashnode.com/tag/mysql)

## 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.
