Question: How can to create a query in HIVE. There a table with columns name, age (0-100), address. In the result use Case statement when age

How can to create a query in HIVE.

There a table with columns name, age (0-100), address.

In the result use Case statement when age is 80 + = 'old' while 0-18 = 'young'

Count the 'old' and 'young', so the resulting tables would look like:

category count

young 30

old 50

thanks!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!