Vidyalelo
SQL · Q28

SQL

Programming · SQL · question 28

Q28

Find the temperature in increasing order of all cities, Table Name 'weather'

A.
SELECT city FROM weather ORDER BY temperature;
B.
SELECT city, temperature FROM weather;
C.
SELECT city, temperature FROM weather ORDER BY temperature;
Answer
D.
SELECT city, temperature FROM weather ORDER BY city;

Answer: Option C

Solution

Answer: Option C
Solution:
To retrieve the temperature of all cities in increasing order, you should use the SQL query SELECT city, temperature FROM weather ORDER BY temperature; (Option C). This query selects both the "city" and "temperature" columns from the "weather" table and arranges the result set in ascending order based on the "temperature" column. As a result, you'll get the temperature values for all cities listed from the lowest to the highest temperature.