Hacker News new | ask | show | jobs
by taffer 2475 days ago
Window functions can be used to compute the median:

    select percentile_disc(0.5) within group (order by things.value)
    from things
1 comments

Thank you