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.
I'm sure Oracle's analytic functions can handle this, but I'm having a hard time wrapping my head around the syntax. If anyone has another solution, I'd be happy to hear it too.