Spring 2024 - CS441 - 2
Spring 2024 - CS441 - 2
Maximum Marks: 20
Instructions Due Date: 25 June 2024
The purpose of this assignment is to give you hands-on practice. It is expected that students
will solve the assignment themselves. The following rules will apply during the evaluation
of the assignment.
Students can copy/paste their Hive Code into the submission interface below.
Virtual University of Pakistan SEMESTER SPRING 2024
Lectures Covered
This assignment covers the contents covered in Week 10.
After completing the assignment, the student will be able to implement and execute programs
in Hive Query Language.
Songs Table 1:
Plays Table 2:
Consider the given tables and write HiveQL code for the following operations
2. Create a Table named “Songs table”. Your table should consist of five fields/columns
mentioned in given Table 1. Use the appropriate data type for each field/column.
3. Create a Table named “Plays table”. Your table should consist of five fields/columns
mentioned in given Table 2. Use the appropriate data type for each field/column.
Virtual University of Pakistan SEMESTER SPRING 2024
4. Insert given data in Songs and Plays tables as shown in Table 1& Table 2. You can
store the given data in the text file and then load it in tables.
6. Find the most played song in each genre and display the song title, artist, genre, and the
number of times it was played.
Note: Plagiarism will be checked for the solution provided. Marks will be
awarded based on your answer and plagiarism report.