Oracle SQL - Write SQL to select cities where the temperature is greater than 80, and show them in order by increasing temperature

Requirements

Here is the table

Demo

SQL>
SQL> drop table Report;

Table dropped.--   w  w w.ja va2 s.  c  o m

SQL> create table Report (
  2  City         VARCHAR2(11),
  3  Temperature  NUMBER,
  4  Humidity     NUMBER,
  5  Condition    VARCHAR2(9)
  6  );
SQL>
SQL> insert into Report values ('BOOK2S.COM',89,98,'CLEAR');
SQL> insert into Report values ('ROME',45,79,'RAIN');
SQL> insert into Report values ('PARIS',81,62,'CLOUDY');
SQL> insert into Report values ('MANCHESTER',66,98,'FOG');
SQL> insert into Report values ('ATHENS',97,89,'SUNNY');
SQL> insert into Report values ('CHICAGO',66,88,'RAIN');
SQL> insert into Report values ('SYDNEY',69,99,'SUNNY');
SQL> insert into Report values ('SPARTA',74,63,'CLOUDY');
SQL> insert into Report values ('BEIJING',104,83,'SMOG');
SQL> insert into Report values ('NEW YORK',100,93,'SUNNY');
SQL>

Write SQL to select cities where the temperature is greater than 80, and show them in order by increasing temperature

You can combine the where and order by keywords.

Demo

SQL>
SQL> select City, Temperature from Report
  2  where Temperature > 80-- from w ww.j  a v  a  2  s  .c o  m
  3  order by Temperature ;

CITY        TEMPERATURE
----------- -----------
PARIS                81
BOOK2S.COM           89
ATHENS               97
NEW YORK            100
BEIJING             104

SQL>