MINで最小値を取得する。
https://www.postgresql.jp/docs/9.4/functions-aggregate.html
postgresdb1=# SELECT * FROM products; id | name | price | tax | quantity | discount ----+------------+--------+-------+----------+---------- 1 | ペン | 100.00 | 10.00 | 50 | 5.00 2 | ノート | 200.00 | 10.00 | 10 | 3.00 3 | ペンケース | 250.00 | 10.00 | 10 | 3.00 3 | 消しゴム | 50.00 | 10.00 | 5 | 8.00 (4 行) postgresdb1=# SELECT MIN(price) FROM products; min ------- 50.00 (1 行) postgresdb1=#
価格の最小値を取得。