title: using BigQuery's APPROX_QUANTILES efficiently
body: <p>Right now if I want to get the decile of some value I'd do</p>
  
  <pre><code>SELECT
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(10)] as p10,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(20)] as p20,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(30)] as p30,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(40)] as p40,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(50)] as p50,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(60)] as p60,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(70)] as p70,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(80)] as p80,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(90)] as p90,
      APPROX_QUANTILES(value, 100)[SAFE_ORDINAL(100)] as p100
  FROM table
  </code></pre>
  
  <p>I wanted to make sure this is not 10xing the work for big query, and if there'd be a more compact way to write this</p>