Question: SQL Sum the children in grades 1-8 by state and county in 2018. In the results, include the state name, county name, and total children

SQL

Sum the children in grades 1-8 by state and county in 2018. In the results, include the state name, county name, and total children in grades 1-8. When joining the tables, set the census data table as the "left table" and only select matching records between the two tables. Finally, order by the state name and county name alphabetically -- and only include counties with at least 100,000 children in these grades. Based on the query results, how many children in grades 1-8 lived in Maricopa County, Arizona in 2018?

SQL Sum the children in grades 1-8 by state and county in

2018. In the results, include the state name, county name, and total

children in grades 1-8. When joining the tables, set the census data

CHILDREN NUMBER (38,), CHILDREN_IN_GRADES_1_TO_4 NUMBER(38,0), CHILDREN_IN_GRADES_5_TO_8 NUMBER (38,0), CHILDREN_IN_GRADES_9_TO_12 NUMBER (38,0), FAMILIES_WITH_YOUNG_CHILDREN NUMBER (38,), FAMILIES_WITH_YOUNG_CHILDREN_TWO_PARENTS NUMBER (38,0), FAMILIES_WITH_YOUNG_CHILDREN_ONE_PARENT NUMBER (38,0), \[ \text { ZIP_CODES } \quad 30.3 \mathrm{~K} \text { Rows } Q \quad \cdots \] Aa ZIP_CODE VARCHAR(5) Aa CITY VARCHAR(1500) Aa COUNTY VARCHAR(255) Aa STATE_CODE VARCHAR(2) Aa STATE_NAME VARCHAR(255) 123 AREA_LAND_METERS NUMBER(38,0) 123 INTERNAL_POINT_LAT NUMBER(11,7) 123 INTERNAL_POINT_LON NUMBER(11,7) Ereate or replace TABLE CENSUS.PUBLIC.CENSUS_BY_ZIP_CODE ( ZIP_CODE VARCHAR (5) NOT NULL, REPORTING_YEAR NUMBER (38,), HOUSEHOLDS NUMBER (38,), POPULATION_TOTAL NUMBER (38,), POPULATION_MALE NUMBER (38,), POPULATION_FEMALE NUMBER (38,) MEDIAN_AGE NUMBER (3,1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!