Question: Database name : ca_pop Table name : educational_attainment Columns : Year | Age | Gender | Educational Attainment | Personal Income | Population Count Table
Database name: ca_pop
Table name: educational_attainment
Columns: Year | Age | Gender | Educational Attainment | Personal Income | Population Count
Table name: pop_proj
Columns: fips | county | year | age | pop_female | pop_male | pop_total |
I wrote the following query to find out the total population in each age group from pop_proj.
?(Step 6 query) select pop_total, age
from pop_proj
group by age
Now i need a query to do the task below:
Use the query from Step 6 as a subquery to find each type of education attained by the population in that age group and the fraction of the population of that age group that has that educational attainment. Label the fraction column output as coefficient. For instance, the fraction of the population in age group 00 - 17 who has an education attainment of Bachelor's degree or higher is 0.0015, which is the coefficient. I'm using MySQL Workbench
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
