sql hw
/* Assume that three tables, namely country, city and river, has been created and populated. */ /* Oracle SQL Queries. */ /* Query numbers refer to those in the book & slides*/ /* Query1: list all the cities and the country they belong to in the CITY table */ /* Query2: List the names of the capital cities in the CITY table */ /* Query3: List the attributes of countries in the country relation where the life-expectancy is less than 70 years */ /* Query4: List the capital cities and populations of countries whose gdp exceeds one trillion dollars */ /* Query5: What is the name and population of the capitakl city in the country where the St. Lawrence river originates */ /* this join among 3 tables */ /* Query6: What is the average population of the noncapital cities listed in city table? */ /* Query7: for each continent, find the average gdp */ /* introduction of group by */ /* country table is operated in 2 separate tables */ /* Query8: for each country in which at least two rivers originate, find the length of the smallest river */ /* having clause is introduced. */ /* Query9: list the countries whose gdp is greater than that of Canada */