<div><div dir="rtl"><div dir="ltr"><br>
<div dir="ltr">Hi,</div>
<div dir="ltr">I know how to implement this. It's not the issue.</div>
<div dir="ltr">It's very easy to implement absolute value as well yet still PostgreSQL gives <tt><code>abs(<tt>x</tt>)</code></tt> function which is build in function.</div>
<div dir="ltr">My claim is that if there is a build in function for absolute value why not for percentage? Both are very basic mathematical operations.</div>
<div dir="ltr"> </div>
<div dir="ltr">Can you give a good reason why absolute value has a build in function while percentage is not?</div>
</div></div><section class="cust_msg_end"></section><blockquote style="margin:0;margin-bottom:20px;border-top:1px solid #e0e0e0;"><br>ב דצמ׳ 18, 2017 17:44, hubert depesz lubaczewski כתב:<blockquote style="margin:0;margin-bottom:20px;border-top:1px solid #e0e0e0">On Mon, Dec 18, 2017 at 02:23:38PM +0200, Nick Dro wrote:
<br>> Hi,
<br>> Why PostgreSQL doesn't have build-in function to calculate percentage?
<br>> somthing like percent(number,%
<br>> for example:
<br>> select percent(100,1) will calculate 1% of 100 = 1
<br>> select percent(25,20) will calculate 20% of 25 = 5
<br>What is the problem with using normal multiplication for this?
<br>depesz<br></blockquote></blockquote><br></div>