Skip to content
Advertisement

Need to generate percentage column in Hive after generating Count from the table

I have created following HIVE table which helps to determine the count and type of individuals from the source hive table. Now I need to create further percentage breakout from this:

The output for above code is this:

I tried to create percentage break out using following code, but not getting desired output. Any suggestions would be great.

Advertisement

Answer

Use analytics sum():

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement