From 4179793a4e0a63d6ae10ecf0c17e883046bece7a Mon Sep 17 00:00:00 2001 From: anthonydb Date: Fri, 20 Aug 2021 15:12:22 -0400 Subject: [PATCH] Chapter 11 code/listing formatting --- Chapter_11/Chapter_11.sql | 4 ++-- Try_It_Yourself/Try_It_Yourself.sql | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Chapter_11/Chapter_11.sql b/Chapter_11/Chapter_11.sql index dd1f44f..49d415b 100644 --- a/Chapter_11/Chapter_11.sql +++ b/Chapter_11/Chapter_11.sql @@ -5,7 +5,7 @@ -- Chapter 11 Code Examples ---------------------------------------------------------------------------- --- Listing 11-1: Create Census 2014-2018 ACS 5-Year stats table and import data +-- Listing 11-1: Creating the census 2014-2018 ACS 5-Year Estimates stats table and importing data CREATE TABLE acs_2014_2018_stats ( geoid text CONSTRAINT geoid_key PRIMARY KEY, @@ -72,7 +72,7 @@ FROM acs_2014_2018_stats; SELECT stddev_pop(median_hh_income) FROM acs_2014_2018_stats; --- Listing 11-6: The rank() and dense_rank() window functions +-- Listing 11-6: Using the rank() and dense_rank() window functions CREATE TABLE widget_companies ( id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY, diff --git a/Try_It_Yourself/Try_It_Yourself.sql b/Try_It_Yourself/Try_It_Yourself.sql index eb7c540..ca60677 100644 --- a/Try_It_Yourself/Try_It_Yourself.sql +++ b/Try_It_Yourself/Try_It_Yourself.sql @@ -668,9 +668,9 @@ WHERE meat_processing = TRUE AND -- 1. In Listing 11-2, the correlation coefficient, or r value, of the -- variables pct_bachelors_higher and median_hh_income was about .70. --- Write a query to show the correlation between pct_masters_higher and --- median_hh_income. Is the r value higher or lower? What might explain --- the difference? +-- Write a query using the same dataset to show the correlation between +-- pct_masters_higher and median_hh_income. Is the r value higher or lower? +-- What might explain the difference? -- Answer: -- The r value of pct_bachelors_higher and median_hh_income is about .60, which