EXERCICE 1.4 : SELECT Name FROM COUNTRY WHERE Continent = 'Asia' ORDER BY SurfaceArea DESC LIMIT 10; SELECT Name, IndepYear, LifeExpectancy FROM COUNTRY ORDER BY LifeExpectancy DESC LIMIT 10; SELECT Language FROM countrylanguage WHERE CountryCode = 'FRA' AND IsOfficial = 0 ORDER BY Percentage ASC; SELECT * FROM country ORDER BY Population/SurfaceArea ASC LIMIT 5; EXERCICE 1.6: SELECT country.NAME FROM country JOIN countrylanguage ON country.Code = CountryCode WHERE Language = 'French' and IsOfficial = 1 ; SELECT city.name FROM city JOIN country ON CountryCode = Code WHERE Continent = 'Europe' ORDER BY city.population DESC LIMIT 5; SELECT city.name FROM city JOIN country ON CountryCode = Code WHERE Continent = 'Europe' and Capital != ID ORDER BY city.population DESC LIMIT 5; SELECT city.name FROM city JOIN countrylanguage ON city.CountryCode = countrylanguage.CountryCode JOIN country ON city.CountryCode = country.Code WHERE Language = 'German' and IsOfficial = 1 and Capital = ID; ou SELECT city.name FROM city JOIN countrylanguage ON city.CountryCode = countrylanguage.CountryCode JOIN country ON city.ID = country.Capital WHERE Language = 'German' and IsOfficial = 1; EXERCICE 1.7: SELECT Name FROM country WHERE LifeExpectancy >= (SELECT LifeExpectancy FROM country WHERE Code = 'FRA'); SELECT COUNT(*)*1.0 / (SELECT COUNT(*) from country) from country WHERE GNP > (SELECT AVG(GNP) from country) EXERCICE 1.9 SELECT Name, Population from City WHERE Population = (SELECT MIN(Population) from City); et pas SELECT Name, MIN(Population) from City; EXERCICE 1.11 SELECT District, sum(city.Population) as p FROM city JOIN country ON CountryCode = Code WHERE Code = "USA" GROUP BY District HAVING p > 3000000 SELECT Language, COUNT() as c from CountryLanguage GROUP BY Language ORDER BY c DESC LIMIT 5 ou SELECT Language, SUM(Percentage*Population/100) as t FROM CountryLanguage JOIN Country ON CountryCode = Country.code GROUP BY Language ORDER BY t DESC LIMIT 5; SELECT * FROM Country JOIN (SELECT Continent as c , MAX(population) as m FROM Country GROUP BY Continent HAVING m > 0) ON population = m and Country.Continent = c; ou SELECT Country.name, Country.Continent FROM Country WHERE (Country.Continent, Country.Population) IN (SELECT Country.Continent as c , MAX(Country.population) as m FROM Country GROUP BY Country.Continent HAVING m > 0);