Du angav inte hur du rankar de 10 bästa så jag antar att de högsta siffrorna rankas högre?
With TopItems As
(
SELECT C.CountryID AS CountryID
, C.CountryName AS Country
, Count(FirstName) AS Origin
, ROW_NUMBER() OVER( ORDER BY Count(FirstName) DESC ) As Num
FROM Users AS U
JOIN Country AS C
ON C.CountryID = U.CountryOfOrgin
GROUP BY C.CountryName, C.CountryID
)
Select CountryId, Country, Origin
From TopItems
Where Num <= 10
Union ALL
Select 0, 'Others', Sum(Origin)
From TopItems
Where Num > 10