Search Postgresql Archives

Re: Calculating percentages in Postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Nixonn schrieb:
Hi Guys


Has anyone written a postgres function to calculate percentages without
giving "ERROR:  division by zero" when fed zeros?

What is the expected result when you feed zeros?
What is your use-case? 0 out of 0 or something?
Should that mean 100% or 0%? :-) Or just: Null
(as "dont't know")

Its easy when you fully know your problem :-)

Regards
Tino



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux