Count questions with specific text (2 strings)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

SELECT 
  COUNT(*) AS "# questions",
  DATEPART(year, p.CreationDate) AS "year"
FROM Posts p
  JOIN Users u ON u.Id = p.OwnerUserId
WHERE p.Body LIKE '%##SpecifiedText##%'
  AND p.Body LIKE '%##SpecifiedText2##%'
  AND p.PostTypeId = 1 -- Questions
GROUP BY DATEPART(year, p.CreationDate)

Enter Parameters

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