Chapter 11 code/listing formatting

This commit is contained in:
anthonydb 2021-08-20 15:12:22 -04:00
parent f9072555df
commit 4179793a4e
2 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -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