SELECT pp.MentionsSOBlog , SUM(case when v.votetyp...


Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

Q&A about the Stack Exchange Network

        SELECT  pp.MentionsSOBlog
        ,       SUM(case when v.votetypeid = 2 then 10
                         when v.votetypeid = 3 then -2
                         else null 
                    end) / COUNT(distinct AS RepGain
        FROM    tags t
        JOIN    posttags pt
        ON      pt.tagid =
        JOIN    (
                select  *
                ,       case when body like '' then 1 
                             else 0 
                        end as MentionsSOBlog
                from    posts
                ) pp
        ON = pt.postid
        JOIN    posts pa
        ON      pa.parentid =
        JOIN    votes v
        ON      v.postid =
        WHERE   t.tagname = 'discussion'
        GROUP BY 

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results