Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the join queries for the database described in the attached documents. The

ID: 3904260 • Letter: W

Question

Write the join queries for the database described in the attached documents.
The assignment directions are contained in the following pdf file named Word SQL Assignment:

Write the join queries for the database described in the attached documents.
The assignment directions are contained in the following pdf file named Word SQL Assignment:

Multi-table query assignment. Due 3-22-13 Create SQL queries to extract the following from the tables, whose metadata is shown. Table: city column name data type size notes about the data Number Text Text Text Number ID 11 City ld Code (primary ke 35 Name of name count 3 Country Code foreign Key to Country(Code) District Population 20 Table: country column name data type size notes about the data Country Code (primary ke street address Asia, Europe, North America, Africa Oceania, Antarctica, South America Code Text Name Text 52 Continent SurfaceArea IndepYear Population Text Text number Number Number 13 26 10,2 6 Year of independence LifeExpectancy Number (3,1) Number(10,2) Number(10,2) GNP GNPOld LocalName GovermentForm HeadOfState Capital Code2 Text Text Text Number Text 45 45 60 11 foreign Key to City (ID) Table: countrylanguage column name data type size notes about the data Country Code (primary key) foreign Key 3 to Country Code 30 Language (primary key) CountryCode Text Text Text Number Language IsOfficial Official Language (T or F) Percenta

Explanation / Answer

If you have any doubts, please give me comment...

--1)

SELECT Continent, C.Name, District, CT.name, Population

FROM country C, city CT

WHERE C.Code = CT.countryCode AND Population>300000

ORDER BY Continent, C.Name, District, CT.name;

-- 2)

SELECT C.Name, Percentage, Population

FROM country C, countrylanguage CL

WHERE C.Code = CL.CountryCode AND IsOfficial = 'T' AND Language ='English'

ORDER BY Percentage, C.Name ASC;

-- 3)

SELECT LifeExpectancy, Population, Name, HeadOfState, Language

FROM country C, countrylanguage CL

WHERE C.Code = CL.CountryCode AND IsOfficial = 'T' AND POPULATION>100000000

ORDER BY LifeExpectancy, Population;

-- 4)

SELECT C.Name, CT.name

FROM country C, city CT

WHERE C.Code = CT.countryCode AND SurfaceArea < 2000000;

-- 5)

SELECT C.Name, IndepYear, CT.Name, Language, Percentage

FROM country C, city CT, countrylanguage CL

WHERE C.Code = CL.CountryCode AND C.Code = CT.countryCode AND IndepYear>1991

ORDER BY C.Name ASC, Percentage DESC;