Codied To Clipboard !
Home > Notes > HIVE
Example The following queries demonstrate some built-in functions: round() function hive> SELECT round(2.6) from temp; On successful execution of query, you get to see the following response: 3.0 floor() function hive> SELECT floor(2.6) from temp; On successful execution of the query, you get to see the following response: 2.0 ceil() function hive> SELECT ceil(2.6) from temp; On successful execution of the query, you get to see the following response: 3.0 Aggregate Functions a.) min select min(code) from emp1; b.) max select max(code) from emp1; c.) sum select sum(code) from emp1; select sum(DISTINCT code) from emp1; # the sum of the distinct values of the column in the group. d.) avg select avg(code) from emp1; e.) count select count(code) from emp1; select count (DISTINCT code) from emp1 ;