questions with the top k viewers with their answerers and askers.

0

Please login or register to vote for this query.

(click on this box to dismiss)

Questions and answers in separated columns for postid as input. Example id: 3006643,2106715,1429318 (.csv downloadable for about 200 PostID's)

Amateur Radio

Q&A for amateur radio enthusiasts

select
question.Id as QuestionId,
question.CreationDate as QCreationDate,
question.Score as QScore,
question.ViewCount as QViewCount,
question.OwnerUserId as Asker,
question.Title,
question.Tags,
question.LastActivityDate as QLastActivityDate,
question.AnswerCount as QAnswerCount,
question.FavoriteCount as QFavoriteCount,
answer.Id as AnswerId,
answer.ParentId,
answer.CreationDate as ACreationDate,
answer.Score as AScore,
answer.OwnerUserId as Answerer,
answer.FavoriteCount as AFavoriteCount

from
    Posts as question inner join
    Posts as answer on
    question.Id = answer.parentId
where
question.Id in (
select top 2000 Id
from Posts 
where PostTypeId=1
order by ViewCount desc
) 
and answer.PostTypeId=2
order by question.ViewCount desc

Enter Parameters

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