a

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

WITH UserPostCounts AS (
    SELECT users.displayname, COUNT(posts.owneruserid) AS post_count
    FROM users
    JOIN posts ON posts.owneruserid = users.id
    WHERE users.location = 'Russia'
    GROUP BY users.displayname
    HAVING COUNT(posts.owneruserid) > SOME(
        SELECT COUNT(posts.owneruserid)
        FROM users
        JOIN posts ON posts.owneruserid = users.id
        WHERE users.location = 'Poland'
        GROUP BY users.displayname
    )
)
SELECT TOP 5 displayname, post_count
FROM UserPostCounts
ORDER BY post_count DESC;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results