Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a report that shows all the cities in the world that start with S , where Spanish is the official language and

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
Tables included: City, Country, and Country language
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

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions