title: Division of a grouped sum in prometheus
body: <p>When querying a prometheus metric, I would like to group the sum and divide the grouped results on a second metric. </p>
  
  <p>While the simple grouped sum function works:</p>
  
  <pre><code>sum by(somefield) (gauge_metric)
  </code></pre>
  
  <p>This query with the division included returns "no data": </p>
  
  <pre><code>sum by(somefield) (gauge_metric) / sum(second_metric{deployment="a-value"})
  </code></pre>
  
  <p>What am I missing here?</p>