Find the minimum or maximum value across several columns
Assume you have the following columns:
Code:
col1 col2
2 4
1 2
3 5
We want the answer to be 1 for minimum and 5 for maximum.
This question was asked on the postgres.sql mailing list
Gmane -- Mail To News And Back Again