title: SQLite Misuse of aggregate: SUM()
body: <p>What is wrong about this SQL command, please?</p>
  <pre><code>SELECT DISTINCT email_to FROM emails WHERE email_box='SENT' ORDER BY SUM(email_to)
  </code></pre>
  <p>I have a table <code>emails</code>.
  Two of the fields are <code>email_to</code> <strong>(contains a email recipient address string)</strong>, and <code>email_box</code> which indicates if an <code>email</code> is stored in <code>INBOX</code>, <code>OUTBOX</code> or <code>SENT</code>.</p>
  <p>I would now like to get all <code>email_to's</code>, order by the frequency of their occurance in the table.</p>
  <p>I don't know why I am getting the <code>misuse of aggregate</code> error. I would also like to ask how to fix it.</p>