SQL Web
SQL Web
ID CITY STATE
13 Phoenix AZ
44 Denver CO
66 Caribou ME
ID CITY STATE
44 Denver CO
66 Caribou ME
populate the table STATS with some statistics for January and July:
query to look at the table STATS, ordered by month and greatest rainfall, with
columns rearranged:
query to look at temperatures for July from table STATS, lowest temperatures
first, picking up city name and latitude by joining with table STATION on the ID
column:
query to show MAX and MIN temperatures as well as average rainfall for each
station:
query to look at table STATS in a metric light (through the new view):
update one row, Denver's July temperature reading, to correct a data entry
error:
COMMIT WORK;
Oops! We meant to update just the July reading! Undo that update:
-- undoes only updates since the last COMMIT WORK.
ROLLBACK WORK;
COMMIT WORK;
delete July data and East Coast data from both tables:
-- note that we use longitude values from the related STATION table to determine
which STAT stations were east of 90 degrees.
COMMIT WORK;