SELECT * FROM ( SELECT CAST(YEAR(p.CreationDate) AS VARC...

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

SELECT * FROM 

  (
  SELECT 
    CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2)) AS Created, 
    count(Id) as 'tosca'
  FROM Posts p 
    WHERE p.Tags like '%tosca%'
  GROUP BY CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2))
  )
  as Tag1

  FULL OUTER JOIN 

  (
  SELECT 
    CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2)) AS Created, 
    count(Id) as 'soapui'
  FROM Posts p 
    WHERE p.Tags like '%soapui%'
  GROUP BY CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2))
  )
  as Tag2
  
  ON Tag1.Created = Tag2.Created
  
 FULL OUTER JOIN 

  (
  SELECT 
    CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2)) AS Created, 
    count(Id) as 'eggplant'
  FROM Posts p 
    WHERE p.Tags like '%eggplant%'
  GROUP BY CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2))
  )
  as Tag3
  
  ON Tag1.Created = Tag3.Created

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results