Minor edits during proofreading
This commit is contained in:
parent
0d72bde2b7
commit
ff18e687e3
@ -5,7 +5,7 @@
|
|||||||
-- Chapter 11 Code Examples
|
-- Chapter 11 Code Examples
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Listing 11-1: Creating the census 2014-2018 ACS 5-Year Estimates stats table and importing data
|
-- Listing 11-1: Creating a 2014-2018 ACS 5-Year Estimates table and importing data
|
||||||
|
|
||||||
CREATE TABLE acs_2014_2018_stats (
|
CREATE TABLE acs_2014_2018_stats (
|
||||||
geoid text CONSTRAINT geoid_key PRIMARY KEY,
|
geoid text CONSTRAINT geoid_key PRIMARY KEY,
|
||||||
|
|||||||
@ -606,16 +606,18 @@ WHERE pls16.fscskey IS NULL OR pls17.fscskey IS NULL;
|
|||||||
-- Chapter 10: Inspecting and Modifying Data
|
-- Chapter 10: Inspecting and Modifying Data
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
-- In this exercise, you’ll turn the meat_poultry_egg_inspect table into useful
|
-- In this exercise, you’ll turn the meat_poultry_egg_establishments table
|
||||||
-- information. You needed to answer two questions: How many of the companies
|
-- into useful information. You need to answer two questions: How many
|
||||||
-- in the table process meat, and how many process poultry?
|
-- of the companies in the table process meat, and how many process poultry?
|
||||||
|
|
||||||
-- Create two new columns called meat_processing and poultry_processing. Each
|
-- Your tasks are as follows:
|
||||||
|
|
||||||
|
-- 1. Create two new columns called meat_processing and poultry_processing. Each
|
||||||
-- can be of the type boolean.
|
-- can be of the type boolean.
|
||||||
|
|
||||||
-- Using UPDATE, set meat_processing = TRUE on any row where the activities
|
-- 2. Using UPDATE, set meat_processing = TRUE on any row where the activities
|
||||||
-- column contains the text 'Meat Processing'. Do the same update on the
|
-- column contains the text 'Meat Processing'. Do the same update on the
|
||||||
-- poultry_processing column, but this time lookup for the text
|
-- poultry_processing column, but this time look for the text
|
||||||
-- 'Poultry Processing' in activities.
|
-- 'Poultry Processing' in activities.
|
||||||
|
|
||||||
-- Use the data from the new, updated columns to count how many companies
|
-- Use the data from the new, updated columns to count how many companies
|
||||||
@ -657,7 +659,7 @@ WHERE meat_processing = TRUE AND
|
|||||||
poultry_processing = TRUE;
|
poultry_processing = TRUE;
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- Chapter 11: Creating Your First Database and Table
|
-- Chapter 11: Statistical Functions in SQL
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
-- 1. In Listing 11-2, the correlation coefficient, or r value, of the
|
-- 1. In Listing 11-2, the correlation coefficient, or r value, of the
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user