2015-11-04 63 views

回答

4

在SQL Server 2012+,你可以只使用一個累計總和:

select level, count, sum(count) over (order by level desc) as cumecount 
from t; 
相關問題