title: How can I create a table with a running range of incremented rank values from existing rank values?
body: <p>I have a table in Access 2013 with the following fields: a unique location Code (Short Text type); a Score (Short Text type) with unique values for each Score; and a unique value for each Code, ranked descending by Score, called Rank (number, Long Integer type). There are approximately 8,000 records. </p>
  
  <p>I want to create a table with a running range of every Rank within a quartile (25%) of each Rank value - i.e., add 1 through 994 to each Rank value (994 is 12.5% of the total Rank values) for all the Rank values greater , and subtract 1 through 994 from each Rank value for all rank values less than each Code's Rank value, to create a total of 1,987 Rank values records with the same Code value. </p>
  
  <p>I will use the Rank values in a query to join each Code and Rank to all the other records in that Rank's quartile/cohort. I can create the query - which I know will have a huge result set - I just need to first create the table of running quartile/cohort Rank values for each Code and Rank.</p>
  
  <p>Any help is very much appreciated. I'm totally in favor of trying to do this in MySQL of course. Obviously if there is a simpler way to achieve the same result, that is also appreciated.  </p>