Scrape SO

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT
       pq.Id as id, 
       pq.Tags as tags, 
       pq.Title as title, 
       pq.Body as question,
       pa.Body as answers,
       pq.CreationDate as creation
     
FROM posts pq

LEFT JOIN (
  SELECT pa.ParentId, STRING_AGG(pa.Body, CHAR(10)) as body
  FROM posts pa
  WHERE ParentId IS NOT NULL
  GROUP BY pa.ParentId
) pa ON pa.ParentId = pq.id

WHERE pq.ParentId IS NULL AND Id > ##LOWER## AND Id < ##HIGHER##
ORDER BY Id

Enter Parameters

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