title: Calculate in SQL with Inner Join
body: <p>I am trying to calculate in a SQL statement. I am trying to calculate the total amount in the <code>invoice.total</code> column per customer. I created the following statement:</p>
  
  <pre><code>SELECT customers.firstname, customers.lastname, customers.status, SUM(invoice.total) AS total 
  FROM customers
  INNER JOIN invoice
  ON customers.id=invoice.id;
  </code></pre>
  
  <p>When I run this, I get the total amount in the table. I have 15 different customers in this table but I get only the name of the first customer and the total amount of all customers. What am I doing wrong?</p>