USE YOUR MANNERS?

1

Please login or register to vote for this query.

(click on this box to dismiss)

TAB #1 : Overall % of users that said PLEASE at least once TAB #2 : Users who said PLEASE lots (min 1 comment per day) TAB #3 : users who commented lots but NEVER said PLEASE (min 1 comment per day) Like ALL of my queries, I make no claims as to accuracy OR relevance of the data reported herin, and just don't take anything reported too personally or too seriously anyways! Unofficial stats, with calculations and comparisons off the top of my head. (In this case, there are obviously plenty of ways you can be friendly/helpful besides saying "PLEASE"!)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

select
  userid,
  count(*) as [# Comments],
  sum(case when text COLLATE SQL_Latin1_General_CP1_CI_AS like '%please%' then 1 else 0 end ) as [# Please]
into #temp from comments
where creationdate >= dateadd(d,0-##DaysBack:int?90##,getdate())
  and userid is not null
group by userid

select --TAB #1 : Overall % of users that said Please at least once
  format(1.0*sum([# Please])/sum([# Comments]),'0.0%') as [% of users who said please]
from #temp

select  --TAB #2 : Users who said please lots (min 1 comment per day)
  userid as [User Link],
  [# Comments],
  [# Please],
  format(1.0*[# Please]/[# Comments],'0.0%') as [Highest Please %] 
from #temp
where [# Comments]>##DaysBack##
order by 1.0*[# Please]/[# Comments] desc

select  --TAB#3 : users who commented lots but never said please
  userid as [User Link],
  [# Comments],
  0 as [# Please (really, not even once?!)]
from #temp
where [# Comments]>##DaysBack## and [# Please]=0
order by [# Comments] desc

--DaysBack: Maximum age of included comments, in days:

Enter Parameters

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