I am using QuestDB and one column has values double e.g. 10.5, 5.2 etc, but few rows come like -nan, inf for not a number and infinity. What is the best way to sum this column. If I do normal sum it fails with casting problem due to nan and inf rows.
I can also use PostgreSQL if you think it can be solved in that.
You might want to try the KSUM function .
Alternatively, you could always use COALESCE to turn nulls into Zeroes.