Median Reputation


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

/* select avg(reputation) median from (
  select reputation,
  rasc = row_number() over(order by reputation),
  rdesc = row_number() over(order by reputation desc)
  from users where reputation > 1
) b where rasc between rdesc - 1 and rdesc + 1 */

select count(*) as c from users -- where reputation > 1 order by reputation desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results