with MyData as ( select distinct LineCount ,CountLe = (select count(1) from #a b where b.LineCount <= a.LineCount) ,CountTotal = (select count(1) from #a) from #a a (nolock) ) select LineCount ,Percentile = CountLe * 100.0 / CountTotal from MyData order by LineCount
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.