High views, high votes short answer

0

Please login or register to vote for this query.

(click on this box to dismiss)

A list of questions with a high score and low view count

Stack Overflow

Q&A for professional and enthusiast programmers

-- High views, high votes short answer
-- This serves to present frequently viewed questions which 
-- accepted an answer with a very short post
select 
        a.Id as [Post Link], 
        a.Score, 
        a.ViewCount,
        a.AcceptedAnswerId,
        Len(q.Body) as LengthOfAcceptedAnswer,
        count(distinct z.Id) as NumberOfAnswers
from 
        Posts a
INNER JOIN Posts q ON a.AcceptedAnswerId = q.Id
INNER JOIN Posts z ON a.Id = z.ParentId 
where 
        a.ViewCount > 10000 and
        a.Score > 50 and 
        a.PostTypeId = 1 and
        a.Id < 10000 and
        Len(q.Body) < 300 
group by
      a.Id,
      a.Score,
      a.ViewCount,
      a.AcceptedAnswerId,
      a.Body,
      q.Body

Enter Parameters

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