Question: Consider the customer table created in Figure 10-24 and populated with data as shown in Figure 10-27. Write the Hive script that will display the

Consider the customer table created in Figure 10-24 and populated with data as shown in Figure 10-27. Write the Hive script that will display the age-groups that exist in the data set and their average incomes.

Figure 10-24

CREATE TABLE customer (userid INT, gender STRING, salary INT, zip STRING, age

Figure 10-27

INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';

CREATE TABLE customer (userid INT, gender STRING, salary INT, zip STRING, age INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';

Step by Step Solution

3.33 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Select age avgsalary from customer group by age Explana... View full answer

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 Modern Database Management 13th Edition Questions!