If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Is it possible to take the min of four minumum column results? Here is the scenario: I have four columns in a table which contain numbers. I want the minimum of the 4 number combination for each result, and also the maximum of the same. I try this in my select min(number1),min(number2),min(number3),min(number4) from table where .... and I get the minimum number in each column for the given where condition. The issue is, of those four numbers, I want the min (smallest) of the four results returned. I tried this "select min(min(number1),min(number2),min(number3),min(number4)) from table where .... " an got an invalid number of arguments. I was hoping it would be as simple as such (just adding a min outside) but it does not work. Is there a better way? I do not want the min in each column, but the min in each column where a condition is met.