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