Select min () returning value other than 0

0

I need to make a select where you get the lowest value found, other than 0 (zero),

SELECT MIN(VALORTARIFA) MENORTARIFA FROM TABELA

In the above command, if there is any 0.00 value, it returns me 0.00 and I only want the highest value above 0.00, (0,01) I'm already interested.

How can I get this?

    
asked by anonymous 12.02.2016 / 13:51

1 answer

2

In this case the solution is use Where .

SELECT MIN(VALORTARIFA) MENORTARIFA 
FROM TABELA 
WHERE VALORTARIFA > 0
    
15.02.2016 / 12:12