Average Answerer's Age (among the tags answered by more than 1000 users with age filled)

10

Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language Meta

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

SELECT  TagName AS Tags, AVG(Age * 1.0) AS [Average Answerer's Age], COUNT(*) AS [Number of Answerers]
FROM    (
        SELECT  DISTINCT pa.OwnerUserId, pt.TagId
        FROM    Users u
        JOIN    Posts pa
        ON      pa.OwnerUserId = U.Id
        JOIN    Posts pq
        ON      pq.Id = pa.ParentId
        JOIN    PostTags pt
        ON      pt.PostId = pq.Id
        ) ut
JOIN    Tags t
ON      t.Id = ut.TagId
JOIN    Users u
ON      u.Id = ut.OwnerUserId
WHERE   u.Age BETWEEN 10 AND 90
GROUP BY
        t.Id, t.TagName
HAVING  COUNT(*) > 1000
ORDER BY
        2 DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results