S&M NuTec, the company that produces Greenies, furnished us a copy of the complete statement they sent to KIRO-TV, which touches on some of the cases discussed: Our Commitment to Healthy Pets Our company was founded and is staffed by people who are deeply passionate about pets and their welfare.
This SQL Server tutorial explains how to use the LEAD function in SQL Server (Transact-SQL) with syntax and examples. In SQL Server (Transact-SQL), the LEAD function is an analytic function that lets you query more than one row in a table at a time without having to join the table to itself.
SQL Server has had only a partial implementation up to now, but it is coming in SQL 2012. One of the most important benefits of window functions is that we can access the detail of the rows from an aggregation. Here we can see a sample of the partitions of rows, or sets that the SUM aggregation function is working on.