Question 5 (4 marks) In this question we use the same file hightemp.txt as in Question 1 of the examination paper. A fil

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 5 (4 marks) In this question we use the same file hightemp.txt as in Question 1 of the examination paper. A fil

Post by answerhappygod »

Question 5 4 Marks In This Question We Use The Same File Hightemp Txt As In Question 1 Of The Examination Paper A Fil 1
Question 5 4 Marks In This Question We Use The Same File Hightemp Txt As In Question 1 Of The Examination Paper A Fil 1 (120.56 KiB) Viewed 20 times
hightemp.txt
Question 5 4 Marks In This Question We Use The Same File Hightemp Txt As In Question 1 Of The Examination Paper A Fil 2
Question 5 4 Marks In This Question We Use The Same File Hightemp Txt As In Question 1 Of The Examination Paper A Fil 2 (11.95 KiB) Viewed 20 times
Question 5 (4 marks) In this question we use the same file hightemp.txt as in Question 1 of the examination paper. A file hightemp.txt contains information about the highest temperatures recorded every day in a number of cities all over the world. The file higtemp.txt is a text file where information about the highest temperature recorded on a given day, in a given city is stored in a single row. Data items like date, temperature and city name are separated with a single blank. A file hightemp.txt has been uploaded to HDFS at a location /bigdata/hightemp. Additionally, the World Meteorological Organization uploaded to HDSF at the same location a file city.txt that contains information about the cities where the temperature was recorded. The file city.txt is a text file with the names of cities and the names countries where the cities are located. Data items are separated with a single blank in each line. Few sample lines from a file city.txt are given below. Brisbane Australia Singapore Singapore Sydney Australia Write Pig-Latin statements that implement the following retrievals. (1) Find the distinct names of countries that recorded a temperature higher than 50 degrees. (1 mark) (2) Find the names of cities to together with the total number of temperature measurements recorded in each city. You can skip the names of cities where temperature was not recorded. (1 mark) (3) Find the names of countries, names of cities located in each country and temperatures recorded on 01-JAN-2020. If a temperature has not been recorded in a city on 01-JAN- 2020 then list only a name of city and a name of country. (1 mark) (4) Find the names of cities where a temperature has not been recorded on 01-JAN-2020. (1 mark)

01-JAN-1991 25 Sydney 01-JAN-1991 30 Brisbane 32 Singapore. 01-JAN-1991 02-JAN-1991 02-JAN-1991 02-JAN-1991 25 Sydney 31 Brisbane 35 Singapore 05-JUN-2022 15 Sydney 05-JUN-2022 20 Brisbane 05-JUN-2022 25 Singapore
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply