title: SQL Server: PERCENTILE_DISC for column median without partitioning
body: <p>I'm trying to run <code>PERCENTILE_DISC</code> on a column of values in a table to get their median. I notice that the function has a mandatory partition clause and I'm wondering if there's a way to not use it. I am interested only in the median of the entire column, not subsets of its values by some other categorical. I even tried this hack to try to get the median of <code>my_value</code>:</p>
  
  <pre><code>SELECT
      PERCENTILE_DISC (0.5)
      WITHIN GROUP (ORDER BY my_value) 
      OVER (PARTITION BY NULL)
  FROM
      my_table
  </code></pre>
  
  <p>But just got a vector of 1s the length of my table. Is there a way to just get a column median without partitioning?</p>