Designing a data model that supports the reporting and analytical functions is no different, initially, than any other modeling effort. Understanding the data is crucial. The data architect or modeler ...
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.