User-specific gendered comment count

4

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT 
  c.Text 
INTO #coms
FROM Comments c 
WHERE
  c.CreationDate > '09/11/19' AND
  c.CreationDate < '10/11/19'

DECLARE @gendered_comments AS Int
DECLARE @total_comments AS Int

SELECT @total_comments = COUNT(*) FROM #coms

SELECT @total_comments

/*
SELECT COUNT(*) FROM Comments c
WHERE 
   c.Text LIKE '%he%' --OR
   --c.Text LIKE '%him%' OR
   --c.Text LIKE '%his%' OR
   --c.Text LIKE '%she%' OR
   --c.Text LIKE '%her%'
   
SELECT TOP 10 * FROM Comments c

*/

Enter Parameters

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