Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question: Would anyone want to complete this in a 2-3 hour written lesson? Comme

ID: 3744995 • Letter: Q

Question

Question: Would anyone want to complete this in a 2-3 hour written lesson? Comment and I will reach out. Da... Would anyone want to complete this in a 2-3 hour written lesson? Comment and I will reach out. Database Design and Analysis The following database project will create an educational attainment “demand” forecast for the state of California for years greater than 2010. The demand forecast is the expected number of population who have obtained a certain level of education. The population is divided into age groups and education attainment is divided into different levels. The population of each group is estimated for each year up to year 2050. Implement the following steps to obtain and educational demand forecast for the state of California. The files can be downloaded below. Create a ca_pop schema in your MySQL database. Using your ca_pop schema, create an educational_attainment table which columns match the columns in the Excel spreadsheet ca_pop_educational_attainment.csv. Using your ca_pop schema, create a pop_proj table which columns match the columns in the Excel spreadsheet pop_proj_1970_2050.csv. Using the data loading technique for a csv file you learned in Module 1, load the data in ca_pop_educational_attainment.csv into the table educational_attainment. Using the data loading technique for a csv file you learned in Module 1, load the data in pop_proj_1970_2050.csv into the table pop_proj. Write a query to select the total population in each age group. 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. Create a demographics table from the SQL query from Step 7. Create a query on the pop_proj table which shows the population count by date_year and age. Use that query from Step 9 as a subquery and join it to the demographics table using the following case statement: demographics.age = case when temp_pop.age < 18 then '00 to 17' when temp_pop.age > 64 then '65 to 80+' else '18 to 64' end “temp_pop” is an alias for the subquery. Use the following calculation for the demand output: round(sum(temp_pop.total_pop * demographics.coefficient)) as demand Output the demand grouped by year and education level. Write each query you used in Steps 1 – 10 in a text file. If a query produced a result set, the list then first ten rows of each row set after the query. Bundle your lessons learned report and your query results text file into a single zip file and submit that zip file as your final portfolio. Thanks

Explanation / Answer

step 1: create database ca_pop;

step 2:create table educational_attainment(col1 datatype,col2 datatype2,....PRIMARY KEY(col));

//col1,col2 are columns in csv file.

step 3:Load the data from csv file to table using module1 technique as specified(you can use pandas in python for this)

step 4:select total_population from educational_attainment group by age_group;

step 5:select education_attained from educational_attainment where in (:select total_population from educational_attainment group by age_group) as coefficient;

step 6:create table pop_proj (coefficient float);

step 7:insert into pop_proj VALUES (select  population from  educational_attainment where 0<=age_group<=17 and coefficient>0.0015);

step 8:query=select * from pop_proj order by date_year and age;

step 9: select  * from pop_proj order by date_year and age full outer join on {CASE WHEN emp_pop.age < 18 then (00 - 17)when temp_pop.age > 64 then '65 to 80+' else '18 to 64' end “temp_pop” endl;

step 10:demand_output=round(sum(temp_pop.total_pop * demographics.coefficient));

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote