Median Reputation

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

/* 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

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