I know mysql has the MIN() function pulls out the smallest value located in a specific column.
I was wondering is there a way to pull out the smallest value for each corresponding id and exclude the values that equal 0?
For example, the 2 ids have multiple prices that were entered. I need to exclude ‘0’, and then pull out the min for 1, and then the same for 2, etc etc.
id price
=============
1 0
1 33.0
1 21.7
2 0
2 99.22
Should be something like