Which question words do posts start with?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

/* Which questions are most popular?
Who, what, when, where, why, how? */

with q_types as
(
select
  id,
  case
    when lower(title) like 'who %' then 'Who'
    when lower(title) like 'what %' then 'What'
    when lower(title) like 'when %' then 'When'
    when lower(title) like 'where %' then 'Where'
    when lower(title) like 'why %' then 'Why'
    when lower(title) like 'how %' then 'How'
    else 'Unknown'
   end as q_type
from posts
where posttypeid in (select id from posttypes where name = 'Question')
)
select 
  q_type,
  count(id)
from q_types
group by q_type
;

Enter Parameters

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