Vid 14 – LAG() SQL Server. How to compare Current Period to a Previous Period. #shorts



Vid 14 – LAG() SQL Server. How to compare Current Period to a Previous Period. #shorts

Vid 14 - LAG() SQL Server.  How to compare Current Period to a Previous Period. #shorts

The purpose of using the LAG() function is to compare the number of deaths in the current year with the number of deaths in the previous year. It helps identify trends, changes, or variations in the number of deaths from Alzheimer’s disease over time.

“lag” refers to a shift or delay in the time axis of a signal or a sequence of values. It is commonly used to analyze the relationship between past and future values in a time series.

GITHUB
/softwareNuggets/SQL_Server_Shorts/vid_14_lag()_sql_server.sql