Question 56786655 and all the questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

How many comments do I have for each score.

Science Fiction and Fantasy Meta

Q&A about the site for science fiction and fantasy enthusiasts

--DECLARE @Id int = ##QuestionId##

/*SELECT p.Id, p.title, p.AcceptedAnswerId, p.Body, p.PostTypeId,
        p.OwnerUserId, p.OwnerDisplayName, p.AnswerCount, p.CommentCount,
        c.Text, c.UserId, c.UserDisplayName*/
-- get one question 56786655
/*
SELECT *
FROM 
    Posts p
    --Comments c
--JOIN Comments c ON p.Id = c.PostId
WHERE 
    P.Id    = 56786655
*/

-- get all comments of question 56786655
SELECT p.Body, c.Text, c.UserId
FROM
  Posts p
JOIN Comments c ON p.Id = c.PostId
WHERE
  P.id = 56786655

-- get all answers of question 56786655

-- get all the comments of each answer

Enter Parameters

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