PostgreSQL’s GREATEST (and LEAST) function
PostgreSQL has two functions that are not standard SQL, but are very helpful in certain situations : GREATEST and LEAST. In SQL MIN and MAX are aggregate functions that operate across all rows. But there are times where you want the smallest or largest value in a finite number of columns, a scalar min/max. That is where GREATEST and LEAST come in. Both allow for […]
PostgreSQL’s GREATEST (and LEAST) function Continue Reading »