This is pretty damn close. The numbers don't add up though because you are using an arbitrary total amount of seats, when it has to be the initial count of...
This reply was modified 5 years, 3 months ago by RocksteadyDev.
T-SQL 2012 has a new built in function to give a running total, so you don't need a cursor for running totals that sum distinct counts. Previously sum and count...