Building on the DATETIMEFROMPARTS, DATETIME2FROMPARTS offers similar functionality, but yields more precise DateTime2 data type, containing fractions of a second to a specified precision. Naturally, ...
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.