title: JOIN and SUM in MySql?
body: <p>I'm real new to MySQL in general so I have a basic question. So I have these two tables</p>
  <pre><code>CREATE TABLE customer (
  id SMALLINT UNSIGNED NOT NULL auto_increment,
  name VARCHAR(255) CHARACTER SET latin1 NOT NULL,
  birthdate DATE NOT NULL,
  PRIMARY KEY (id)
  );
  
  CREATE TABLE account (
  id SMALLINT UNSIGNED NOT NULL auto_increment,
  balance DECIMAL(7,2) NOT NULL DEFAULT 0.0,
  ownedBy SMALLINT UNSIGNED NOT NULL,
  nickname VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL , 
  PRIMARY KEY (id),
  FOREIGN KEY (ownedBy) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE
  );
  </code></pre>
  <p>I want to be able to get all the customers who have an account and the total in ALL their bank accounts, but I'm honestly confused on how to do that correctly. I got as far as</p>
  <pre><code>SELECT customer.name FROM customer JOIN account ON customer.id = account.id;
  </code></pre>