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:
select count(*)
from forms
where Month(date) = MONTH(CURDATE())
AND YEAR(CURDATE());
I've also managed to get individual users entries by this query:
select u_name, count(*) AS numb
from forms
where Month(date) = MONTH(CURDATE())
AND YEAR(CURDATE())
GROUP BY U_name
ORDER BY numb DESC;`
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:
John 5 Mary 7
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.
Hope I'm clear....thanks for any help.