Find unanswered questions in a tag by asker reputation
Q&A for professionals in medical and allied health fields, students of those professions, related academics, and others with a sound understanding of medicine and healthcare-related sciences
-- Find unanswered questions in a tag by asker reputation
SELECT Posts.Id as [Post Link], Posts.Tags as [Tags], Posts.Score, Posts.ViewCount, Posts.CreationDate, Users.LastAccessDate
INNER JOIN PostTags ON Posts.Id = PostTags.PostId
INNER JOIN Tags ON PostTags.TagId = Tags.id
INNER JOIN Users ON Posts.OwnerUserId = Users.id
WHERE Tags.TagName = '##TagName##'
AND Posts.AnswerCount = 0
AND Posts.PostTypeId = 1 -- PostTypeId = 1 -> Question
AND Posts.CommunityOwnedDate is null
AND Posts.ClosedDate is null
AND Posts.ViewCount > 1000
AND Users.Reputation > 500
--AND Posts.LastActivityDate < '2017-01-01'
--AND Posts.CreationDate > '2015-08-01'
--AND Users.LastAccessDate < '2017-01-01'
-- AND Posts.ViewCount >10
ORDER by Users.LastAccessDate DESC;