title: Group by main values and 'rest' in Ruby on Rails
body: <p>So I am generating a few graphs from some data within my database.
  I would like to have a single query that'll populate my hash like so:</p>
  
  <pre><code>=&gt; {1 =&gt; 100, 2 =&gt; 101, ... 15 =&gt; 24, "rest" =&gt; 18284}
  </code></pre>
  
  <p>Currently I just limit the results to let's say 15 and do another query with the offset of 15.</p>
  
  <pre><code>@first = Sos.order(:hssem).group(:hssem).limit(15).count
  @rest = Sos.select(:hssem).offset(15).count
  </code></pre>
  
  <p>Is there a possibility to do that in a single query?</p>
  
  <p>Happy new year by the way - Thanks in advance!</p>