Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to create a subquery and join in Mysql workbench. Use query from Step 9 as a subquery and join it to the demographics

I need to create a subquery and join in Mysql workbench.

Use 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.

Step 9 query:

select year, age, pop_total from pop_proj

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

Add code to Insertion to produce the trace given in the text.

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago