declare @closetype as table (ID int, closeType varchar(10...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Skeptics

Q&A for scientific skepticism

declare @closetype as table
(ID int, closeType varchar(100))

Insert into @closetype
values 
(1, 'Exact Duplicate'),
(2, 'Off-topic'),
(3, 'Subjective and argumentative'),
(4, 'Not a real question'),
(7, 'Too localized'),
(10, 'General reference'),
(20, 'Noise or pointless')

SELECT closeType, count(ph.id) k 
FROM   PostHistory ph 
       INNER JOIN @closeType ct 
         ON ph.comment = ct.id 
WHERE  PostHistoryTypeId = 10 
GROUP  BY Closetype

Enter Parameters

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