Reputation: 155
Can someone give me some advice on how I can get the min of values over multiple colums? I'd like to do this without using a subquery if possible.
Thanks in advance!
something like the function 'least'.
Upvotes: 1
Views: 65
Reputation: 311143
least
seems to be exactly what you need:
SELECT LEAST(MIN(col1), MIN(col2), MIN(col3)) AS minium_of_three_columns
FROM my_table
Upvotes: 5