question archive Challenge question Now that you know how to use AWS loT Analytics to query loT data , you can practice creating some additional queries
Subject:Computer SciencePrice:9.82 Bought3
Challenge question Now that you know how to use AWS loT Analytics to query loT data , you can practice
creating some additional queries . For this challenge , create a dataset to find the average temperature for a
specific location .
Creating the dataset and querying it
Step-by-step explanation
After viewing the document , everything is clearly written there . Now regarding the above scenario You have to create a dataset to find the average temperature for a specific location .
You can create the dataset easily by following the steps written in the document .In order to find the average maximum temperature , the query is already given in the document . And the query is :
SELECT AVG (CAST(temp-max as double)) FROM my_datastore.
Now regarding the query given you have to find only the average temperature but for a specific location . So your dataset should first have the locations added . Only then can you retrieve the information . So make sure you have added the locations in your dataset . Then you can query the dataset as :
SELECT AVG(CAST (temp as double )) FROM my_datastore group by LOCATION ; Here LOCATION will be the column_name under which different locations are added .
Or
You can put the query as :
SELECT AVG(CAST (temp as double )) FROM my_datastore WHERE LOCATION = "Bihar" ;
In this way you can query the dataset .