CLT python answerers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chess

Q&A for serious players and enthusiasts of chess

SELECT
Scores, OwnerUserId, users_lower.DisplayName, users_lower.Location
FROM (
  SELECT
  SUM(Score) AS Scores, OwnerUserId
  FROM Posts
  JOIN (
    SELECT
    AcceptedAnswerId
    FROM Posts
    WHERE PostTypeId = 1
      AND AcceptedAnswerId IS NOT NULL
      AND Tags LIKE '%python%'
  ) python_answers ON python_answers.AcceptedAnswerId = Posts.Id
  WHERE OwnerUserId IS NOT NULL
  GROUP BY OwnerUserId
) aggregated
JOIN (
  SELECT
  *,
  LOWER(Location) AS location_lower
  FROM Users
) users_lower ON aggregated.OwnerUserId = users_lower.Id
WHERE Scores > 0
  AND (
      location_lower LIKE 'charlotte, nc%'
  OR  location_lower LIKE 'pineville, nc%'
  OR  location_lower LIKE 'gastonia, nc%'
  OR  location_lower LIKE 'davidson, nc%'
  OR  location_lower LIKE 'huntersville, nc%'
  OR  location_lower LIKE 'mooresville, nc%'
  OR  location_lower LIKE 'monroe, nc%'
  OR  location_lower LIKE 'concord, nc%'
  OR  location_lower LIKE 'kannapolis, nc%'
  OR  location_lower LIKE 'weddington, nc%'
  OR  location_lower LIKE 'mint Hill, nc%'
  OR  location_lower LIKE 'matthews, nc%'
  OR  location_lower LIKE 'indian trail, nc%'
  OR  location_lower LIKE 'belmont, nc%'
  OR  location_lower LIKE 'cramerton, nc%'
  OR  location_lower LIKE 'waxhaw, nc%'
  OR  location_lower LIKE 'dallas, nc%'
  OR  location_lower LIKE 'rock hill, sc%'
  OR  location_lower LIKE 'fort mill, sc%'
  OR  location_lower LIKE 'tega cay, sc%'
  OR  location_lower LIKE 'indian land, sc%'
  )
ORDER BY Scores DESC;

Enter Parameters

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