Minor edits during proofreading
This commit is contained in:
parent
946dc77407
commit
14795ecd35
@ -36,7 +36,7 @@ SELECT (7 + 8) * 9; -- answer: 135
|
|||||||
SELECT 3 ^ 3 - 1; -- answer: 26
|
SELECT 3 ^ 3 - 1; -- answer: 26
|
||||||
SELECT 3 ^ (3 - 1); -- answer: 9
|
SELECT 3 ^ (3 - 1); -- answer: 9
|
||||||
|
|
||||||
-- Listing 6-4: Selecting Census population estimate columns with aliases
|
-- Listing 6-4: Selecting census population estimate columns with aliases
|
||||||
|
|
||||||
SELECT county_name AS county,
|
SELECT county_name AS county,
|
||||||
state_name AS state,
|
state_name AS state,
|
||||||
@ -60,7 +60,7 @@ SELECT county_name AS county,
|
|||||||
FROM us_counties_pop_est_2019
|
FROM us_counties_pop_est_2019
|
||||||
ORDER BY state_name, county_name;
|
ORDER BY state_name, county_name;
|
||||||
|
|
||||||
-- Listing 6-6: Checking Census data totals
|
-- Listing 6-6: Checking census data totals
|
||||||
|
|
||||||
SELECT county_name AS county,
|
SELECT county_name AS county,
|
||||||
state_name AS state,
|
state_name AS state,
|
||||||
@ -104,7 +104,7 @@ SELECT department,
|
|||||||
spend_2019,
|
spend_2019,
|
||||||
spend_2022,
|
spend_2022,
|
||||||
round( (spend_2022 - spend_2019) /
|
round( (spend_2022 - spend_2019) /
|
||||||
spend_2019 * 100, 1 ) AS pct_change
|
spend_2019 * 100, 1) AS pct_change
|
||||||
FROM percent_change;
|
FROM percent_change;
|
||||||
|
|
||||||
-- Listing 6-9: Using the sum() and avg() aggregate functions
|
-- Listing 6-9: Using the sum() and avg() aggregate functions
|
||||||
|
|||||||
@ -167,7 +167,7 @@ SELECT CAST('4//2021' AS timestamp with time zone);
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
-- 1. Write a WITH statement to include with COPY to handle the import of an
|
-- 1. Write a WITH statement to include with COPY to handle the import of an
|
||||||
-- imaginary text file that has a first couple of rows that look like this:
|
-- imaginary text file whose first couple of rows look like this:
|
||||||
|
|
||||||
id:movie:actor
|
id:movie:actor
|
||||||
50:#Mission: Impossible#:Tom Cruise
|
50:#Mission: Impossible#:Tom Cruise
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user