Question: Using this as a reference, what code would I use to answer these questions? What is the weighed average level of competitiveness (HHI) by state

Using this as a reference, what code would I use to answerUsing this as a reference, what code would I use to answer these questions?

What is the weighed average level of competitiveness (HHI) by state in 2012?

What is least competitive state (highest number - state two letter short name)?

What is the weighted average level of agglomeration (7) by state in 2012? SELECT SUM(mytable.WA) AS weightedAverage, mytable.state AS state, mytable.year As year FROM SELECT StateData.Stateshort AS state, StateData.DataYear As year, ((StateData.ExpEmpValue/Totalstate Emp. TotalEmp) *Gamma. Gamma) AS WA FROM StateData JOIN SELECT SUM(StateData.ExpEmpValue) AS TotalEmp, StateData.StateShort AS state FROM StateData WHERE StateData.DataYear=2012 AND StateData. IndustryCodeLength=6 GROUP BY StateData.Stateshort ) AS TotalstateEmp ON StateData.Stateshort-TotalStateEmp.state JOIN Gamma ON Gamma. IndustryCode=StateData. IndustryCode AND Gamma.DataYear=StateData.DataYear WHERE StateData.DataYear=2012 AND StateData. Industry CodeLength=6 ) AS mytable GROUP BY mytable.state, mytable.year What is the weighted average level of agglomeration (7) by state in 2012? SELECT SUM(mytable.WA) AS weightedAverage, mytable.state AS state, mytable.year As year FROM SELECT StateData.Stateshort AS state, StateData.DataYear As year, ((StateData.ExpEmpValue/Totalstate Emp. TotalEmp) *Gamma. Gamma) AS WA FROM StateData JOIN SELECT SUM(StateData.ExpEmpValue) AS TotalEmp, StateData.StateShort AS state FROM StateData WHERE StateData.DataYear=2012 AND StateData. IndustryCodeLength=6 GROUP BY StateData.Stateshort ) AS TotalstateEmp ON StateData.Stateshort-TotalStateEmp.state JOIN Gamma ON Gamma. IndustryCode=StateData. IndustryCode AND Gamma.DataYear=StateData.DataYear WHERE StateData.DataYear=2012 AND StateData. Industry CodeLength=6 ) AS mytable GROUP BY mytable.state, mytable.year

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!