Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* A - Querying tables city and country:*/ /* 1 - Using INNER JOIN ..ON, write a query that displays the name of cities,
* A - Querying tables city and country:*/ /* 1 - Using INNER JOIN ..ON, write a query that displays the name of cities, the cities' population and cities' continent. Sort the result by continent, then by city population, then by city name. Note that the field called 'name' is present in the two tables, use a table alias to resolve the conflict. */ /* 2 - Rewrite the previous query using WHERE/FROM instead of INNER JOIN. */ /* 3 - Rewrite the query in question 1 to countries that became independent in 1960. */ /* 4 - Rewrite the previous query using WHERE/FROM instead of INNER JOIN. */ /* 5 - Using INNER JOIN ..ON, write a query that displays, for the city of Ottawa, the name of the city and the head of state of its country. */ /* 6 - Using INNER JOIN ..ON, write a query that displays the name of the city, the city population, the continent, and the country population of the city of Toronto. */ /* B - Querying tables city and countryLanguage:*/ /* 1 - Using INNER JOIN ..ON, write a query that answers the following question. What languages along with their percentage are spoken in the city of Ottawa? */ /* 2 - Using WHERE/FROM, write a query that answers the following question. What official languages along with their percentage are spoken in the city of Ottawa? */ /* 3 - Using INNER JOIN ..ON, write a query that reports the percentage of people speaking an official language in the city of Ottawa as well as the percentage of people speaking Polish in the city of Ottawa */ /* 4 Using INNER JOIN ..ON and SUM, write a query that reports the total percentage of people speaking an official language as well as speaking Italian in the city of Ottawa */ /* C - Querying tables city, country and countryLanguage:*/ /* 1 - Using INNER JOIN ..ON the three tables, write a query that displays the name of the city, the city continent, the city head of state, the year of independence and the total number of people who speak Italian in the city of Toronto. */ /* 2 - Rewrite the previous query using WHERE/FROM instead of INNER JOIN. */ /* 3 - Using LEFT JOIN ..ON the three tables, write a query that displays the city continent, the country the city is in, the city name and the language spoken in that city */ Note: Try to solve those questions in DataGrip. Program: Database System - CST8260
Step by Step Solution
★★★★★
3.51 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
Certainly Here are the queries for each question A Querying tables city and country 1 Using INNER JOINON sql SELECT cityname AS cityname citypopulation AS citypopulation countrycontinent FROM city INN...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