Q&A for professional and enthusiast programmers
SELECT TOP 50 ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], Id AS [User Link], Reputation, (select sum(ViewCount) from Posts where OwnerUserId = Users.Id), (select count(Posts.Id) from Posts where OwnerUserId = Users.Id) FROM Users WHERE LOWER(Location) LIKE '%rostov%' ORDER BY Reputation DESC;