Closed simonw closed 4 years ago
date | county | state | fips | cases | deaths | population | deaths_per_million | cases_per_million |
---|---|---|---|---|---|---|---|---|
2020-07-14 | Hancock | Georgia | 13141 | 236 | 33 | 8457 | 3902 | 27905 |
2020-07-14 | Randolph | Georgia | 13243 | 212 | 25 | 6778 | 3688 | 31277 |
2020-07-14 | Terrell | Georgia | 13273 | 249 | 28 | 8531 | 3282 | 29187 |
2020-07-14 | Early | Georgia | 13099 | 313 | 31 | 10190 | 3042 | 30716 |
2020-07-14 | Emporia city | Virginia | 51595 | 146 | 15 | 5346 | 2805 | 27310 |
2020-07-14 | McKinley | New Mexico | 35031 | 3679 | 192 | 71367 | 2690 | 51550 |
2020-07-14 | Neshoba | Mississippi | 28099 | 1050 | 77 | 29118 | 2644 | 36060 |
2020-07-14 | Essex | New Jersey | 34013 | 19307 | 2078 | 798975 | 2600 | 24164 |
2020-07-14 | Lowndes | Alabama | 1085 | 502 | 25 | 9726 | 2570 | 51614 |
I'll call this view latest_ny_times_counties_with_populations
create view
latest_ny_times_counties_with_populations as
select
ny_times_us_counties.date,
ny_times_us_counties.county,
ny_times_us_counties.state,
ny_times_us_counties.fips,
ny_times_us_counties.cases,
ny_times_us_counties.deaths,
us_census_county_populations_2019.population,
1000000 * ny_times_us_counties.deaths / us_census_county_populations_2019.population as deaths_per_million,
1000000 * ny_times_us_counties.cases / us_census_county_populations_2019.population as cases_per_million
from
ny_times_us_counties
join us_census_county_populations_2019 on ny_times_us_counties.fips = us_census_county_populations_2019.fips
where
"date" = (
select
max(date)
from
ny_times_us_counties
)
order by
deaths_per_million desc