Meta participation statistics for election-voters

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

-- Grab list of voters
DECLARE @election_start_date datetime = ##ElectionStartDate:string##
DECLARE @next_election_start_date datetime = ##NextElectionStartDate:string##

SELECT 
  u.AccountId AS [AccountId]
INTO
  #voters
FROM
  Users AS u
  INNER JOIN Badges AS b
    ON u.Id = b.UserId
WHERE
  b.Name = 'Constituent'
  AND DATEDIFF(MINUTE, @election_start_date, b.Date) > 0
  AND DATEDIFF(MINUTE, DATEADD(DAY, -1, @next_election_start_date), b.Date) < 0

SELECT
  *
FROM
  #voters

Enter Parameters

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