About 170,000 results
Open links in new tab
  1. SQL LAG() Function Explained By Practical Examples - SQL Tutorial

    SQL LAG() is a window function that provides access to a row at a specified physical offset which comes before the current row. In other words, by using the LAG() function, from the current …

  2. SQL LAG() Function - GeeksforGeeks

    May 15, 2025 · What is the SQL LAG () Function? The SQL LAG () function is a window function that allows us to retrieve the value of a column from a previous row in the result set. Unlike …

  3. LAG (Transact-SQL) - SQL Server | Microsoft Learn

    Dec 23, 2024 · LAG provides access to a row at a given physical offset that comes before the current row. Use this analytic function in a SELECT statement to compare values in the …

  4. SQL Lag function overview and examples - SQL Shack

    Oct 15, 2019 · This article gives an overview of the SQL Lag function and its comparison with the SQL Lead function. We use a Lag () function to access previous rows data as per defined …

  5. Understanding the LAG() Function in SQL: A Complete Guide

    Jul 5, 2024 · The Short Answer: What is the LAG () Function? The LAG() function is one of SQL’s window functions that allows you to create a new column that accesses a previous row from …

  6. The LAG Function and the LEAD Function in SQL

    Jul 17, 2020 · LAG () takes three arguments: the name of the column or an expression from which the value is obtained, the number of rows to skip (offset) above, and the default value to be …

  7. MySQL LAG Function - MySQL Tutorial

    The LAG() function is a window function that allows you to access data from a previous row in a result set from the current row without using a self-join. Here’s the basic syntax of the LAG() …

  8. LAG - SQL Tutorial

    Overall, the SQL LAG () function is a powerful tool for analyzing data within a result set. Whether you’re working with time-series data or just need to access data from previous rows, the LAG …

  9. SQL Server: LAG Function - TechOnTheNet

    In SQL Server (Transact-SQL), the LAG function is an analytic function that lets you query more than one row in a table at a time without having to join the table to itself. It returns values from …

  10. How to Use SQL LAG Function - interviewquery.com

    Jan 17, 2025 · The LAG function in SQL is a window function that allows you to access data from a previous row in your result set without using self-joins. It’s particularly useful for comparing …

  11. Some results have been removed
Refresh