title: SQL statistics query
body: <p>I want to gather some statistics and I wonder if can take some min, max and average values directly by DB queries. </p>
  
  <p>In an oversimplification I have something like this:</p>
  
  <pre><code>Person  | Account
  __________________
  Person1 | Account1
  Person1 | Account2
  Person1 | Account3
  Person2 | Account4
  Person2 | Account5
  ..................
  </code></pre>
  
  <p>I want to find the maximum, minimum and average number of accounts a person has. Is this possible with a SQL query?</p>