Recently active users whose name contains special characters or who come from China

0

Please login or register to vote for this query.

(click on this box to dismiss)

List of China-based users by reputation score. Query, naturally, by a Chinese user.

Music Fans Meta

Q&A about the site for music historians, critics, and fans

-- top users: China
-- List of China-based users by reputation score. Query, naturally, by a Chinese user.
WITH CTE
  AS (
  SELECT
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#],
    Id,
    LastAccessDate,
    Reputation,
    Location,
    Views,
    CASE
      WHEN(CAST(DisplayName AS VARCHAR(MAX)) COLLATE SQL_Latin1_General_Cp1251_CS_AS) = DisplayName
        THEN 0
        ELSE 1
      END HasSpecialChars
FROM Users)

SELECT
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#],
    Id AS [User Link],
    LastAccessDate,
    Reputation,
    Location,
    Views
FROM
    CTE
WHERE
    LOWER(Location) LIKE '%china%'
    OR UPPER(Location) LIKE '%CHN'
    OR HasSpecialChars = 1
ORDER BY
    LastAccessDate DESC,
    Reputation DESC,
    Views DESC;

Enter Parameters

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