mysql get min between two dates code example Example: mysql select smaller of two values SELECT LEAST(2,0);