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)

Iota

Q&A for users of Iota, the open-source cryptocurrency for IoT that does not use a blockchain

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 to meta site
loading Hold tight while we fetch your results