title: Google Sheets Query - Returning the rows that make up the largest 75% of the total sum
body: <p>I'm trying to create a Google Sheets Query that will return 75% of the largest values of the total sum. Essentially, using sales data from many different locations, trying to find the 20% of locations that provide 75% of the revenue.</p>
  
  <p>For example:</p>
  
  <pre><code>Store     Revenue
  1         225
  2         350
  3         3000
  4         200
  5         500
  6         600
  7         30
  8         5000
  9         1500
  </code></pre>
  
  <p>Should return </p>
  
  <pre><code>Store    Revenue
  3        3000
  8        5000
  </code></pre>
  
  <p>Here's a Google Sheets in case it helps: <a href="https://docs.google.com/a/ash-asia.com/spreadsheets/d/removed" rel="nofollow noreferrer">https://docs.google.com/a/ash-asia.com/spreadsheets/d/removed</a></p>
  
  <p>Any ideas on where I should start? Any help is appreciated. Thanks!</p>