WITH RankedQuestions AS ( SELECT q.Id AS QuestionId, q.Ti...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

WITH RankedQuestions AS (
  SELECT
    q.Id AS QuestionId,
    q.Title AS Question_Title,
    q.Body AS Question_Body,
    q.Tags AS Question_Tags,
    q.CreationDate AS Question_CreationDate,
    q.Score AS Question_Score,
    a.Id AS AnswerId,
    a.Body AS Answer_Body,
    a.CreationDate AS Answer_CreationDate,
    a.Score AS Answer_Score,
    ROW_NUMBER() OVER (ORDER BY q.ViewCount DESC) AS RowNum
  FROM
    Posts q
  JOIN
    Posts a ON q.Id = a.ParentId
  WHERE
    (q.Tags LIKE '%<java>%')
    AND (q.PostTypeId = 1) -- 1 for questions
)
SELECT
  QuestionId AS [Question Link],
  AnswerId AS [Answer Link],
  Question_Title,
  Question_Body,
  Question_Tags,
  Question_CreationDate,
  Question_Score,
  Answer_Body,
  Answer_CreationDate,
  Answer_Score
FROM
  RankedQuestions
WHERE
  RowNum > 50000 AND RowNum <= 100000 -- Specify the desired range
ORDER BY
  RowNum;

Enter Parameters

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