db_id stringclasses 69
values | schema stringclasses 69
values | m_schema stringclasses 69
values | question stringlengths 24 325 | sql stringlengths 23 804 | evidence stringlengths 0 673 |
|---|---|---|---|---|---|
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | What's the decrease rate of the game plays did David Aebischer after he got traded in 2005? | SELECT CAST((SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) - SUM(CASE WHEN T1.year = 2006 THEN T1.GP ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.firstName = 'David' AND T2.lastName = 'Aebischer' | DIVIDE(SUBTRACT(SUM(GP(year = 2005), SUM(GP(year = 2006)), SUM(GP(year = 2005)) as percentage; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | State the player ID and coach ID of person who have become coach after retirement. | SELECT playerID, coachID FROM Master WHERE playerID IS NOT NULL AND coachID IS NOT NULL | after retirement means playerID Iis not NULL and coachID is not NULL; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | State the player ID of player with average height of 75. | SELECT DISTINCT playerID FROM Master GROUP BY playerID HAVING AVG(height) = 75 | average height of 75 refers to AVG(height) = 75; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | Who is the heaviest player? State player ID of 5 heaviest players. | SELECT playerID FROM Master ORDER BY weight DESC LIMIT 5 | 5 heaviest players refer to MAX(weight) limit to 5 playerID; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | What is the full name of players origin from Finland? | SELECT DISTINCT firstName, lastName FROM Master WHERE birthCountry = 'Finland' | origin from Finland refers to birthCountry = 'Finland'; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | List down player ID of players who have passed away. | SELECT DISTINCT playerID FROM Master WHERE deathYear IS NOT NULL AND playerID IS NOT NULL | passed away means deathYear is not NULL; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | List down the first name of coaches who still coach after year 2000. | SELECT DISTINCT T1.firstName FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year > 2000 | after year 2000 refers to year>2000; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | What is the height and weight for coaches who have won awards in 1930? | SELECT T1.height, T1.weight FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = '1930' | year = 1930; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | How much is the total goals for player with player ID aaltoan01 and how old is this person? | SELECT SUM(T2.G), STRFTIME('%Y', CURRENT_TIMESTAMP) - T1.birthyear FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = 'aaltoan01' GROUP BY T1.birthyear | total goals refer to SUM(G); how old = SUBTRACT(YEAR(CURDATE, birthYear); |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | Is there any coach who has not been a player before but has won award? State the ID. | SELECT DISTINCT T2.coachID FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.playerID IS NULL | coach who has not been a player means playerID is NULL and coachID is not NULL; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | Which player ID are left winger and weight more than 200? | SELECT DISTINCT playerID FROM Master WHERE pos LIKE '%L%' AND weight > 200 AND playerID IS NOT NULL AND pos = 'L' | left winger refers to pos = 'L'; weight>200 |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | What is the total number of game played for players from USA? | SELECT COUNT(T2.GP) FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCountry = 'USA' | game played refers to GP; from USA refers to birthCountry = 'USA'; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | Calculate the total points scored by team ID ANA and list down the coashes of the team. | SELECT SUM(T2.Pts), T1.coachID FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T2.tmID = T1.tmID WHERE T2.tmID = 'ANA' GROUP BY T1.coachID | points scored refers to Pts; team ID refers to tmID; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | In 1976, how many goals achieved by team 'BIR' in Division 'EW'? | SELECT SUM(T2.G) FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.divID = 'EW' AND T1.tmID = 'BIR' AND T1.year = 1976 | year = 1976; BIR refers to tmID; Division 'EW' refers to divID = 'EW'; goals = G; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | In 2010, how many loses made by team 'BOS' and how many assists were made by the players? | SELECT SUM(T1.L), SUM(T2.A) FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.tmID = 'BOS' AND T1.year = 2010 | year = 2010; BOS refers to tmID; loses refer to L; assists refer to A; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | What are the total weights of players for team 'ANA' as per year 1997? | SELECT SUM(T1.weight) FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1997 AND T2.tmID = 'ANA' | ANA refers to tmID; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | Who is the shortest player and state the team ID of that player from 1925 to 1936. | SELECT T2.playerID, T2.tmID FROM ( SELECT playerID FROM Master WHERE height IS NOT NULL ORDER BY height ASC LIMIT 1 ) AS T1 INNER JOIN ( SELECT DISTINCT playerID, tmID FROM Scoring WHERE year BETWEEN 1925 AND 1936 ) AS T2 ON T1.playerID = T2.playerID | Shortest refers to MIN(height); from 1925 to 1936 refers to year between 1925 and 1936; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | Which team has the highest winning rate in year 2000? State the team ID and list down the birth country of it's players. | SELECT DISTINCT T3.tmID, T1.birthCountry FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID INNER JOIN ( SELECT year, tmID FROM Teams WHERE year = 2000 ORDER BY W / (W + L) DESC LIMIT 1 ) AS T3 ON T2.tmID = T3.tmID AND T2.year = T3.year | MAX(DIVIDE(COUNT(W), SUM(COUNT(W), (COUNT (L)) where year = 2000; |
hockey | CREATE TABLE AwardsMisc
(
name TEXT not null
primary key,
ID TEXT,
award TEXT,
year INTEGER,
lgID TEXT,
note TEXT
);
CREATE TABLE HOF
(
year INTEGER,
hofID TEXT not null
primary key,
name TEXT,
category TEXT
);
CREATE TABLE Teams
(
year ... | 【DB_ID】 hockey
【Schema】
# Table: main.AwardsCoaches
[
(coachID:TEXT, Examples: [patrile01c, irvindi01c, gormato01c]),
(award:TEXT, Examples: [First Team All-Star, Second Team All-Star, Jack Adams]),
(year:INTEGER, Examples: [1930, 1931, 1932]),
(lgID:TEXT, Examples: [NHL, WHA]),
(note:TEXT)
]
# Table: main.AwardsMisc
[... | In 1998, How many wins were made by team 'CAR' per game played? Who contributed the most goals? State the player ID. | SELECT CAST(T1.W AS REAL) / T1.G, T2.playerID FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.tmID = 'CAR' AND T1.year = 1998 GROUP BY T1.W / T1.G, T2.playerID ORDER BY SUM(T2.G) DESC LIMIT 1 | year = 1998; wins per game played = DIVIDE(W, G); CAR refers to tmID; contributed the most goals refers to MAX(G); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Which country has the shortest life expectancy? | SELECT Name FROM Country ORDER BY LifeExpectancy LIMIT 1 | shortest life expectancy refers to MIN(LifeExpectancy); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List any five countries which use English as an official language. | 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 | English as an official language refers to `Language` = 'English' AND IsOfficial = 'T'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Calculate the average population per city in Karnataka district. | SELECT AVG(Population) FROM City WHERE District = 'Karnataka' GROUP BY ID | average population = AVG(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List the languages used in the USA. | SELECT Language FROM CountryLanguage WHERE CountryCode = 'USA' | USA refers to CountryCode = 'USA'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many countries use Portuguese? | SELECT SUM(CASE WHEN Language = 'Portuguese' THEN 1 ELSE 0 END) FROM CountryLanguage | Portuguese refers to `Language` = 'Portuguese'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many cities are there in England? | SELECT COUNT(ID) FROM City WHERE District = 'England' | England refers to District = 'England'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many cities are there in the country with the largest surface area? | 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 ) | largest surface area refers to MAX(SurfaceArea); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the capital city and population of San Marino? | SELECT T1.Capital, T2.Population FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'San Marino' | capital city refers to Capital; San Marino is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List the languages used in Turkmenistan. | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Turkmenistan' | Turkmenistan is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Provide the name, capital city and its official language of the country with the highest life expectancy. | 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 | capital city refers to Capital; official language refers to IsOfficial = 'T'; highest life expectancy refers to MAX(LifeExpectancy); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List the countries and their official languages in Antarctica. | 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' | official language refers to IsOfficial = 'T'; Antarctica refers to Continent = 'Antarctica'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List any five countries which use English as an official language. | 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 | English as an official language refers to `Language` = 'English' AND IsOfficial = 'T'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Among the languages used in Baltic Countries, provide the languages which are used by over 80%.
| 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 | Baltic Countries refers to Region = 'Baltic Countries'; languages which are used by over 80% refers to Percentage > 80; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Among the languages used in Baltic Countries, provide the languages which are used by over 80%. | 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 | Baltic Countries refers to Region = 'Baltic Countries'; languages which are used by over 80% refers to Percentage > 80; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Provide the name, located country, and life expectancy of the most populated city | 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 | most populated city refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Describe the capital city and languages used in the country with the shortest life expectancy. | 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 | capital city refers to Capital; shortest life expectancy refers to MIN(LifeExpectancy); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Provide the country, population, capital city, and official language of the country with the smallest surface area. | 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 | capital city refers to Capital; official language refers to IsOfficial = 'T'; smallest surface area refers to MIN(SurfaceArea); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many percent of countries in North America use English? | 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 | 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'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List the district name of the city with the smallest population. | SELECT District FROM City ORDER BY Population LIMIT 1 | smallest population refers to MIN(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | In which continent does the country with the smallest surface area belongs? | SELECT Continent FROM Country ORDER BY SurfaceArea LIMIT 1 | smallest surface area refers to MIN(smallest surface area); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Who is the head of the state where the most crowded city belongs? | SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1 | head of the state refers to HeadOfState; most crowded city refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Among the countries that officially use the English language, what country has the highest capital? | 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 | officially use the English language refers to `Language` = 'English' AND IsOfficial = 'T'; highest capital refers to MAX(Capital); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down the cities that belong to the country with a life expectancy of 66.4. | SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LifeExpectancy = 66.4 | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Give the head of the state of the country with the lowest percentage use of English as their language. | SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' ORDER BY T2.Percentage LIMIT 1 | head of the state refers to HeadOfState; lowest percentage use of English as their language refers to MIN(Percentage WHERE `Language` = 'English'); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the surface area of the country where Sutton Coldfield city belongs? | SELECT T1.SurfaceArea FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Sutton Coldfield' | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down the languages of the countries that have population below 8000. | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Population < 8000 | population below 8000 refers to Population < 8000; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What are the official languages used in Belgium? | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belgium' AND T2.IsOfficial = 'T' | official languages refers to IsOfficial = 'T'; Belgium is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Give the cities and district names that belong to the country with Hajastan as its local name. | SELECT T2.Name, T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LocalName = 'Hajastan' | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many languages are used in Cyprus? | SELECT SUM(CASE WHEN T1.Name = 'Cyprus' THEN 1 ELSE 0 END) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode | Cyprus is a name of Country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Provide the language used by the people of Belize. | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belize' | Belize is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down the districts belong to the country headed by Adolf Ogi. | SELECT T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = 'Adolf Ogi' | headed by Adolf Ogi refers to HeadOfState = 'Adolf Ogi'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Who is the head of the country where Santa Catarina district belongs? | SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.District = 'Santa Catarina' | head of the country refers to HeadOfState; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Among the countries that have GNP greater than 1500, what is the percentage of the countries have English as its language? | 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 WHERE T1.GNP > 1500 | GNP greater than 1500 refers to GNP > 1500 ; percentage = MULTIPLY(DIVIDE(SUM(Code WHERE GNP > 1500 AND Language = 'English'), COUNT(Code WHERE GNP > 1500)) 1.0); English as its language refers to Language = 'English'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | In English speaking countries, provide the difference between the number of countries with republic and constitutional monarchy as its government form. | SELECT COUNT(T1.GovernmentForm = 'Republic') - COUNT(T1.GovernmentForm = 'ConstitutionalMonarchy') FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' | English speaking refers to Language = 'English' ; difference = SUBTRACT(COUNT(Language = 'English' WHERE GovernmentForm = 'Republic'), COUNT(Language = 'English' WHERE GovernmentForm = 'ConstitutionalMonarchy')); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What country declared its independence in 1994? | SELECT Name FROM Country WHERE IndepYear = 1994 | declared independence in 1994 refers to IndepYear = 1994; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List all the countries in Asia. | SELECT Name FROM Country WHERE Continent = 'Asia' | Asia refers to Continent = 'Asia'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What country in Asia has the largest gross national product(GNP)? | SELECT Name FROM Country WHERE Continent = 'Asia' ORDER BY GNP DESC LIMIT 1 | Asia refers to Continent = 'Asia'; largest gross national product refers to MAX(GNP); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many cities are in the Philippines? | SELECT COUNT(ID) FROM City WHERE Name = 'PHL' | Philippines refers to CountryCode = 'PHL'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the local name of Ukraine that they are also known for? | SELECT LocalName FROM Country WHERE Name = 'Ukraine' | Ukraine is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many countries have Socialistic Republic form of government? | SELECT COUNT(Code) FROM Country WHERE GovernmentForm = 'Socialistic Republic' | Socialistic Republic form of government refers to GovernmentForm = 'Socialistic Republic'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the official language of China? | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.IsOfficial = 'T' | official language refers to IsOfficial = 'T'; China is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many percent of the population of China used Chinese as their language? | SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese' | percent refers to Percentage; China is a name of country; use Chinese as their language refers to Language = 'Chinese'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the form of government that the city of Manila has? | SELECT T1.GovernmentForm FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Manila' | form of government refers to GovernmentForm; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the capital city of the Philippines? | SELECT T1.Capital FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Philipiines' | capital city refers to Capital; Philippines is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List all the languages used in Europe. | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Europe' | Europe refers to Continent = 'Europe'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Who is the head of state of the country where the city of Pyongyang is under? | SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Pyongyang' | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many unofficial languages are used in Italy? | SELECT SUM(CASE WHEN T2.IsOfficial = 'F' THEN 1 ELSE 0 END) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Italy' | unofficial languages refers to IsOfficial = 'F'; Italy is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What city in Russia has the least population? | SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Russian Federation' ORDER BY T2.Population ASC LIMIT 1 | Russia is a name of country; least population refers to MIN(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List all the cities in the country where there is high life expectancy at birth. | SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.LifeExpectancy DESC LIMIT 1 | high life expectancy at birth refers to MAX(LifeExpectancy); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List all the official and unofficial languages used by the country that declared its independence in 1830. | SELECT T2.Language, T2.IsOfficial FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.IndepYear = 1830 GROUP BY T2.Language, T2.IsOfficial | official language refers to IsOfficial = 'T'; unofficial language refers to IsOfficial = 'F'; declared independence in 1830 refers to IndepYear = 1830; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the capital city of the country with largest population? | SELECT T1.Capital FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.Population DESC LIMIT 1 | capital city refers to Capital; largest population refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List all the countries in the continent of Asia that use English as their unofficial language. | SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Asia' AND T2.IsOfficial = 'F' GROUP BY T1.Name | use English as unofficial language refers to Language = 'English' WHERE IsOfficial = 'F'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Calculate the average GNP of all countries that use Arabic language. | SELECT AVG(T1.GNP) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic' | average GNP = AVG(GNP); use Arabic language refers to Language = 'Arabic'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Calculate the percentage of the surface area of all countries that uses Chinese as one of their languages. | SELECT CAST(SUM(IIF(T2.Language = 'Chinese', T1.SurfaceArea, 0)) AS REAL) * 100 / SUM(T1.SurfaceArea) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode | percentage = DIVIDE(MULTIPLY(SUM(SurfaceArea WHERE Language = 'Chinese'), SUM(SurfaceArea)), 1.0); Chinese as one of the languages refers to Language = 'Chinese'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Which country has the smallest surface area? | SELECT Name FROM Country ORDER BY SurfaceArea ASC LIMIT 1 | smallest surface area refers to MIN(smallest surface area); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Write down the name of the largest population country. | SELECT Name FROM Country ORDER BY Population DESC LIMIT 1 | largest population refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the language of the smallest population country? | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.Population ASC LIMIT 1 | smallest population refers to MIN(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down the name of countries whereby English is their official language. | 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' | English is the official language refers to Language = 'English' AND IsOfficial = 'T'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down the official language of the countries which declared independence after 1990, | 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' | official lanaguage refers to IsOfficial = 'T'; declared independence after 1990 refers to IndepYear > 1990; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the percentage of English used in Australia? | 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' | English refers to Language = 'English'; Australia is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down languages used in Malaysia. | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Malaysia' | Malaysia is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Which country has the most crowded city in the world? | SELECT T1.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1 | most crowded city refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the life expectancy of residents in the most crowded city? | SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC LIMIT 1 | most crowded city refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the GNP of the least crowded city in the world? | SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population ASC LIMIT 1 | least crowded city refers to MIN(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Within the 5 most crowded cities in the world, which country has the most languages used? | 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 | most crowded cities refers to MAX(Population); has the most languages used refers to MAX(COUNT(Language)); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Which country has the smallest surface area and the most crowded city? | 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 | smallest surface area refers to MIN(smallest surface area); most crowded city refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | List down all cities of China. | SELECT T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = 'China' | China is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What are the cities for country called "´Uman" in local name. | SELECT T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.LocalName = '´Uman' | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the average life expentancy of countries that speak Arabic? | SELECT AVG(T1.LifeExpectancy) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic' | average life expectancy = AVG(LifeExpectancy); speak Arabic refers to `Language` = 'Arabic'; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the GNP growth rate by the country of Shanghai? | 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' | GNP growth rate = DIVIDE(SUBTRACT(GNP, GNPOld), GNPOld); Shanghai is a name of city; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the district of Zaanstad? | SELECT District FROM City WHERE name = 'Zaanstad' | Zaanstad is a name of city; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What city has the highest population? | SELECT Name FROM City ORDER BY Population DESC LIMIT 1 | highest population refers to MAX(Population); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | Provide the district of the city with a population of 201843. | SELECT District FROM City WHERE population = 201843 | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What country has the largest surface area? | SELECT Name FROM Country ORDER BY SurfaceArea DESC LIMIT 1 | largest surface area refers to MAX(SurfaceArea); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many countries have a life expectancy of 75.1? | SELECT COUNT(*) FROM Country WHERE LifeExpectancy = 75.1 | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the year of independence of Brunei? | SELECT IndepYear FROM Country WHERE Name = 'Brunei' | year of independence refers to IndepYear; Brunei is a name of country; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many countries have no GNP? | SELECT COUNT(*) FROM Country WHERE GNP = 0 | no GNP refers to GNP = 0; |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What is the average surface area of all countries? | SELECT AVG(SurfaceArea) FROM Country | average surface area = AVG(SurfaceArea); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many languages are there in the country where Tocantins district belongs? | SELECT COUNT(DISTINCT T2.Language) FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.District = 'Tocantins' | |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | What are the districts that belong to the country with the largest surface area? | 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 ) | largest surface area refers to MAX(SurfaceArea); |
world | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE `City` (
`ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Name` TEXT NOT NULL DEFAULT '',
`CountryCode` TEXT NOT NULL DEFAULT '',
`District` TEXT NOT NULL DEFAULT '',
`Population` INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (`CountryCode`) REFERENCES `Count... | 【DB_ID】 world
【Schema】
# Table: main.City
[
(ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Kabul, Qandahar, Herat]),
(CountryCode:TEXT, Examples: [AFG, NLD, ANT]),
(District:TEXT, Examples: [Kabol, Qandahar, Herat]),
(Population:INTEGER, Examples: [1780000, 237500, 186800])
]
# Table: main.Count... | How many cities are there in the country ruled by Kostis Stefanopoulos? | SELECT COUNT(DISTINCT T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Kostis Stefanopoulos' | ruled by Kostis Stefanopoulos refers to HeadOfState = 'Kostis Stefanopoulos'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.