Gold revival/necromancer badge?

2

Please login or register to vote for this query.

(click on this box to dismiss)

This query is being used to decide the criteria for a proposed gold version of the revival/necromancer badge, by seeing how many people would qualify for it based on different criteria.

SharePoint

Q&A for SharePoint enthusiasts

-- Gold revival/necromancer badge?
-- This query is being used to decide the criteria for a proposed gold version of the revival/necromancer badge, by seeing how many people would qualify for it based on different criteria.

DECLARE @DaysBetween int = ##DaysBetween##
DECLARE @MinScore int = ##MinScore##

SELECT
     u.DisplayName AS Username,
     COUNT(*) AS TimesAwarded
FROM
    Posts AS q
    JOIN Posts AS a ON a.ParentId = q.Id
    JOIN Users AS u ON a.OwnerUserId = u.Id
WHERE
    DATEDIFF(day, q.CreationDate, a.CreationDate) >= @DaysBetween
    AND a.PostTypeId = 2
    AND a.Score >= @MinScore
GROUP BY
    u.DisplayName
ORDER BY
    TimesAwarded DESC,
    Username
;

Enter Parameters

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