I want to design a query to compute some returns for stock data and in searching the 'SQL Server Books Online' I find a very small and not so helpful at all help section on the lead and lag functions.
-- You're tasked to analyse weekly website traffic data and want to identify weeks with a significant increase or decrease in traffic compared to the previous week for each page.write a query that ...