SELECT date1, count(id)/30 as cnt FROM ( SELECT FORMAT (...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Quality Assurance and Testing Meta

Q&A about the site for software quality control experts, automation engineers, and software testers

SELECT date1, count(id)/30 as cnt
FROM (

  SELECT 
    FORMAT (d.CreationDate, 'yy-MM') as [date1],
    (d.Id) as id
  FROM Posts d  -- d=duplicate
    LEFT JOIN PostHistory ph ON ph.PostId = d.Id
    LEFT JOIN PostLinks pl ON pl.PostId = d.Id
    LEFT JOIN Posts o ON o.Id = pl.RelatedPostId  -- o=original
  WHERE
    d.PostTypeId = 1  -- 1=Question
    
  ) as t1
group by date1
order by date1

Enter Parameters

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