Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- - 8 . Notice that in this database cities are grouped in districts not states. This is because many countries don't have states, they

--8. Notice that in this database cities are grouped in "districts" not states. This is because many countries don't have states, they have provinces or some other subdivisions.
Write a report that shows all the cities in the world that start with "S", where Spanish is the official language and only list cities that are the capital of its country.
Include the name of the city, the population of the city, the name of the country, the population of the country, the district the city is in, and the official language.
Notice the column in the country table called capital. This is how the database lists the capital of each country so the join between city and country tables will need two conditions. Also remember that the IsOfficial flag in the countrylanguage table is either true, or false, ("T" or "F")". Given database: world Table: city, Country, and countrylanguage.
City columns: ID, Name, Countrycode, District, population
Country Columns: Code, Name, Continent, Region, Surfacearea, IndepYear, population, lifeexpectancy, GNP, GNPold, LocalName, GovernmentForm, HeadofState, Capital, Code2.
CountryLanguage columns; Countrycode, language, isofficial, percentage.

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago