How many upvotes do I have for each tag?

0

Please login or register to vote for this query.

(click on this box to dismiss)

how long before I get tag badges?

Skeptics

Q&A for scientific skepticism

-- Questions with best score
-- The top 20 questions with best score within 3 month range
DECLARE @From_Date DATETIME = convert(DATETIME, '##StartDate?2013/01/01##')
DECLARE @To_Date DATETIME = dateadd(mm, 12, @From_Date)

PRINT 'from ' + format(@From_Date, 'D') + ' to ' + format(@To_Date, 'D')

SELECT TOP 40 Posts.id AS [Post Link],
    users.id AS [User Link],
    Posts.CreationDate,
    Posts.Score AS [Question Score],
    max(Answer.Score) AS [max Answer Score],
    Posts.ViewCount,
    Posts.FavoriteCount,
    Posts.Tags
FROM Posts
INNER JOIN users
    ON Posts.OwnerUserId = users.id
LEFT JOIN Posts AS Answer
    ON Answer.parentid = Posts.id
        AND Answer.posttypeid = 2
WHERE Posts.ClosedDate IS NULL
    AND Posts.posttypeid = 1
    AND Posts.Tags LIKE '%%'
    AND Posts.CreationDate BETWEEN @From_Date
        AND @To_Date
GROUP BY Posts.Id,
    users.id,
    Posts.CreationDate,
    Posts.Score,
    Posts.ViewCount,
    Posts.FavoriteCount,
    Posts.Tags
ORDER BY Posts.score DESC

Enter Parameters

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