100%(6)6 out of 6 people found this document helpful
This preview shows page 1 out of 1 page.
Name: ___________________________USC ID: ______________________INF 551–Fall 2018 (Morning section)Quiz 9: SQL via Hadoop MapReduce (10 points), 10 minutesConsider a sales data stored as a csv file (fields are category, state, year, and amount):Cell,CA,2017,30Cell,CA,2016,30Cell,NY,2018,80Laptop,CA,2017,15Laptop,CA,2018,50Laptop,NY,2015,35Tablet,NY,2015,50Consider computing the answer to the following SQL query using Hadoop MapReduce (assume that NOcombiner is used).Select category, avg(amount)From salesWhere year != 2016Group by categoryHaving count(*) > 11.[5 points] Write the logic of mapfunction in pseudocode. What will the map function output for the