Separated Body (question and answers) for PostID (v. 1)

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

Enter Parameters

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