SELECT DISTINCT p.Id as questionId, p.Title as questionTi...

0

Please login or register to vote for this query.

(click on this box to dismiss)

English Language and Usage Meta

Q&A about the site for linguists, etymologists, and serious English language enthusiasts

SELECT DISTINCT
  p.Id as questionId,
  p.Title as questionTitle,
  p.Tags,
  p.Body as questionBody,
  p.CreationDate as questionCreationDate,
  p.AcceptedAnswerId,
  p.viewCount as questionViewCount,
  p.AnswerCount,
  p.CommentCount,
  p.Score as questionScore,
  p.FavoriteCount as questionFavoriteCount,
  p.OwnerUserId as questionUserId,
  u.Location as questionUserLocation,
  u.CreationDate as questionUserCreationDate,
  u.Views as questionUserViews,
  a.Id as answerId,
  a.Body as answerBody,
  a.OwnerUserId as answerUserId,
  a.Score as answerScore,
  a.CommentCount as answerCommentCount,
  c.Id as commentId, 
  c.Text as commentText

FROM 
Posts p 
INNER JOIN PostTags pt ON p.Id = pt.PostId
INNER JOIN Tags t ON pt.TagId = t.Id
LEFT JOIN  Users u ON u.Id = p.OwnerUserId
LEFT JOIN Posts a ON  a.parentID = p.Id
LEFT JOIN Comments c ON c.PostId = p.Id

WHERE
(UPPER(t.TagName) LIKE UPPER('robotics')) OR 
(UPPER(t.TagName) LIKE UPPER('robot'))

ORDER By questionId, answerId

Enter Parameters

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