In today’s article, we will examine the general use and purpose of the PostgreSQL MAX() function.
The PostgreSQL MAX() function retrieves the largest value, indicated by expression in a set of grouped rows.
General Usage;
1 |
SELECT MAX(column_name) FROM table_name; |
For example, if we want to find the object with the highest price among the products in our depo table, the following script will help us.
1 |
select max(satis_fiyati) from depo; |
The picture below shows the highest price.