Users with the most quick votes by day With Detail Link

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

WITH sev as(


SELECT 
  row_number() over (partition by userID order by id) rn,
  UserId,
  CreationDate
FROM 
  SuggestedEditVotes sev
WHERE 
   UserID <> -1
  )
  
SELECT 
    sev.UserID [User Link],
    sev.UserID,
    Count(sev.rn) k
    
FROM 
  sev 
  INNER JOIN sev s_prev
    ON sev.UserId = s_prev.UserID
       AND sev.rn = s_prev.rn + 1
WHERE
DATEDIFF(ss, s_prev.CreationDate, sev.CreationDate) < 5
GROUP BY 
  sev.UserID
ORDER BY 
    Count(sev.rn) desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results