Skip to main content

Does Vertica have a quotient function?

  • January 11, 2014
  • 3 replies
  • 17 views

Laelsan
Quotient is the number of times a divisor goes into the dividend. Does Vertica have a function to do this?

3 replies

Bhawana
Forum|alt.badge.img
  • Participating Frequently
  • January 14, 2014
Hi,

No we do not have that  funtion but you can try as:

trader1849=> select trunc(11/3)::int;
trunc
-------
3
(1 row)

trader1849=> select trunc(8/3)::int;
trunc
-------
2
(1 row)



Regards,

Bhawana

Laelsan
  • Author
  • Participating Frequently
  • January 14, 2014
That makes sense, thanks! How do I mark this question as [answered]?

Bhawana
Forum|alt.badge.img
  • Participating Frequently
  • January 15, 2014
Hi Laelsan,

Thank you for the update, I will mark this as "answered".

Regards,

Bhawana