1sf/bird-sql-train-with-schema huggingface dataset:
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List down the name of countries whereby English is their official language.
Evidence: English is the official language refers to Language = 'English' AND IsOfficial = 'T';
SQL: SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List down the official language of the countries which declared independence after 1990,
Evidence: official lanaguage refers to IsOfficial = 'T'; declared independence after 1990 refers to IndepYear > 1990;
SQL: SELECT T1.Name, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.IndepYear > 1990 AND T2.IsOfficial = 'T'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the percentage of English used in Australia?
Evidence: English refers to Language = 'English'; Australia is a name of country;
SQL: SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Australia' AND T2.Language = 'English'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List down languages used in Malaysia.
Evidence: Malaysia is a name of country;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Malaysia'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: Which country has the most crowded city in the world?
Evidence: most crowded city refers to MAX(Population);
SQL: SELECT T1.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the life expectancy of residents in the most crowded city?
Evidence: most crowded city refers to MAX(Population);
SQL: SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the GNP of the least crowded city in the world?
Evidence: least crowded city refers to MIN(Population);
SQL: SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population ASC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: Within the 5 most crowded cities in the world, which country has the most languages used?
Evidence: most crowded cities refers to MAX(Population); has the most languages used refers to MAX(COUNT(Language));
SQL: SELECT Name FROM ( SELECT T1.Name, T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode GROUP BY T1.Name, T1.Population, T2.Language ORDER BY T1.Population DESC ) AS T3 GROUP BY t3.Name ORDER BY COUNT(Language) DESC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: Which country has the smallest surface area and the most crowded city?
Evidence: smallest surface area refers to MIN(smallest surface area); most crowded city refers to MAX(Population);
SQL: SELECT T2.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC, T2.SurfaceArea DESC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List down all cities of China.
Evidence: China is a name of country;
SQL: SELECT T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = 'China'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What are the cities for country called "Â´Uman" in local name.
SQL: SELECT T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.LocalName = 'Â´Uman'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the average life expentancy of countries that speak Arabic?
Evidence: average life expectancy = AVG(LifeExpectancy); speak Arabic refers to `Language` = 'Arabic';
SQL: SELECT AVG(T1.LifeExpectancy) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the GNP growth rate by the country of Shanghai?
Evidence: GNP growth rate = DIVIDE(SUBTRACT(GNP, GNPOld), GNPOld); Shanghai is a name of city;
SQL: SELECT CAST((T1.GNP - T1.GNPOld) AS REAL) / T1.GNPOld FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Shanghai'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the district of Zaanstad?
Evidence: Zaanstad is a name of city;
SQL: SELECT District FROM City WHERE name = 'Zaanstad'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What city has the highest population?
Evidence: highest population refers to MAX(Population);
SQL: SELECT Name FROM City ORDER BY Population DESC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: Provide the district of the city with a population of 201843.
SQL: SELECT District FROM City WHERE population = 201843
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What country has the largest surface area?
Evidence: largest surface area refers to MAX(SurfaceArea);
SQL: SELECT Name FROM Country ORDER BY SurfaceArea DESC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: How many countries have a life expectancy of 75.1?
SQL: SELECT COUNT(*) FROM Country WHERE LifeExpectancy = 75.1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the year of independence of Brunei?
Evidence: year of independence refers to IndepYear; Brunei is a name of country;
SQL: SELECT IndepYear FROM Country WHERE Name = 'Brunei'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: How many countries have no GNP?
Evidence: no GNP refers to GNP = 0;
SQL: SELECT COUNT(*) FROM Country WHERE GNP = 0
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the average surface area of all countries?
Evidence: average surface area = AVG(SurfaceArea);
SQL: SELECT AVG(SurfaceArea) FROM Country
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: How many languages are there in the country where Tocantins district belongs?
SQL: SELECT COUNT(DISTINCT T2.Language) FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.District = 'Tocantins'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What are the districts that belong to the country with the largest surface area?
Evidence: largest surface area refers to MAX(SurfaceArea);
SQL: SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = ( SELECT Name FROM Country ORDER BY SurfaceArea DESC LIMIT 1 )
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: How many cities are there in the country ruled by Kostis Stefanopoulos?
Evidence: ruled by Kostis Stefanopoulos refers to HeadOfState = 'Kostis Stefanopoulos';
SQL: SELECT COUNT(DISTINCT T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Kostis Stefanopoulos'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What are the official languages used in Greece?
Evidence: official language refers to IsOfficial = 'T'; Greece is a name of country;
SQL: SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T2.name = 'Greece'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: Give the population of the country where Queimados city belongs.
SQL: SELECT T2.Population FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Queimados'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What are the official languages of the country where you can find the city with the least population?
Evidence: official language refers to IsOfficial = 'T'; least population refers to MIN(Population);
SQL: SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the surface area and GNP of the country where Namibe district belongs?
SQL: SELECT T2.SurfaceArea, T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Namibe'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List the names of the country that officially uses English as their language.
Evidence: officially uses English as their language refers to `Language` = 'English' AND IsOfficial = 'T';
SQL: SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T1.Language = 'English'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What are the districts that belong to the country with the lowest surface area?
Evidence: lowest surface area refers to MIN(SurfaceArea);
SQL: SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T2.SurfaceArea ASC LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List down the country names of countries that have a GNP lower than 1000 and have Dutch as their language.
Evidence: GNP lower than 1000 refers to GNP < 1000; Dutch as their language refers to `Language` = 'Dutch';
SQL: SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GNP < 1000 AND T1.IsOfficial = 'T' AND T1.Language = 'Dutch'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the GNP of the country where district "Entre Rios" belongs?
SQL: SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Entre Rios' LIMIT 1
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the local name of the country where "The Valley" city belongs?
SQL: SELECT T2.LocalName FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'The Valley'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: List down the cities belongs to the country that has surface area greater than 7000000.
Evidence: surface area greater than 7000000 refers to SurfaceArea > 7000000;
SQL: SELECT T2.Name, T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea > 7000000
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: What is the life expectancy of the countries that uses Japanese as their language?
Evidence: uses Japanese as their language refers to `Language` = 'Japanese';
SQL: SELECT AVG(T2.LifeExpectancy) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Japanese'
Database: world
Tables: City, Country, CountryLanguage
Columns (table index, column name): -1, *, 0, ID, 0, Name, 0, CountryCode, 0, District, 0, Population, 1, Code, 1, Name, 1, Continent, 1, Region, 1, SurfaceArea, 1, IndepYear, 1, Population, 1, LifeExpectancy, 1, GNP, 1, GNPOld, 1, LocalName, 1, GovernmentForm, 1, HeadOfState, 1, Capital, 1, Code2, 2, CountryCode, 2, Language, 2, IsOfficial, 2, Percentage
Question: How many cities are there in the country with the surface area of 652090?
SQL: SELECT T2.Name, COUNT(T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea = 652090 GROUP BY T2.Name