– This is the first query:

SELECT DISTINCT year from population_years;

– Add your additional queries below:

SELECT country, population, year FROM population_years WHERE country=‘Gabon’ ORDER BY population DESC LIMIT 1;

SELECT DISTINCT country, population, year FROM population_years WHERE year =2005 ORDER BY population ASC LIMIT 10;

SELECT * FROM population_years WHERE population >100 AND year =2010;

SELECT DISTINCT country FROM population_years WHERE country LIKE “%Islands%”;

SELECT country, population, year, CASE

WHEN year=2000 THEN population

WHEN year=2010 THEN “El restado”

ELSE “Otro año”

END AS resta FROM population_years

WHERE country =“Indonesia” AND (year=2000 OR year=2010);

/* Intento de hacer la resta

SELECT * FROM (

SELECT a2010.population-a2000.population AS resultado FROM population_years AS a2000

LEFT JOIN population_years AS a2010 ON (a2000.year<>a2010.year)

WHERE a2000.year =2000 AND a2010.year =2010

) a2000 WHERE resultado>0;

*/