title: Get column sum and use to calculate percent of total (mySQL)
body: <p>Here is a very basic look at my table. I have columns 1 and 2 and need to generate column 3. Column 3 is simply the total of the <code>Number</code> column for all <code>Name</code> divided by <code>Number</code> for the given row.  </p>
  
  <pre><code>| Name          | Number        | % of total  |
  | ------------- |:-------------:| -----:      |
  | Bob           | 5             |  25         |
  | Sally         | 10            |  50         |
  | John          | 5             |  25         |
  </code></pre>
  
  <p>I'm struggling with how to get the total of the number row and use this as a value to calculate the rest.</p>
  
  <p>EDIT: I'm looking to do this as a single query instead of two separate if possible.</p>