users

0

Please login or register to vote for this query.

(click on this box to dismiss)

SharePoint

Q&A for SharePoint enthusiasts

SELECT 
    location,
    user_count,
    RANK() OVER (ORDER BY user_count DESC) AS rank
FROM (
    SELECT 
        location,
        COUNT(*) AS user_count
    FROM 
        users
    GROUP BY 
        location
) AS subquery
ORDER BY 
    rank;

Enter Parameters

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