Distribution of reputation on ....

0

Please login or register to vote for this query.

(click on this box to dismiss)

Korean Language

Q&A for linguists, teachers and students of the Korean language

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

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