Check out example codes for "mysql select smaller of two values". It will help you in understanding the concepts better.

Code Example 1

SELECT LEAST(2,0);

Learn ReactJs, React Native from akashmittal.com