Q36
Find the name of cities with all entries whose temperature is in the range of 71 and 89
A.
SELECT * FROM weather WHERE temperature NOT IN (71 to 89);
B.
SELECT * FROM weather WHERE temperature NOT IN (71 and 89);
C.
SELECT * FROM weather WHERE temperature NOT BETWEEN 71 to 89;
D.
SELECT * FROM weather WHERE temperature BETWEEN 71 AND 89;
AnswerAnswer: Option D
Solution
Answer: Option D
Solution:
To retrieve the names of cities with entries where the temperature falls within the range of 71 to 89, you should use the SQL query SELECT * FROM weather WHERE temperature BETWEEN 71 AND 89; (Option D). This query utilizes the BETWEEN operator to specify the temperature range. It selects all entries in the "weather" table where the temperature is within the specified range. Option D is the correct choice for achieving this result.