title: SQL: GROUP BY for number ranges?
body: <p>I'm a first time poster and new to SQL, as are my colleagues.<br>
  I have a column of numbers (let's just call it "numbers") and the values in it range from 1-9999.<br>
  I need to create a grouping column (let's call it "numbers level") and assign the values of AA to all numbers from 1-999, BB from 1000-6999 and CC for 7000-9999.<br>
  So, the final output would look like below (output does not need to be ordered):</p>
  
  <pre><code>numbers      |   numbers level
  -------------------------------------
     136       |        AA
    2935       |        BB
    4288       |        BB
    8987       |        CC
    436        |        AA
    3737       |        BB
  </code></pre>
  
  <p>Is there any easy way to script this, i.e.: by using a GROUP BY clause?<br>
  Or does that grouping column have to exist already and I need to just populate it with a command?</p>
  
  <p>Please let me know if my question wreaks of cluelessness and I'll clarify the best I can. </p>