MySQL - Find MIN but not zero
The correct answer for you is:
IFNULL(MIN(NULLIF(value, 0)), 0)
While ISNULL
not working.
Use this:
MIN(NULLIF(value, 0))
The correct answer for you is:
IFNULL(MIN(NULLIF(value, 0)), 0)
While ISNULL
not working.
Use this:
MIN(NULLIF(value, 0))