int4 postgres max value code example Example: postgres select max value SELECT * FROM payment WHERE amount = ( SELECT MAX(amount) FROM payment );