Question: Need some help with these sql codes, I am thinking i need to use code in for both but cant seem to get them to

Need some help with these sql codes, I am thinking i need to use "code in" for both but cant seem to get them to work

heres what i have for both right now

4.

SELECT CountryCode, Name, District, Population From World.city WHERE CODE IN( SELECT CountryCode From countrylanguage Where Language = 'English' and Population > 1000000 ) order by Population desc

5.

Select Name, Region, Population, LifeExpectancy From world.country WHERE CODE IN( SELECT CountryCode From countrylanguage Where Language = 'English' and Population > 1000000 )

Need some help with these sql codes, I am thinking i need

4. In the "world" schema, the "city" table contains data about cities around the world. Write an SQL SELECT statement that will return the following: city.CountryCode, city. Name, city.District, city.Population. Indude only those cities where the population density per square mile of the country is greater than 750 and the life expectancy is less than 60 . Sort in order by descending population. The result set should look like the below figure. 5. Write an SQL SELECT statement that will return the following from the country table: Name, Region, Population, LifeExpectancy. Include only those countries where English is the official language and the population is greater than 1 million. Hint: You are displaying the results for the 'country' table, based on a condition from the 'countryLanguage' table. You will need to use an embedded SELECT (see video Session 6 Part 3)

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!