title: LoopBack "group by" ability with mySQL?
body: <p>I'm new to <code>LoopBack</code>, and I seem to be missing something.
  I've heard so much about <code>StrongLoop</code> and <code>LoopBack</code>, I find it hard to believe this doesn't exist.</p>
  
  <p>My case:
  I'm looking to count the amount of events with each different severity.</p>
  
  <p>A table for example:</p>
  
  <blockquote>
    <p><strong>EventID | Severity</strong></p>
    
    <p>1 | 2</p>
    
    <p>2 | 2</p>
    
    <p>3 | 4</p>
    
    <p>4 | 3</p>
    
    <p>5 | 3</p>
    
    <p>6 | 5</p>
    
    <p>7 | 1</p>
    
    <p>8 | 2</p>
  </blockquote>
  
  <p>Now I want to count the amount of events and group them by severity, so I get something like this JSON back:</p>
  
  <pre><code>{1:1, 2:3, 3:2, 4:1, 5:1} *(severity:count)*
  </code></pre>
  
  <p>With SQL it's quite simple, just use <code>"SELECT severity, count(severity) FROM events GROUP BY severity"</code>.</p>
  
  <p>I have researched this for a while, and still can't believe this simple thing can't be done with <code>LoopBack</code>!</p>
  
  <p>Any solution? Or maybe an article to point me to?</p>
  
  <p>Thanks in advance!</p>