Question: im trying to figure out sqlite here is the table im working with CREATE TABLE states ( year INTEGER , name TEXT , geo_id TEXT

im trying to figure out sqlite here is the table im working with

CREATE TABLE states (

year INTEGER ,

name TEXT ,

geo_id TEXT ,

total_population INTEGER ,

white INTEGER ,

black INTEGER ,

hispanic INTEGER ,

asian INTEGER ,

american_indian INTEGER ,

pacific_islander INTEGER ,

other_race INTEGER ,

median_age FLOAT ,

total_households INTEGER ,

owner_occupied_homes_median_value INTEGER ,

per_capita_income INTEGER ,

median_household_income INTEGER ,

below_poverty_line INTEGER,

foreign_born_population INTEGER,

state TEXT

);

here is what i need.

--Find the number of states listed in the database.

--Find the total population of the country, i.e., the sum of the population of

--each state.

-- Find the 10 states with the youngest median ages.

-- Find the 10 states with the oldest median ages.

-- Find the states where a minority of residents are white.

-- List the states from most populous to least populous.

-- Find the 10 states with the most expensive median house price.

-- Find the 10 states with the most expensive house prices compared to income,

-- i.e., that minimize the ratio of

-- median_household_income : owner_occupied_homes_median_value.

this is the expected outcomes.

im trying to figure out sqlite here is the table im workingwith CREATE TABLE states ( year INTEGER , name TEXT , geo_idTEXT , total_population INTEGER , white INTEGER , black INTEGER , hispanic

| states_count | | 52 | total population | 324893003 name | median_age | | Utah | 30.6 | Alaska | 33.3 | District of Columbia | 33.8 | Texas | 34.4 | North Dakota | 34.9 | Idaho | 35.8 | Nebraska | 36.1 | California | 36.2 | Kansas | 36.2 | Oklahoma | 36.3 | name | median_age | | Maine | 44.6 | Vermont | 43.1 | New Hampshire | 42.8 | West Virginia | 42.2 | Florida | 41.8 | Pennsylvania | 40.7 | Connecticut | 40.6 | Puerto Rico | 40.0 | Montana | 39.9 | Delaware | 39.7 I. | name | total_population | white | California | 39144818 | Texas | 27469114 | Puerto Rico | 3474182 | New Mexico | 2085109 | Hawaii | 1431603 | District of Columbia | 672228 | 14815122 | | 11795062 | 26431 | 798109 | 326152 | 241855 name | owner_occupied_homes_median_value | Hawaii | 566900 | District of Columbia | 551300 | California 1449100 | Massachusetts | 352100 | New Jersey | 322600 | Maryland | 299800 | New York | 293500 | Washington | 284000 | Colorado 283800 | Connecticut | 270900 | name | median_household income owner_occupied_homes_median_value | | Hawaii | 73486 | District of Columbia | 75628 | California | 64500 | Puerto Rico | 18626 | Massachusetts | 70628 | Oregon | 54148 | New York | 60850 | New Jersey | 72222 | Colorado | 63909 | Washington | 64129 566900 551300 | 449100 114100 352100 | 264100 | 293500 322600 | 283800 | 284000

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!