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.

Emacs

Q&A for those using, extending or developing Emacs

-- 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,
    DisplayName,
    CASE
      WHEN(CAST(DisplayName AS VARCHAR(MAX)) COLLATE Chinese_PRC_BIN) = DisplayName
        THEN 0
        ELSE 1
      END HasChineseChar
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 HasChineseChar = 1
ORDER BY
    Reputation DESC,
    Views DESC,
    DisplayName DESC,
    LastAccessDate DESC

Enter Parameters

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