title: mysql select that calculates percentage
body: <p>I have a table with count as a field and username as another. I've managed to get a total count of all the records for the month in question by using this query:</p>
  
  <pre><code>select count(*) 
  from forms 
  where Month(date) = MONTH(CURDATE()) 
      AND YEAR(CURDATE());
  </code></pre>
  
  <p>I've also managed to get individual users entries by this query:</p>
  
  <pre><code>select u_name, count(*) AS numb 
  from forms 
  where Month(date) = MONTH(CURDATE()) 
      AND YEAR(CURDATE()) 
  GROUP BY U_name 
  ORDER BY numb DESC;`
  </code></pre>
  
  <p>So...the first gives me back something like '12'...another words, 12 records entered in October (let's say). The second query gives me something like:</p>
  
  <p>John 5
  Mary 7</p>
  
  <p>What I'm struggeling with is a query that will give me the percentage of each users entries....i.e John's is 41%. 5 out of the 12 entries.</p>
  
  <p>Hope I'm clear....thanks for any help.</p>