SQL Min/Max
SQL MIN and MAX are aggregate functions used to find the minimum and maximum values of a specific column in a table.
The syntax for the SQL MIN MAX functions in SQL is:
SELECT
MIN(column_name)
FROM
table_name;
SELECT
MAX(column_name)
FROM
table_name;
For example, suppose you have a table named bookshop and you want to find the lowest price, you can use the following SQL query:
SELECT
MIN(price)
FROM
bookshop;
To find the most expensive one, replace with MAX:
SELECT
MAX(price)
FROM
bookshop;
SQL MIN and MAX in Coginiti
Coginiti allows you to apply the aggregation functionality to any column by dragging and dropping the values.
Here’s an example of how you can aggregate in Coginiti Grid:
- Open the Grid View
- Click “Columns’”
- Drag and drop the values you want to aggregate.
Note that when you drop a column to “Values,” it will come with the last function used. Click on it to change and scroll to find the one you want.