TSQL Challenge 83 - Compare rows in the same table and group the data

The challenge is to compare the data of the rows and group the input data.
The data needs to be grouped based on the Product ID, Date, TotalLines, LinesOutOfService.
You need to check each row in the table to see if that particular product has the different
range of values for TotalLines and Linesoutofservice when compared to the rows below. If yes,
then insert that date where a different range is encountered into the "End Date" column.
If no change in the values are detected then insert a future date "01/12/2050".
In the TotalCustomerCalls column you place the sum of CustomerCalls for the given Start Date / End Date group.

"12 tools for simpler, faster database development
From taking the pain out of comparing and deploying database schemas to
helping you code SQL effortlessly, the tools in the SQL Developer Bundle cut the time spent in dull tasks. Sound good?
Learn more."

Restrictions

Notes

If you would like to use a Tally Table, you can use the script given here. Your solution should not include the script to create and populate the tally table. You can assume that the tally table will be available in the database where the evaluation team will run your Code.

Your solution can use features from all versions up to and including SQL Server 2012.

"12 tools for simpler, faster database development
From taking the pain out of comparing and deploying database schemas to
helping you code SQL effortlessly, the tools in the SQL Developer Bundle cut the time spent in dull tasks. Sound good?
Learn more."