Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3: SQL queries Consider two relation instances below, with the following schemas y (country name, continent); City (city name, country name, isCapital, population). For
Problem 3: SQL queries Consider two relation instances below, with the following schemas y (country name, continent); City (city name, country name, isCapital, population). For each question (a)-(c) below, write a SQL query and show (copy and paste) the returned result when the query is executed in the Oracle system. Country Country Name Continent US Canada England German France Mali North America North America Euro Europe Europe Africa City isCapital Population City Name New York, NY Washin Philadelphia, PA Ottawa Toronto Berlin Hambu Country Name US US US Canada Canada Germ Germ 8,000,000 600,000 1,500,000 800,000 2,500,000 3,500,000 2,000,000 no DC no no no Bonn Paris Germa France France Mali Mali Mali 300,000 2,000,000 700,000 2,000,000 50,000 100,000 no no Bamak Timbuktu Mo no no (a) List the average population and number of all European cities with population of more than 600,000. (b) Identify the city with largest population for each country. List its country name, and the population (c) For each country, list its name and belonging continent, along with its total population that is over 1 million. Also sort the result by the total population in descending order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started