title: true MySQL statement
body: <p>i have a table (base) and a table structure is:</p>
  
  <pre><code>id, name, money, manager, date
  </code></pre>
  
  <p>i do to retrieve a distinct values from a table</p>
  
  <pre><code>SELECT DISTINCT name from base; 
  </code></pre>
  
  <p>this code works but i need something like this</p>
  
  <pre><code>SELECT DISTINCT name SUM(money) from base;
  </code></pre>
  
  <p>this code retrieve from a table only one value (name) and sum of the all money value:</p>
  
  <p>like this</p>
  
  <pre><code>id      name      money    manager      date
  ===     =====     =====    =======   ===========
   1      John       3000     Scot      10.04.2013
  </code></pre>
  
  <p>i need name DISTINCT and money SUM</p>
  
  <pre><code>   id      name      money    manager      date
     ===     =====     =====    =======   ===========
      1      John       150     Scot      10.04.2013
      2      Mia        200     Scot      11.04.2013
      3      Monica     650     Scot      09.04.2013
     ...     ......     ...     ....      ..........
  </code></pre>
  
  <p>if i add SQL query like this:</p>
  
  <pre><code>SELECT DISTINCT name, SUM(money) FROM base WHERE name='Mia'
  </code></pre>
  
  <p>or   </p>
  
  <pre><code>SELECT name, SUM(money) FROM base WHERE name='Mia'
  </code></pre>
  
  <p>code works. How to do like this on all the records in the table?</p>
  
  <p>i'm using:</p>
  
  <p>Mysql 5.5.24,
  Delphi Xe3,
  Delphi sql component Unidac   </p>
  
  <p>Sorry for my bad English</p>