The MIN function simply finds the lowest, or minimum, value in a field.
SELECT MIN(DaysInHospital) AS MinStay
FROM MediCarePatients
WHERE age > 65;
MinStay
2
(1 row(s) affected)
This code finds the shortest hospital stay by a MediCare patient over the age of 65 and stores that information in 'MinStay'.