Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions

Window functions are a special construct in the SQL language that allow you to easily calculate more complex requirements, such as year-to-date calculations, moving averages, percentiles and so on. This type of queries are very common in data warehouse scenarios. This book is an excellent introduction and will make everyone an expert in window functions.