Je hoeft alleen maar CROSS JOIN
de SUM()
van Number
kolom:
SELECT Name, Number, Number * 100 / t.s AS `% of total`
FROM mytable
CROSS JOIN (SELECT SUM(Number) AS s FROM mytable) t
Je hoeft alleen maar CROSS JOIN
de SUM()
van Number
kolom:
SELECT Name, Number, Number * 100 / t.s AS `% of total`
FROM mytable
CROSS JOIN (SELECT SUM(Number) AS s FROM mytable) t