diff --git a/Chapter_11/Chapter_11.sql b/Chapter_11/Chapter_11.sql index 49d415b..9ddae9d 100644 --- a/Chapter_11/Chapter_11.sql +++ b/Chapter_11/Chapter_11.sql @@ -5,7 +5,7 @@ -- 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 ( geoid text CONSTRAINT geoid_key PRIMARY KEY, diff --git a/Try_It_Yourself/Try_It_Yourself.sql b/Try_It_Yourself/Try_It_Yourself.sql index a18399e..8115853 100644 --- a/Try_It_Yourself/Try_It_Yourself.sql +++ b/Try_It_Yourself/Try_It_Yourself.sql @@ -606,16 +606,18 @@ WHERE pls16.fscskey IS NULL OR pls17.fscskey IS NULL; -- Chapter 10: Inspecting and Modifying Data -------------------------------------------------------------- --- In this exercise, you’ll turn the meat_poultry_egg_inspect table into useful --- information. You needed to answer two questions: How many of the companies --- in the table process meat, and how many process poultry? +-- In this exercise, you’ll turn the meat_poultry_egg_establishments table +-- into useful information. You need to answer two questions: How many +-- 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. --- 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 --- poultry_processing column, but this time lookup for the text +-- poultry_processing column, but this time look for the text -- 'Poultry Processing' in activities. -- 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; ---------------------------------------------------------------------------- --- 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