If I did this, I would start by storing a variable containing the total amount, for example:
SET @total := (SELECT SUM(number) FROM myTable);
Once I had this variable, I could run a query that received a percentage for each row as follows:
SELECT name, number, (number / @total) * 100 AS percentage FROM myTable;
If you do not want to use a variable, you can simply move this subquery to your select statement:
SELECT name, number, (number / (SELECT SUM(number) FROM myTable)) * 100 AS percentage FROM myTable;
The following is an example SQL Fiddle with each approach.
source share