TSQL: How to use LEAD() and LAG() functions in analytic data

Problems I have a data set that describe Sales data of all categories. Now I need to build a query to compare Sales of a given year with previous year for each category. For example, I have a data set of SALES Now, I need to build a report to analyze how much sales of previous year … Continue reading TSQL: How to use LEAD() and LAG() functions in analytic data

Advertisements