Skip to content

Instantly share code, notes, and snippets.

@henryhund
Last active December 29, 2015 06:59
Show Gist options
  • Save henryhund/7632438 to your computer and use it in GitHub Desktop.
Save henryhund/7632438 to your computer and use it in GitHub Desktop.
SELECT
Questions.CreationDate as "Q.Date",
Questions.Score as "Q.Score",
Questions.ViewCount as "Q.Views",
Questions.Title as "Q.Title",
Questions.Body as "Q.Body",
Questions.Tags as "Q.Tags",
Questions.AnswerCount as "Q.AnswerCount",
Users.Reputation as "U.Rep",
Users.Location as "U.Loc",
Users.Views as "U.Views",
Users.UpVotes as "U.Upvotes",
Users.DownVotes as "U.Downvotes",
Users.Age as "U.Age",
Answers.CreationDate as "A.Date"
FROM
Posts Questions
JOIN
Users ON Users.Id = Questions.OwnerUserId
JOIN
Posts Answers ON Answers.Id = Questions.AcceptedAnswerId
WHERE
Questions.AcceptedAnswerId IS NOT NULL
ORDER BY
Questions.CreationDate DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment