Examveda
Examveda

Find the name of all cities with their temperature, humidity and countries.

A. SELECT city, temperature, humidity, country FROM location;

B. SELECT weather.city, temperature, humidity, country FROM weather, location;

C. SELECT weather.city, temperature, humidity, country FROM weather, location WHERE weather.city = location.city;

D. SELECT weather.city, temperature, humidity FROM weather SELECT country FROM location WHERE weather.city = location.city;

Answer: Option C

Solution(By Examveda Team)

To retrieve the names of all cities along with their temperature, humidity, and countries, you should use the SQL query SELECT weather.city, temperature, humidity, country FROM weather, location WHERE weather.city = location.city; (Option C). This query correctly joins the "weather" and "location" tables based on the "city" column, which is common between the two tables. This allows you to obtain the information for all cities, including their temperature, humidity, and corresponding countries. Option C is the appropriate choice for achieving this result.

This Question Belongs to SQL >> Sql Miscellaneous

Join The Discussion

Related Questions on Sql Miscellaneous