Re: How to Find the Max/Min from Multiple Columns (in each row)

2006-02-03 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Henry Chang <[EMAIL PROTECTED]> writes: > Hello everyone, > I have a table where measurement values are collected in mulitple columns. > Table Schema > == > ID, measurement_01, measurement_02, measurement_03 > ===

Re: How to Find the Max/Min from Multiple Columns (in each row)

2006-02-02 Thread Aleksandar Ivanisevic
select max(greatest(measurement_01, measurement_02, measurement_03)) from table select min(least(measurement_01, measurement_02, measurement_03)) from table Henry Chang wrote: Hello everyone, I have a table where measurement values are collected in mulitple columns. Table Schema ==

Re: How to Find the Max/Min from Multiple Columns (in each row)

2006-02-02 Thread Peter Brawley
Henry, >My question is that for each row, what's the sql query that determine the >max value and the min value from all the columns?? SELECT ...   GREATEST(col1,col2,...), /// PB - Henry Chang wrote: Hello everyone, I have a table where measurement values are collected in mulitple c

How to Find the Max/Min from Multiple Columns (in each row)

2006-02-02 Thread Henry Chang
Hello everyone, I have a table where measurement values are collected in mulitple columns. Table Schema == ID, measurement_01, measurement_02, measurement_03 == 1, 300, 350, 325(max is 350, min is 300) 2, 225, 275