Select COUNT + CURDATE excluding values negatives
Hello guys,
I have the code in my application realizing the SELECT down:
SELECT contrato, data_venc, SUM(IF(DATEDIFF(data_venc, CURDATE()) < 90, 0, 0)) AS data_venc FROM infraestrutura
Result of select:
8
-11
3
But, i need return the values positives of 0 to 90, excluding the values negatives.
Can you help me?
Subject
Written By
Posted
Select COUNT + CURDATE excluding values negatives
February 12, 2019 02:01PM
February 12, 2019 03:11PM
February 12, 2019 03:23PM
February 12, 2019 03:50PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.