Q&A about the site for developers and end users of the Sitecore CMS and multichannel marketing software
/* select distinct percentile_disc(0.5) within group (order by Reputation) over () "Median reputation" from Users u where u.Id in (select distinct OwnerUserId from Posts q join Votes v on PostId = q.Id where PostTypeId = 1 and VoteTypeId = 3); --*/ /* select distinct percentile_disc(0.5) within group (order by Reputation) over () "Median reputation" from Users u where u.Id in (select distinct OwnerUserId from Posts q join Votes v on PostId = q.Id); --*/ --/* with extra_rep as ( select Reputation + (select 5*count(*) from Posts q join Votes v on PostId = q.Id where PostTypeId = 1 and VoteTypeId = 3 and OwnerUserId = u.Id ) rep from Users u where u.Id in (select distinct OwnerUserId from Posts q join Votes v on PostId = q.Id where PostTypeId = 1 and VoteTypeId = 3) ) select distinct percentile_disc(0.5) within group (order by rep) over () "Median reputation (with +10 question votes)" from extra_rep --*/