Question: I need answer of the question as sql query which can be written in python code(pyspark). Question 1) A. Compute the min and max values

I need answer of the question as sql query which can be written in python code(pyspark).

Question 1)

A. Compute the min and max values for temperature, battery level, CO2, and humidity.

B. Sort and group by average temperature, CO2, humidity, and country.

Our file has rows of JSON strings that look as follows:

{"device_id": 198164, "device_name": "sensor-pad-198164owomcJZ", "ip": "80.55.20.25", "cca2": "PL", "cca3": "POL", "cn": "Poland", "latitude": 53.080000, "longitude": 18.620000, "scale": "Celsius", "temp": 21, "humidity": 65, "battery_level": 8, "c02_level": 1408,"lcd": "red", "timestamp" :1458081226051}

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!