I am writing a query to extract questions and answers from Stack Overflow Stack Exchange Data Explorer using the following query:
SELECT Top 2
q.id, q.Title, q.Body q_body, q.parentid qpid, q.AcceptedAnswerId, q.Score q_score, q.AnswerCount, q.Tags, q.viewcount,
answers.parentid aa_pid, answers.id aa_id,
answers.body aa_body, answers.score as aa_score, answers.posttypeid
FROM
Posts answers
INNER JOIN Posts q
ON answers.parentid = q.id
WHERE (answers.id = q.AcceptedAnswerId) AND q.AnswerCount > 2
But, along with accepted answer, I also want to extract the most voted answer. Since, I can not even understand why answers is not a table.