title: get sum of mysql table ane joint another tabe for get name
body: <pre><code>CSU:                           
     csuid,     csuname,          
     100         china            
      101         england       
  
      LOAN:
      csuid,  Arears  empid
      100       155   100
      100       250   100
      103       322   100
      103       065   100
  </code></pre>
  
  <p>what is the best way to get sum of arears and group it by csuname..i'm stuck with this</p>
  
  <pre><code>slect csuid as csu,sum(arears) as csu_total from loan where empid='100'group by csuid;
  </code></pre>
  
  <p>this works, I can get the csuid, but i want to get csuname for that.</p>