This is not easy - or at least, not easy to do if you don't want to group and count everything twice!
Assuming you have two tables (which would be the sensible way to do it)
Users : Id, Name, OtherInfo
Queries : Id, UserId, OtherInfoAboutTheQuery
Then you can do it using a CTE and a couple of joins:
WITH AggData (UserId, UserCount)
AS (SELECT UserId, COUNT(UserId) as UserCount FROM Queries GROUP BY UserId)
SELECT UserID, name FROM Users u
JOIN AggData ag ON u.Id = ag.UserID
JOIN (SELECT MAX(UserCount) As MaxCount From AggData) mx ON mx.MaxCount = ag.UserCount