Anonymous Feedback for a specific question and its answers

6

Please login or register to vote for this query.

(click on this box to dismiss)

Gets: Score, Age, Views, and Anonymous Feedback for a specific post and any answers it may have. (If given an answer-post ID, it just fetches data for that answer.)

Language Learning

Q&A for students, teachers, polyglots, and anyone interested in the techniques of second-language acquisition

DECLARE @PostId INT = ##PostId##;

SELECT      p.Id     AS [Post Link]
            , p.Score
            , p.ViewCount
            , CONVERT (VARCHAR(11), p.CreationDate, 101)
FROM        Posts p
WHERE       p.Id IN (
    SELECT              q.id
    FROM                Posts   q
    WHERE               q.id    = @PostId
    UNION ALL SELECT    a.Id
    FROM                Posts   a
    WHERE               a.ParentId  = @PostId
)

Enter Parameters

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