Abstract
Along with accumulating window aggregates, Microsoft added eight new window functions with SQL Server 2012. Four of the functions, which I'll call offset functions in this book, are my favorite T-SQL functions, and they are LAG, LEAD, FIRST_VALUE, and LAST_VALUE. These functions let you include any columns from other rows in your results without a self-join and with fantastic performance.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Kathi Kellenberger with Clayton Groom
About this chapter
Cite this chapter
Kellenberger, K., Groom, C. (2015). Taking a Peek at Another Row. In: Expert T-SQL Window Functions in SQL Server. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1103-8_7
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1103-8_7
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1104-5
Online ISBN: 978-1-4842-1103-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books