i have a table with some numbers, my original query was:
SELECT * FROM table ORDER BY (field1/field2)
i have another table that has rows in it, each with a field1 and field2 value, and i found that each of those columns corresponds to total up to the field1 and field2 in my query, so i could sum(field1) and sum(field2) and use that instead of having a seperate column in the first table.
how can i do this? that's pretty much my question. i want something like this (no idea about the syntax- help!? please):
SELECT * FROM table ORDER BY ( SUM(othertable.field1) / SUM(othertable.field2) )
any help? cheers,