Database: world_1

Question: Return the different names of cities that are in Asia and for which Chinese is the official language.
SQL: SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode JOIN city AS T3 ON T1.Code  =  T3.CountryCode WHERE T2.IsOfficial  =  'T' AND T2.Language  =  'Chinese' AND T1.Continent  =  "Asia"

Question: Give the name, year of independence, and surface area of the country that has the lowest population.
SQL: SELECT Name ,  SurfaceArea ,  IndepYear FROM country ORDER BY Population LIMIT 1

Question: Give the name, population, and head of state for the country that has the largest area.
SQL: SELECT Name ,  population ,  HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1

Question: What are the names of countries that speak more than 2 languages, as well as how many languages they speak?
SQL: SELECT COUNT(T2.Language) ,  T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode GROUP BY T1.Name HAVING COUNT(*)  >  2

Question: How many cities in each district have a population that is above the average population across all cities?
SQL: SELECT count(*) ,  District FROM city WHERE Population  >  (SELECT avg(Population) FROM city) GROUP BY District

Question: What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?
SQL: SELECT sum(Population) ,  GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy)  >  72

Question: What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?
SQL: SELECT sum(Population) ,  avg(LifeExpectancy) ,  Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy)  <  72

Question: Return the names and surface areas of the 5 largest countries.
SQL: SELECT Name ,  SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5

Question: Return the names of the 3 most populated countries.
SQL: SELECT Name FROM country ORDER BY Population DESC LIMIT 3

Question: Return the names of the 3 countries with the fewest people.
SQL: SELECT Name FROM country ORDER BY Population ASC LIMIT 3

Question: Count the number of countries in Asia.
SQL: SELECT count(*) FROM country WHERE continent  =  "Asia"

Question: Give the names of countries that are in Europe and have a population equal to 80000.
SQL: SELECT Name FROM country WHERE WHERE continent  =  "Europe" AND Population  =  "80000"

Question: Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000.
SQL: SELECT sum(Population) ,  avg(SurfaceArea) FROM country WHERE Continent  =  "North America" AND SurfaceArea  >  3000

Question: Return the names of cities that have a population between 160000 and 900000.
SQL: SELECT name FROM city WHERE Population BETWEEN 160000 AND 90000

Question: Give the language that is spoken in the most countries.
SQL: SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1