Overview of Numeric Functions


Here are some of the numeric functions we might use quite often.

  • abs
  • sum, avg
  • round
  • ceil, floor
  • greatest, min, max
  • rand
  • pow, sqrt
  • cumedist, stddev, variance

Some of the functions highlighted are aggregate functions, eg: sum, avg etc.

SELECT avg(order_item_subtotal) FROM order_items
WHERE order_item_order_id = 2;
SELECT round(avg(order_item_subtotal), 2) FROM order_items
WHERE order_item_order_id = 2;

We will go through these aggregate functions once again when we talk about Hive Queries in detail.

Practice hive on state of the art Big Data cluster - https://labs.itversity.com
You can sign up for our courses on Udemy using $10 coupons - Udemy Coupons - Big Data Courses