Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have the following line of code which shows me percent change in US county population from 2000 to 2010. I need a percentile_cont formula

I have the following line of code which shows me percent change in US county population from 2000 to 2010. I need a percentile_cont formula to determine median of the percent change in county population overall. This is the code i am using to get the percent changes:

SELECT c2010.geo_name, c2010.state_us_abbreviation AS state, c2010.p0010001 AS pop_2010, c2000.p0010001 AS pop_2000, c2010.p0010001 - c2000.p0010001 AS raw_change, round( (CAST(c2010.p0010001 AS numeric(8,1)) - c2000.p0010001)/ c2000.p0010001 * 100, 1 ) AS pct_change FROM us_counties_2010 c2010 INNER JOIN us_counties_2000 c2000 ON c2010.state_fips = c2000.state_fips AND c2010.county_fips = c2000.county_fips AND c2010.p0010001 <> c2000.p0010001 ORDER BY pct_change DESC;

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago