1sf/bird-sql-train-with-schema huggingface dataset:
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: What object class is in the X and Y coordinates of 126 and 363?
Evidence: object class refers to OBJ_CLASS; X and Y coordinates of 126 and 363 refer to coordinates of the bounding box where X = 126 and Y = 363;
SQL: SELECT T1.IMG_ID, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 126 AND T1.Y = 363
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: What is the most common object class of image ID 56?
Evidence: the most common object class of image ID 56 refers to MAX(COUNT(OBJ_CLASS_ID)) where IMG_ID = 56;
SQL: SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 56 GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T2.OBJ_CLASS_ID) DESC LIMIT 1
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: Write the object classes of image ID 22 alongside the object's width and height.
Evidence: object classes of image ID 22 refers to OBJ_CLASS where IMG_ID = 22; the object's width and heigh refer to W and H coordinates of the bounding box respectively;
SQL: SELECT T1.W, T1.H, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 22
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: What is the predicate class of image ID 68?
Evidence: predicate class of image ID 68 refers to PRED_CLASS where IMG_ID = 68;
SQL: SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 68
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: How many 'has' predicate classes does image ID 107 have?
Evidence: has' predicate classes refers to PRED_CLASS = 'has'; image ID 107 refers to IMG_ID = 107;
SQL: SELECT COUNT(T2.PRED_CLASS) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 107 AND T2.PRED_CLASS = 'has'
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: Name the most common predicate class of image ID 4434.
Evidence: the most common predicate class of image ID 4434 MAX(PRED_CLASS) where IMG_ID = 4434;
SQL: SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: Count the number of 'dress' object classes and include their X and Y coordinates in image ID 1764.
Evidence: dress' object classes refer to OBJ_CLASS = 'dress'; image ID 1764 refers to IMG_ID = 1764; X and Y refer to coordinates of the bounding box;
SQL: SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1764 AND T2.OBJ_CLASS = 'dress'
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.
Evidence: X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';
SQL: SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: How many 'blue' attribute classes are there on image ID 2355735?
Evidence: blue' attribute classes on image ID 2355735 refer to ATT_CLASS = 'blue' where IMG_ID = 2355735;
SQL: SELECT COUNT(T1.ATT_CLASS) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 2355735 AND T1.ATT_CLASS = 'blue'
Database: image_and_language
Tables: ATT_CLASSES, OBJ_CLASSES, IMG_OBJ, IMG_OBJ_ATT, PRED_CLASSES, IMG_REL
Columns (table index, column name): -1, *, 0, ATT_CLASS_ID, 0, ATT_CLASS, 1, OBJ_CLASS_ID, 1, OBJ_CLASS, 2, IMG_ID, 2, OBJ_SAMPLE_ID, 2, OBJ_CLASS_ID, 2, X, 2, Y, 2, W, 2, H, 3, IMG_ID, 3, ATT_CLASS_ID, 3, OBJ_SAMPLE_ID, 4, PRED_CLASS_ID, 4, PRED_CLASS, 5, IMG_ID, 5, PRED_CLASS_ID, 5, OBJ1_SAMPLE_ID, 5, OBJ2_SAMPLE_ID
Question: What is the average width and height of the objects in image ID 47? List their object classes as well.
Evidence: The bounding box's W and H abbreviations stand for the object's width and height in which average width and height refer to AVG(W) and AVG(H) respectively; image ID 47 refers to IMG_ID = 47; object classes refer to OBJ_CLASS;
SQL: SELECT T2.OBJ_CLASS, AVG(T1.W), AVG(T1.H) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 47 GROUP BY T2.OBJ_CLASS
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 shortest life expectancy?
Evidence: shortest life expectancy refers to MIN(LifeExpectancy);
SQL: SELECT Name FROM Country ORDER BY LifeExpectancy 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 any five countries which use English as an official language.
Evidence: English as an 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' LIMIT 5
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: Calculate the average population per city in Karnataka district.
Evidence: average population = AVG(Population);
SQL: SELECT AVG(Population) FROM City WHERE District = 'Karnataka' GROUP BY ID
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 languages used in the USA.
Evidence: USA refers to CountryCode = 'USA';
SQL: SELECT Language FROM CountryLanguage WHERE CountryCode = 'USA'
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 use Portuguese?
Evidence: Portuguese refers to `Language` = 'Portuguese';
SQL: SELECT SUM(CASE WHEN Language = 'Portuguese' THEN 1 ELSE 0 END) FROM CountryLanguage
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 England?
Evidence: England refers to District = 'England';
SQL: SELECT COUNT(ID) FROM City WHERE District = 'England'
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 largest surface area?
Evidence: largest surface area refers to MAX(SurfaceArea);
SQL: SELECT T2.ID FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.SurfaceArea = ( SELECT MAX(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: What is the capital city and population of San Marino?
Evidence: capital city refers to Capital; San Marino is a name of country;
SQL: SELECT T1.Capital, T2.Population FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'San Marino'
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 languages used in Turkmenistan.
Evidence: Turkmenistan 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 = 'Turkmenistan'
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 name, capital city and its official language of the country with the highest life expectancy.
Evidence: capital city refers to Capital; official language refers to IsOfficial = 'T'; highest life expectancy refers to MAX(LifeExpectancy);
SQL: SELECT T1.Name, T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.LifeExpectancy 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 the countries and their official languages in Antarctica.
Evidence: official language refers to IsOfficial = 'T'; Antarctica refers to Continent = 'Antarctica';
SQL: SELECT T1.Name, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Antarctica' 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: Among the languages used in Baltic Countries, provide the languages which are used by over 80%.


Evidence: Baltic Countries refers to Region = 'Baltic Countries'; languages which are used by over 80% refers to Percentage > 80;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Region = 'Baltic Countries' AND T2.Percentage > 80
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: Among the languages used in Baltic Countries, provide the languages which are used by over 80%.
Evidence: Baltic Countries refers to Region = 'Baltic Countries'; languages which are used by over 80% refers to Percentage > 80;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Region = 'Baltic Countries' AND T2.Percentage > 80
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 name, located country, and life expectancy of the most populated city
Evidence: most populated city refers to MAX(Population);
SQL: SELECT T2.Name, T1.Code, T1.LifeExpectancy 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: Describe the capital city and languages used in the country with the shortest life expectancy.
Evidence: capital city refers to Capital; shortest life expectancy refers to MIN(LifeExpectancy);
SQL: SELECT T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode ORDER BY T1.LifeExpectancy 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 country, population, capital city, and official language of the country with the smallest surface area.
Evidence: capital city refers to Capital; official language refers to IsOfficial = 'T'; smallest surface area refers to MIN(SurfaceArea);
SQL: SELECT T1.Name, T1.Population, T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.SurfaceArea 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 percent of countries in North America use English?
Evidence: percentage = MULTIPLY(DIVIDE(COUNT(Language = 'English' WHERE Continent = 'North America'), COUNT(Language WHERE Continent = 'North America')), 1.0); North America refers to Continent = 'North America'; use English refers to Language = 'English';
SQL: SELECT CAST(SUM(IIF(T2.Language = 'English', 1, 0)) AS REAL) * 100 / COUNT(T1.Code) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode
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 district name of the city with the smallest population.
Evidence: smallest population refers to MIN(Population);
SQL: SELECT District FROM City ORDER BY Population 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: In which continent does the country with the smallest surface area belongs?
Evidence: smallest surface area refers to MIN(smallest surface area);
SQL: SELECT Continent FROM Country ORDER BY SurfaceArea 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: Who is the head of the state where the most crowded city belongs?
Evidence: head of the state refers to HeadOfState; most crowded city refers to MAX(Population);
SQL: SELECT T1.HeadOfState 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: Among the countries that officially use the English language, what country has the highest capital?
Evidence: officially use the English language refers to `Language` = 'English' AND IsOfficial = 'T'; highest capital refers to MAX(Capital);
SQL: SELECT T1.Code FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T' ORDER BY T1.Capital 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 the cities that belong to the country with a life expectancy of 66.4.
SQL: SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LifeExpectancy = 66.4