Examveda
Examveda

Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy

A. SELECT city, temperature, condition FROM weather WHERE condition NOT IN ('sunny', 'cloudy');

B. SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN ('sunny', 'cloudy');

C. SELECT city, temperature, condition FROM weather WHERE condition IN ('sunny', 'cloudy');

D. SELECT city, temperature, condition FROM weather WHERE condition BETWEEN ('sunny', 'cloudy');

Answer: Option A

Solution(By Examveda Team)

To retrieve the names of cities with their respective temperature and condition where the condition is neither "sunny" nor "cloudy," you should use the SQL query SELECT city, temperature, condition FROM weather WHERE condition NOT IN ('sunny', 'cloudy'); (Option A). This query selects the desired columns from the "weather" table and filters the rows where the "condition" is not "sunny" or "cloudy." This way, you'll get the information for cities with conditions other than "sunny" or "cloudy."

This Question Belongs to SQL >> Sql Miscellaneous

Join The Discussion

Related Questions on Sql Miscellaneous