Minimum, Maximum, and Average Number of Answers Per Post


Please login or register to vote for this query.

(click on this box to dismiss)

The minimum, maximum, and average number of answers per post on Stack Overflow.


Q&A for those using, extending or developing Emacs

---Counts votes for answers done before and after a badge with offset
declare @offset int = 0
declare @start datetime = '2013/1/1'
declare @end datetime = '2013/2/1'

--Title "AfterBadgeOffsetX"
    (select score
     from Posts 
     where posttypeid=2 
     and CreationDate >= b.Date
     and OwnerUserId= u.Id 
      order by CreationDate asc
     offset @offset+1 ROWS fetch next 1 row only) as [SAnswer Score]
    from Badges as b
    inner join Users as u
    on b.UserId = u.Id
    b.Name = 'Nice Answer' and
     u.CreationDate >= @start and
    u.CreationDate < @end
    order by u.CreationDate desc

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results