How to use SQL MIN MAX Functions in program with example

SQL SELECT MIN MAX functions

The SQL MIN MAX Functions. The SELECT MIN() function returns the minimum value for a column. The SELECT MAX() function returns the maximum value for a column.

SQL MIN MAX functions General syntax

The general MIN syntax is:

The general Max syntax is:

Question: Find the minimum product

PRODUCT
Id
ProductName
ProductPrice
Package
SellerName

Result:

ProductPrice
4.45

SQL SELECT MIN MAX functions

Question: Find the largest order placed in 2017

Result:

TotalAmount
56,67800
Order
Id
CustomerId
OrderNumber
OrderDate
TotalAmount

Problem: Find the last order date in 2017

Its return maximum order date in the 2017 year.
Resource SQL