PostgreSQL – MIN() Function
PostgreSQL MIN() function is an aggregate function that returns the minimum value in a set of values.
SELECT MIN(amount) FROM payment;
The following query gets the smallest payment paid by each customer:
SELECT customer_id, MIN(amount) FROM payment GROUP BY customer_id;