title: Oracle Analytic Rolling Percentile
body: <p>Is it possible to use windowing with any of the percentile functions? Or do you know a work around to get a rolling percentile value?</p>
  
  <p>It is easy with a moving <em>average</em>:</p>
  
  <pre><code>select avg(foo) over (order by foo_date rows 
                        between 20 preceding and 1 preceding) foo_avg_ma
  from foo_tab
  </code></pre>
  
  <p>But I can't figure out how to get the <em>median</em> (50% percentile) over the same window.</p>