;with TopQuestionAnswers as ( select top 15 p.Id as Quest...


Please login or register to vote for this query.

(click on this box to dismiss)

Sitecore Meta

Q&A about the site for developers and end users of the Sitecore CMS and multichannel marketing software

;with TopQuestionAnswers
    select top 15 
        p.Id as QuestionId
        , p.Score as QuestionScore
        , p.Title as Question
        , pp.Body as Answer
        , pp.Score as AnswerScore
    from Posts as p
        inner join Posts as pp
            on p.Id = pp.ParentId
    where p.PostTypeId = 1
        and pp.PostTypeId = 2
        and p.AcceptedAnswerId = pp.Id
    order by p.Score desc, pp.Score desc
    (select string_agg(t.TagName, ',') 
        from PostTags as pt
            inner join Tags as t
                on pt.TagId = t.Id
        where pt.PostId = qa.QuestionId) as Tags
from TopQuestionAnswers as qa

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results