Distribution of reputation on javascript

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles

Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles

-- Distribución de la reputación de los usuarios que responden preguntas sobre un tema específico
DECLARE @TagName NVARCHAR(100) = 'javascript'

SELECT 
    u.Reputation AS ReputacionUsuario,
    COUNT(a.Id) AS TotalRespuestas
FROM 
    Posts p
JOIN 
    PostTags pt ON p.Id = pt.PostId
JOIN 
    Tags t ON t.Id = pt.TagId
JOIN 
    Posts a ON a.ParentId = p.Id AND a.PostTypeId = 2 -- Respuestas
JOIN 
    Users u ON a.OwnerUserId = u.Id
WHERE 
    t.TagName = @TagName
    AND p.PostTypeId = 1 -- Preguntas
GROUP BY 
    u.Reputation
ORDER BY 
    u.Reputation DESC

Enter Parameters

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