I've looked all over the place and can't seem to find if it is even possible to do something. Let's say that you have a table with two columns (I'm dealing with floats, which is why I'm SUMming VARCHARs):
CREATE TABLE test (val0 VARCHAR(255), val1 VARCHAR(255));
Now lets say that for each row in this table, you want to display:
(val0 / SUM(val0)) + (val1 / SUM(val1))
How would one go about this? If run as written, you'll get back a one line answer, which is just the values for the first pair of (val0, val1). I would very much like this to be computed for ALL of the rows. I realize that it has to do with SUM being a function that groups things, but I'm fairly new to this whole db scene, and don't yet fully understand how to pull this off.