MoL Chapter 8 Lab

From SQLZOO
Revision as of 14:41, 22 December 2015 by Andr3w (talk | contribs)
Jump to: navigation, search
List all details from the weather table for stornoway for 1887 so that you can see the NULL value
SELECT *
  FROM weather
 WHERE station='stornoway' AND yr=1892
SELECT *
  FROM weather
 WHERE station='stornoway' AND yr=1892
What output do you expect from this query? Notice that some values are missing in the tmin column for this year and station.
SELECT COUNT(tmin), COUNT(tmax)
  FROM weather
 WHERE station='stornoway' AND yr=1892
SELECT COUNT(tmin), COUNT(tmax)
  FROM weather
 WHERE station='stornoway' AND yr=1892