Comments about voting and reputation

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

-- A query to count the number of comments with links

select count(c.id) as [Total], 
cast((select count(c2.id) from comments c2 where 
c2.text like '%+1%' OR
c2.text like '%+ 1%' OR
c2.text like '%-1%' OR
c2.text like '%- 1%' OR
c2.text like '%[.,?!- ][Rr]ep[.,?!- ]%' OR
c2.text like '[Rr]ep[.,?!- ]%' OR
c2.text like '%[Rr]eputation%' OR
c2.text like '%[Uu]pvote%' OR
c2.text like '%[Dd]ownvote%' OR
c2.text like '%[Uu]p_vote%' OR
c2.text like '%[Dd]own_vote%' OR
c2.text like '[.,?!- ][Vv]ote[.,?!- ]'
 ) 
AS float) / cast(count(c.id) AS float) AS [Ratio]
from comments c

Enter Parameters

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