TOP USER BY TAG IN SPECIFIC COUNTRY

0

Please login or register to vote for this query.

(click on this box to dismiss)

Japanese Language

Q&A for students, teachers, and linguists wanting to discuss the finer points of the Japanese language

SELECT
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], 
    u.Id AS [User Link], 
    u.Reputation,
    COUNT(p.id)
FROM
    Users u
INNER JOIN posts p ON p.ownerUserid = u.id
INNER JOIN posttags pt ON pt.postid = p.id
INNER JOIN tags t ON t.id = pt.tagid
WHERE
    LOWER(Location) LIKE LOWER('%##countryname##%')
    AND t.tagname='##tagname##'
GROUP BY u.reputation, u.id
ORDER BY
    Reputation ASC;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results