title: MySQL sum + inner join query
body: <h3>Question:</h3>
  
  <ul>
  <li>Table 1: id.1 | name.Joe | etc.Some | ...Other | ...Data</li>
  <li>Table 2: id.X | number.+1 123 555 9999 | useridfromtable1.1 -> Linking telefone with Joe</li>
  <li>Table 3: id. X | number.+1 123 555 9999 | calls.55</li>
  </ul>
  
  <p>I need a query that join the 3 tables and I only have the id (userid) from the table 1.
  So, I need from userid -> grab the telephone -> from the telefone grab calls on table3.</p>
  
  <h3>Answer:</h3>
  
  <pre><code>SELECT t1.name,t1.id,t2.number,t3.calls
    FROM table1 t1
  INNER JOIN table2 t2 ON t2.useridfromtable=t1.id
  INNER JOIN table3 t3 ON t3.number = t2.number
  </code></pre>
  
  <h3>New Question?</h3>
  
  <p>Any chance you know how can I print the sum of calls on the result? after all these join I get about 10 lines of the same user and their respective calls based on the phone, what is correct for what I asked, now I need return all the calls in 1 line with the values:</p>
  
  <pre><code>sum | user ID | user Name
  </code></pre>