SELECT Tags.TagName, COUNT(DISTINCT Posts.Id) as Question...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Psychology and Neuroscience

Q&A for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

SELECT 
    Tags.TagName,
    COUNT(DISTINCT Posts.Id) as QuestionCount,
    AVG(CAST(Posts.ViewCount as FLOAT)) as AvgViews,
    MAX(Posts.ViewCount) as MaxViews,
    COUNT(DISTINCT Posts.AcceptedAnswerId) as AcceptedAnswers
FROM Posts
LEFT JOIN PostTags ON Posts.Id = PostTags.PostId
LEFT JOIN Tags ON PostTags.TagId = Tags.Id
WHERE Posts.ViewCount > 1000
    AND Posts.PostTypeId = 1
GROUP BY Tags.TagName
ORDER BY AvgViews DESC;

Enter Parameters

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