SQL Server 2008 menggunakan COUNT() OVER
select *, c = count(1) over (partition by zip)
from tbl
order by c desc;
Jika Anda tidak perlu melihat kolom tambahan, Anda dapat memindahkan COUNT() OVER
klausa ke dalam klausa ORDER BY.
select JobCode, Job1, Job2, Job3, zip
from tbl
order by count(1) over (partition by zip) desc;