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

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

-- DECLARE @Tag1 str = ##SearchTag1##
--DECLARE @Tag2 str = ##SearchTag2##

SELECT * FROM 

  (
  SELECT 
    CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2)) AS Created, 
    count(Id) as 'snowflake'
  FROM Posts p 
    WHERE p.Tags like '%snowflake%'
  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 'teradata'
  FROM Posts p 
    WHERE p.Tags like '%teradata%'
  GROUP BY CAST(YEAR(p.CreationDate) AS VARCHAR(4)) + '-' + CAST(MONTH(p.CreationDate) AS VARCHAR(2))
  )
  as Tag2
  
  ON Tag1.Created = Tag2.Created

Enter Parameters

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