How can I calculate a minimum number of A and B on mysql?
Command 'min()' means something else on the SQL.
The correct function to get a minimum number from two numbers:
LEAST()