Produce a T-SQL script to create an identical set of results as per attached Excel file attached.
Potential use of Cursors and DECLARE statements to hold values of rows in memory. Performance is important, so code needs to be the most elegant it can be.
A script to create SQL table is attached
MS SQL Server (2005- 2008R2) as main target here.