Skip to content

Instantly share code, notes, and snippets.

@gdoddsy
Last active October 2, 2018 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdoddsy/f70ca8c83910dcbcf67fe02cb766758b to your computer and use it in GitHub Desktop.
Save gdoddsy/f70ca8c83910dcbcf67fe02cb766758b to your computer and use it in GitHub Desktop.
SELECT Posts.Title, acceptedAnswer.CreationDate, Users.DisplayName
FROM dbo.Posts
LEFT JOIN dbo.Posts AS acceptedAnswer
ON acceptedAnswer.Id = Posts.AcceptedAnswerId
INNER JOIN dbo.Users
ON acceptedAnswer.LastEditorUserId = Users.Id
WHERE Posts.PostTypeId = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment