select substring(title,1,charindex(' ',title+' ')) as fir...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping Meta

Q&A about the site for gardeners and landscapers

select substring(title,1,charindex(' ',title+' ')) as firstword,
count(*) as number,
avg(score) as avgscore,
sum (case when closeddate=null then 0 else 1 end) as numberClosed,
avg(case when closeddate=null then 0 else 1 end) as percentage
from posts
group by  substring(title,1,charindex(' ',title+' '))
having count(*)>2
order by count(*),avg(score)

Enter Parameters

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