db_id
stringlengths 4
31
| query
stringlengths 18
577
| question
stringlengths 16
224
| query_toks
listlengths 4
90
⌀ | query_toks_no_value
listlengths 4
125
⌀ | question_toks
listlengths 4
44
⌀ |
---|---|---|---|---|---|
music_4
|
SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC
|
How many music festivals have had each kind of result, ordered descending by count?
|
[
"SELECT",
"RESULT",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"music_festival",
"GROUP",
"BY",
"RESULT",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC"
] |
[
"select",
"result",
",",
"count",
"(",
"*",
")",
"from",
"music_festival",
"group",
"by",
"result",
"order",
"by",
"count",
"(",
"*",
")",
"desc"
] |
[
"How",
"many",
"music",
"festivals",
"have",
"had",
"each",
"kind",
"of",
"result",
",",
"ordered",
"descending",
"by",
"count",
"?"
] |
music_4
|
SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23
|
What are the issue dates of volumes associated with the artist aged 23 or younger?
|
[
"SELECT",
"Issue_Date",
"FROM",
"artist",
"AS",
"T1",
"JOIN",
"volume",
"AS",
"T2",
"ON",
"T1.Artist_ID",
"=",
"T2.Artist_ID",
"WHERE",
"T1.age",
"<",
"=",
"23"
] |
[
"select",
"issue_date",
"from",
"artist",
"as",
"t1",
"join",
"volume",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"where",
"t1",
".",
"age",
"<",
"=",
"value"
] |
[
"What",
"are",
"the",
"issue",
"dates",
"of",
"volumes",
"associated",
"with",
"the",
"artist",
"aged",
"23",
"or",
"younger",
"?"
] |
music_4
|
SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23
|
Return the issue dates of volumes by artists who are at most 23 years old?
|
[
"SELECT",
"Issue_Date",
"FROM",
"artist",
"AS",
"T1",
"JOIN",
"volume",
"AS",
"T2",
"ON",
"T1.Artist_ID",
"=",
"T2.Artist_ID",
"WHERE",
"T1.age",
"<",
"=",
"23"
] |
[
"select",
"issue_date",
"from",
"artist",
"as",
"t1",
"join",
"volume",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"where",
"t1",
".",
"age",
"<",
"=",
"value"
] |
[
"Return",
"the",
"issue",
"dates",
"of",
"volumes",
"by",
"artists",
"who",
"are",
"at",
"most",
"23",
"years",
"old",
"?"
] |
roller_coaster
|
SELECT count(*) FROM roller_coaster
|
How many roller coasters are there?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"roller_coaster"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"roller_coaster"
] |
[
"How",
"many",
"roller",
"coasters",
"are",
"there",
"?"
] |
roller_coaster
|
SELECT Name FROM roller_coaster ORDER BY LENGTH ASC
|
List the names of roller coasters by ascending order of length.
|
[
"SELECT",
"Name",
"FROM",
"roller_coaster",
"ORDER",
"BY",
"LENGTH",
"ASC"
] |
[
"select",
"name",
"from",
"roller_coaster",
"order",
"by",
"length",
"asc"
] |
[
"List",
"the",
"names",
"of",
"roller",
"coasters",
"by",
"ascending",
"order",
"of",
"length",
"."
] |
roller_coaster
|
SELECT LENGTH , Height FROM roller_coaster
|
What are the lengths and heights of roller coasters?
|
[
"SELECT",
"LENGTH",
",",
"Height",
"FROM",
"roller_coaster"
] |
[
"select",
"length",
",",
"height",
"from",
"roller_coaster"
] |
[
"What",
"are",
"the",
"lengths",
"and",
"heights",
"of",
"roller",
"coasters",
"?"
] |
roller_coaster
|
SELECT Name FROM country WHERE Languages != "German"
|
List the names of countries whose language is not "German".
|
[
"SELECT",
"Name",
"FROM",
"country",
"WHERE",
"Languages",
"!",
"=",
"``",
"German",
"''"
] |
[
"select",
"name",
"from",
"country",
"where",
"languages",
"!",
"=",
"value"
] |
[
"List",
"the",
"names",
"of",
"countries",
"whose",
"language",
"is",
"not",
"``",
"German",
"''",
"."
] |
roller_coaster
|
SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100
|
Show the statuses of roller coasters longer than 3300 or higher than 100.
|
[
"SELECT",
"Status",
"FROM",
"roller_coaster",
"WHERE",
"LENGTH",
">",
"3300",
"OR",
"Height",
">",
"100"
] |
[
"select",
"status",
"from",
"roller_coaster",
"where",
"length",
">",
"value",
"or",
"height",
">",
"value"
] |
[
"Show",
"the",
"statuses",
"of",
"roller",
"coasters",
"longer",
"than",
"3300",
"or",
"higher",
"than",
"100",
"."
] |
roller_coaster
|
SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1
|
What are the speeds of the longest roller coaster?
|
[
"SELECT",
"Speed",
"FROM",
"roller_coaster",
"ORDER",
"BY",
"LENGTH",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"speed",
"from",
"roller_coaster",
"order",
"by",
"length",
"desc",
"limit",
"value"
] |
[
"What",
"are",
"the",
"speeds",
"of",
"the",
"longest",
"roller",
"coaster",
"?"
] |
roller_coaster
|
SELECT avg(Speed) FROM roller_coaster
|
What is the average speed of roller coasters?
|
[
"SELECT",
"avg",
"(",
"Speed",
")",
"FROM",
"roller_coaster"
] |
[
"select",
"avg",
"(",
"speed",
")",
"from",
"roller_coaster"
] |
[
"What",
"is",
"the",
"average",
"speed",
"of",
"roller",
"coasters",
"?"
] |
roller_coaster
|
SELECT Status , COUNT(*) FROM roller_coaster GROUP BY Status
|
Show the different statuses and the numbers of roller coasters for each status.
|
[
"SELECT",
"Status",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"roller_coaster",
"GROUP",
"BY",
"Status"
] |
[
"select",
"status",
",",
"count",
"(",
"*",
")",
"from",
"roller_coaster",
"group",
"by",
"status"
] |
[
"Show",
"the",
"different",
"statuses",
"and",
"the",
"numbers",
"of",
"roller",
"coasters",
"for",
"each",
"status",
"."
] |
roller_coaster
|
SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1
|
Please show the most common status of roller coasters.
|
[
"SELECT",
"Status",
"FROM",
"roller_coaster",
"GROUP",
"BY",
"Status",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"status",
"from",
"roller_coaster",
"group",
"by",
"status",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Please",
"show",
"the",
"most",
"common",
"status",
"of",
"roller",
"coasters",
"."
] |
roller_coaster
|
SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2
|
List the status shared by more than two roller coaster.
|
[
"SELECT",
"Status",
"FROM",
"roller_coaster",
"GROUP",
"BY",
"Status",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"2"
] |
[
"select",
"status",
"from",
"roller_coaster",
"group",
"by",
"status",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"List",
"the",
"status",
"shared",
"by",
"more",
"than",
"two",
"roller",
"coaster",
"."
] |
roller_coaster
|
SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1
|
Show the park of the roller coaster with the highest speed.
|
[
"SELECT",
"Park",
"FROM",
"roller_coaster",
"ORDER",
"BY",
"Speed",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"park",
"from",
"roller_coaster",
"order",
"by",
"speed",
"desc",
"limit",
"value"
] |
[
"Show",
"the",
"park",
"of",
"the",
"roller",
"coaster",
"with",
"the",
"highest",
"speed",
"."
] |
roller_coaster
|
SELECT T2.Name , T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID
|
Show the names of roller coasters and names of country they are in.
|
[
"SELECT",
"T2.Name",
",",
"T1.Name",
"FROM",
"country",
"AS",
"T1",
"JOIN",
"roller_coaster",
"AS",
"T2",
"ON",
"T1.Country_ID",
"=",
"T2.Country_ID"
] |
[
"select",
"t2",
".",
"name",
",",
"t1",
".",
"name",
"from",
"country",
"as",
"t1",
"join",
"roller_coaster",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id"
] |
[
"Show",
"the",
"names",
"of",
"roller",
"coasters",
"and",
"names",
"of",
"country",
"they",
"are",
"in",
"."
] |
roller_coaster
|
SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1
|
Show the names of countries that have more than one roller coaster.
|
[
"SELECT",
"T1.Name",
"FROM",
"country",
"AS",
"T1",
"JOIN",
"roller_coaster",
"AS",
"T2",
"ON",
"T1.Country_ID",
"=",
"T2.Country_ID",
"GROUP",
"BY",
"T1.Name",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"country",
"as",
"t1",
"join",
"roller_coaster",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"group",
"by",
"t1",
".",
"name",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"Show",
"the",
"names",
"of",
"countries",
"that",
"have",
"more",
"than",
"one",
"roller",
"coaster",
"."
] |
roller_coaster
|
SELECT T1.Name , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1
|
Show the name and population of the country that has the highest roller coaster.
|
[
"SELECT",
"T1.Name",
",",
"T1.population",
"FROM",
"country",
"AS",
"T1",
"JOIN",
"roller_coaster",
"AS",
"T2",
"ON",
"T1.Country_ID",
"=",
"T2.Country_ID",
"ORDER",
"BY",
"T2.Height",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
",",
"t1",
".",
"population",
"from",
"country",
"as",
"t1",
"join",
"roller_coaster",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"order",
"by",
"t2",
".",
"height",
"desc",
"limit",
"value"
] |
[
"Show",
"the",
"name",
"and",
"population",
"of",
"the",
"country",
"that",
"has",
"the",
"highest",
"roller",
"coaster",
"."
] |
roller_coaster
|
SELECT T1.Name , avg(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name
|
Show the names of countries and the average speed of roller coasters from each country.
|
[
"SELECT",
"T1.Name",
",",
"avg",
"(",
"T2.Speed",
")",
"FROM",
"country",
"AS",
"T1",
"JOIN",
"roller_coaster",
"AS",
"T2",
"ON",
"T1.Country_ID",
"=",
"T2.Country_ID",
"GROUP",
"BY",
"T1.Name"
] |
[
"select",
"t1",
".",
"name",
",",
"avg",
"(",
"t2",
".",
"speed",
")",
"from",
"country",
"as",
"t1",
"join",
"roller_coaster",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"group",
"by",
"t1",
".",
"name"
] |
[
"Show",
"the",
"names",
"of",
"countries",
"and",
"the",
"average",
"speed",
"of",
"roller",
"coasters",
"from",
"each",
"country",
"."
] |
roller_coaster
|
SELECT count(*) FROM country WHERE country_id NOT IN ( SELECT country_id FROM roller_coaster WHERE LENGTH > 3000 )
|
How many countries do not have an roller coaster longer than 3000?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"country",
"WHERE",
"country_id",
"NOT",
"IN",
"(",
"SELECT",
"country_id",
"FROM",
"roller_coaster",
"WHERE",
"LENGTH",
">",
"3000",
")"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"country",
"where",
"country_id",
"not",
"in",
"(",
"select",
"country_id",
"from",
"roller_coaster",
"where",
"length",
">",
"value",
")"
] |
[
"How",
"many",
"countries",
"do",
"not",
"have",
"an",
"roller",
"coaster",
"longer",
"than",
"3000",
"?"
] |
roller_coaster
|
SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55
|
What are the country names, area and population which has both roller coasters with speed higher
|
[
"SELECT",
"T1.name",
",",
"T1.area",
",",
"T1.population",
"FROM",
"country",
"AS",
"T1",
"JOIN",
"roller_coaster",
"AS",
"T2",
"ON",
"T1.Country_ID",
"=",
"T2.Country_ID",
"WHERE",
"T2.speed",
">",
"60",
"INTERSECT",
"SELECT",
"T1.name",
",",
"T1.area",
",",
"T1.population",
"FROM",
"country",
"AS",
"T1",
"JOIN",
"roller_coaster",
"AS",
"T2",
"ON",
"T1.Country_ID",
"=",
"T2.Country_ID",
"WHERE",
"T2.speed",
"<",
"55"
] |
[
"select",
"t1",
".",
"name",
",",
"t1",
".",
"area",
",",
"t1",
".",
"population",
"from",
"country",
"as",
"t1",
"join",
"roller_coaster",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"where",
"t2",
".",
"speed",
">",
"value",
"intersect",
"select",
"t1",
".",
"name",
",",
"t1",
".",
"area",
",",
"t1",
".",
"population",
"from",
"country",
"as",
"t1",
"join",
"roller_coaster",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"where",
"t2",
".",
"speed",
"<",
"value"
] |
[
"What",
"are",
"the",
"country",
"names",
",",
"area",
"and",
"population",
"which",
"has",
"both",
"roller",
"coasters",
"with",
"speed",
"higher"
] |
ship_1
|
SELECT count(DISTINCT rank) FROM captain
|
How many different captain ranks are there?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"rank",
")",
"FROM",
"captain"
] |
[
"select",
"count",
"(",
"distinct",
"rank",
")",
"from",
"captain"
] |
[
"How",
"many",
"different",
"captain",
"ranks",
"are",
"there",
"?"
] |
ship_1
|
SELECT count(DISTINCT rank) FROM captain
|
Count the number of different ranks of captain.
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"rank",
")",
"FROM",
"captain"
] |
[
"select",
"count",
"(",
"distinct",
"rank",
")",
"from",
"captain"
] |
[
"Count",
"the",
"number",
"of",
"different",
"ranks",
"of",
"captain",
"."
] |
ship_1
|
SELECT count(*) , rank FROM captain GROUP BY rank
|
How many captains are in each rank?
|
[
"SELECT",
"count",
"(",
"*",
")",
",",
"rank",
"FROM",
"captain",
"GROUP",
"BY",
"rank"
] |
[
"select",
"count",
"(",
"*",
")",
",",
"rank",
"from",
"captain",
"group",
"by",
"rank"
] |
[
"How",
"many",
"captains",
"are",
"in",
"each",
"rank",
"?"
] |
ship_1
|
SELECT count(*) , rank FROM captain GROUP BY rank
|
Count the number of captains that have each rank.
|
[
"SELECT",
"count",
"(",
"*",
")",
",",
"rank",
"FROM",
"captain",
"GROUP",
"BY",
"rank"
] |
[
"select",
"count",
"(",
"*",
")",
",",
"rank",
"from",
"captain",
"group",
"by",
"rank"
] |
[
"Count",
"the",
"number",
"of",
"captains",
"that",
"have",
"each",
"rank",
"."
] |
ship_1
|
SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank
|
How many captains with younger than 50 are in each rank?
|
[
"SELECT",
"count",
"(",
"*",
")",
",",
"rank",
"FROM",
"captain",
"WHERE",
"age",
"<",
"50",
"GROUP",
"BY",
"rank"
] |
[
"select",
"count",
"(",
"*",
")",
",",
"rank",
"from",
"captain",
"where",
"age",
"<",
"value",
"group",
"by",
"rank"
] |
[
"How",
"many",
"captains",
"with",
"younger",
"than",
"50",
"are",
"in",
"each",
"rank",
"?"
] |
ship_1
|
SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank
|
Count the number of captains younger than 50 of each rank.
|
[
"SELECT",
"count",
"(",
"*",
")",
",",
"rank",
"FROM",
"captain",
"WHERE",
"age",
"<",
"50",
"GROUP",
"BY",
"rank"
] |
[
"select",
"count",
"(",
"*",
")",
",",
"rank",
"from",
"captain",
"where",
"age",
"<",
"value",
"group",
"by",
"rank"
] |
[
"Count",
"the",
"number",
"of",
"captains",
"younger",
"than",
"50",
"of",
"each",
"rank",
"."
] |
ship_1
|
SELECT name FROM captain ORDER BY age DESC
|
Sort all captain names by their ages from old to young.
|
[
"SELECT",
"name",
"FROM",
"captain",
"ORDER",
"BY",
"age",
"DESC"
] |
[
"select",
"name",
"from",
"captain",
"order",
"by",
"age",
"desc"
] |
[
"Sort",
"all",
"captain",
"names",
"by",
"their",
"ages",
"from",
"old",
"to",
"young",
"."
] |
ship_1
|
SELECT name FROM captain ORDER BY age DESC
|
What are the names of captains, sorted by age descending?
|
[
"SELECT",
"name",
"FROM",
"captain",
"ORDER",
"BY",
"age",
"DESC"
] |
[
"select",
"name",
"from",
"captain",
"order",
"by",
"age",
"desc"
] |
[
"What",
"are",
"the",
"names",
"of",
"captains",
",",
"sorted",
"by",
"age",
"descending",
"?"
] |
ship_1
|
SELECT name , CLASS , rank FROM captain
|
Find the name, class and rank of all captains.
|
[
"SELECT",
"name",
",",
"CLASS",
",",
"rank",
"FROM",
"captain"
] |
[
"select",
"name",
",",
"class",
",",
"rank",
"from",
"captain"
] |
[
"Find",
"the",
"name",
",",
"class",
"and",
"rank",
"of",
"all",
"captains",
"."
] |
ship_1
|
SELECT name , CLASS , rank FROM captain
|
What are the names, classes, and ranks of all captains?
|
[
"SELECT",
"name",
",",
"CLASS",
",",
"rank",
"FROM",
"captain"
] |
[
"select",
"name",
",",
"class",
",",
"rank",
"from",
"captain"
] |
[
"What",
"are",
"the",
"names",
",",
"classes",
",",
"and",
"ranks",
"of",
"all",
"captains",
"?"
] |
ship_1
|
SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1
|
Which rank is the most common among captains?
|
[
"SELECT",
"rank",
"FROM",
"captain",
"GROUP",
"BY",
"rank",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"rank",
"from",
"captain",
"group",
"by",
"rank",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"rank",
"is",
"the",
"most",
"common",
"among",
"captains",
"?"
] |
ship_1
|
SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1
|
Return the rank for which there are the fewest captains.
|
[
"SELECT",
"rank",
"FROM",
"captain",
"GROUP",
"BY",
"rank",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"rank",
"from",
"captain",
"group",
"by",
"rank",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"rank",
"for",
"which",
"there",
"are",
"the",
"fewest",
"captains",
"."
] |
ship_1
|
SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2
|
Which classes have more than two captains?
|
[
"SELECT",
"CLASS",
"FROM",
"captain",
"GROUP",
"BY",
"CLASS",
"HAVING",
"count",
"(",
"*",
")",
">",
"2"
] |
[
"select",
"class",
"from",
"captain",
"group",
"by",
"class",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"Which",
"classes",
"have",
"more",
"than",
"two",
"captains",
"?"
] |
ship_1
|
SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2
|
Give the classes that have more than two captains.
|
[
"SELECT",
"CLASS",
"FROM",
"captain",
"GROUP",
"BY",
"CLASS",
"HAVING",
"count",
"(",
"*",
")",
">",
"2"
] |
[
"select",
"class",
"from",
"captain",
"group",
"by",
"class",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"Give",
"the",
"classes",
"that",
"have",
"more",
"than",
"two",
"captains",
"."
] |
ship_1
|
SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'
|
Find the name of captains whose rank are either Midshipman or Lieutenant.
|
[
"SELECT",
"name",
"FROM",
"captain",
"WHERE",
"rank",
"=",
"'Midshipman",
"'",
"OR",
"rank",
"=",
"'Lieutenant",
"'"
] |
[
"select",
"name",
"from",
"captain",
"where",
"rank",
"=",
"value",
"or",
"rank",
"=",
"value"
] |
[
"Find",
"the",
"name",
"of",
"captains",
"whose",
"rank",
"are",
"either",
"Midshipman",
"or",
"Lieutenant",
"."
] |
ship_1
|
SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'
|
What are the names of captains that have either the rank Midshipman or Lieutenant?
|
[
"SELECT",
"name",
"FROM",
"captain",
"WHERE",
"rank",
"=",
"'Midshipman",
"'",
"OR",
"rank",
"=",
"'Lieutenant",
"'"
] |
[
"select",
"name",
"from",
"captain",
"where",
"rank",
"=",
"value",
"or",
"rank",
"=",
"value"
] |
[
"What",
"are",
"the",
"names",
"of",
"captains",
"that",
"have",
"either",
"the",
"rank",
"Midshipman",
"or",
"Lieutenant",
"?"
] |
ship_1
|
SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS
|
What are the average and minimum age of captains in different class?
|
[
"SELECT",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
",",
"CLASS",
"FROM",
"captain",
"GROUP",
"BY",
"CLASS"
] |
[
"select",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
",",
"class",
"from",
"captain",
"group",
"by",
"class"
] |
[
"What",
"are",
"the",
"average",
"and",
"minimum",
"age",
"of",
"captains",
"in",
"different",
"class",
"?"
] |
ship_1
|
SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS
|
Return the average and minimum age of captains in each class.
|
[
"SELECT",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
",",
"CLASS",
"FROM",
"captain",
"GROUP",
"BY",
"CLASS"
] |
[
"select",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
",",
"class",
"from",
"captain",
"group",
"by",
"class"
] |
[
"Return",
"the",
"average",
"and",
"minimum",
"age",
"of",
"captains",
"in",
"each",
"class",
"."
] |
ship_1
|
SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'
|
Find the captain rank that has some captains in both Cutter and Armed schooner classes.
|
[
"SELECT",
"rank",
"FROM",
"captain",
"WHERE",
"CLASS",
"=",
"'Cutter",
"'",
"INTERSECT",
"SELECT",
"rank",
"FROM",
"captain",
"WHERE",
"CLASS",
"=",
"'Armed",
"schooner",
"'"
] |
[
"select",
"rank",
"from",
"captain",
"where",
"class",
"=",
"value",
"intersect",
"select",
"rank",
"from",
"captain",
"where",
"class",
"=",
"value"
] |
[
"Find",
"the",
"captain",
"rank",
"that",
"has",
"some",
"captains",
"in",
"both",
"Cutter",
"and",
"Armed",
"schooner",
"classes",
"."
] |
ship_1
|
SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'
|
What are the ranks of captains that are both in the Cutter and Armed schooner classes?
|
[
"SELECT",
"rank",
"FROM",
"captain",
"WHERE",
"CLASS",
"=",
"'Cutter",
"'",
"INTERSECT",
"SELECT",
"rank",
"FROM",
"captain",
"WHERE",
"CLASS",
"=",
"'Armed",
"schooner",
"'"
] |
[
"select",
"rank",
"from",
"captain",
"where",
"class",
"=",
"value",
"intersect",
"select",
"rank",
"from",
"captain",
"where",
"class",
"=",
"value"
] |
[
"What",
"are",
"the",
"ranks",
"of",
"captains",
"that",
"are",
"both",
"in",
"the",
"Cutter",
"and",
"Armed",
"schooner",
"classes",
"?"
] |
ship_1
|
SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'
|
Find the captain rank that has no captain in Third-rate ship of the line class.
|
[
"SELECT",
"rank",
"FROM",
"captain",
"EXCEPT",
"SELECT",
"rank",
"FROM",
"captain",
"WHERE",
"CLASS",
"=",
"'Third-rate",
"ship",
"of",
"the",
"line",
"'"
] |
[
"select",
"rank",
"from",
"captain",
"except",
"select",
"rank",
"from",
"captain",
"where",
"class",
"=",
"value"
] |
[
"Find",
"the",
"captain",
"rank",
"that",
"has",
"no",
"captain",
"in",
"Third-rate",
"ship",
"of",
"the",
"line",
"class",
"."
] |
ship_1
|
SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'
|
What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?
|
[
"SELECT",
"rank",
"FROM",
"captain",
"EXCEPT",
"SELECT",
"rank",
"FROM",
"captain",
"WHERE",
"CLASS",
"=",
"'Third-rate",
"ship",
"of",
"the",
"line",
"'"
] |
[
"select",
"rank",
"from",
"captain",
"except",
"select",
"rank",
"from",
"captain",
"where",
"class",
"=",
"value"
] |
[
"What",
"are",
"the",
"ranks",
"of",
"captains",
"that",
"have",
"no",
"captain",
"that",
"are",
"in",
"the",
"Third-rate",
"ship",
"of",
"the",
"line",
"class",
"?"
] |
ship_1
|
SELECT name FROM captain ORDER BY age LIMIT 1
|
What is the name of the youngest captain?
|
[
"SELECT",
"name",
"FROM",
"captain",
"ORDER",
"BY",
"age",
"LIMIT",
"1"
] |
[
"select",
"name",
"from",
"captain",
"order",
"by",
"age",
"limit",
"value"
] |
[
"What",
"is",
"the",
"name",
"of",
"the",
"youngest",
"captain",
"?"
] |
ship_1
|
SELECT name FROM captain ORDER BY age LIMIT 1
|
Return the name of the youngest captain.
|
[
"SELECT",
"name",
"FROM",
"captain",
"ORDER",
"BY",
"age",
"LIMIT",
"1"
] |
[
"select",
"name",
"from",
"captain",
"order",
"by",
"age",
"limit",
"value"
] |
[
"Return",
"the",
"name",
"of",
"the",
"youngest",
"captain",
"."
] |
ship_1
|
SELECT count(*) FROM ship
|
how many ships are there?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"ship"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"ship"
] |
[
"how",
"many",
"ships",
"are",
"there",
"?"
] |
ship_1
|
SELECT count(*) FROM ship
|
Count the number of ships.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"ship"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"ship"
] |
[
"Count",
"the",
"number",
"of",
"ships",
"."
] |
ship_1
|
SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1
|
Find the name, type, and flag of the ship that is built in the most recent year.
|
[
"SELECT",
"name",
",",
"TYPE",
",",
"flag",
"FROM",
"ship",
"ORDER",
"BY",
"built_year",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"name",
",",
"type",
",",
"flag",
"from",
"ship",
"order",
"by",
"built_year",
"desc",
"limit",
"value"
] |
[
"Find",
"the",
"name",
",",
"type",
",",
"and",
"flag",
"of",
"the",
"ship",
"that",
"is",
"built",
"in",
"the",
"most",
"recent",
"year",
"."
] |
ship_1
|
SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1
|
What is the name, type, and flag of the ship that was built in the most recent year?
|
[
"SELECT",
"name",
",",
"TYPE",
",",
"flag",
"FROM",
"ship",
"ORDER",
"BY",
"built_year",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"name",
",",
"type",
",",
"flag",
"from",
"ship",
"order",
"by",
"built_year",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"name",
",",
"type",
",",
"and",
"flag",
"of",
"the",
"ship",
"that",
"was",
"built",
"in",
"the",
"most",
"recent",
"year",
"?"
] |
ship_1
|
SELECT count(*) , flag FROM ship GROUP BY flag
|
Group by ships by flag, and return number of ships that have each flag.
|
[
"SELECT",
"count",
"(",
"*",
")",
",",
"flag",
"FROM",
"ship",
"GROUP",
"BY",
"flag"
] |
[
"select",
"count",
"(",
"*",
")",
",",
"flag",
"from",
"ship",
"group",
"by",
"flag"
] |
[
"Group",
"by",
"ships",
"by",
"flag",
",",
"and",
"return",
"number",
"of",
"ships",
"that",
"have",
"each",
"flag",
"."
] |
ship_1
|
SELECT count(*) , flag FROM ship GROUP BY flag
|
What are the different ship flags, and how many ships have each?
|
[
"SELECT",
"count",
"(",
"*",
")",
",",
"flag",
"FROM",
"ship",
"GROUP",
"BY",
"flag"
] |
[
"select",
"count",
"(",
"*",
")",
",",
"flag",
"from",
"ship",
"group",
"by",
"flag"
] |
[
"What",
"are",
"the",
"different",
"ship",
"flags",
",",
"and",
"how",
"many",
"ships",
"have",
"each",
"?"
] |
ship_1
|
SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1
|
Which flag is most widely used among all ships?
|
[
"SELECT",
"flag",
"FROM",
"ship",
"GROUP",
"BY",
"flag",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"flag",
"from",
"ship",
"group",
"by",
"flag",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"flag",
"is",
"most",
"widely",
"used",
"among",
"all",
"ships",
"?"
] |
ship_1
|
SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1
|
Return the flag that is most common among all ships.
|
[
"SELECT",
"flag",
"FROM",
"ship",
"GROUP",
"BY",
"flag",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"flag",
"from",
"ship",
"group",
"by",
"flag",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"flag",
"that",
"is",
"most",
"common",
"among",
"all",
"ships",
"."
] |
ship_1
|
SELECT name FROM ship ORDER BY built_year , CLASS
|
List all ship names in the order of built year and class.
|
[
"SELECT",
"name",
"FROM",
"ship",
"ORDER",
"BY",
"built_year",
",",
"CLASS"
] |
[
"select",
"name",
"from",
"ship",
"order",
"by",
"built_year",
",",
"class"
] |
[
"List",
"all",
"ship",
"names",
"in",
"the",
"order",
"of",
"built",
"year",
"and",
"class",
"."
] |
ship_1
|
SELECT name FROM ship ORDER BY built_year , CLASS
|
What are the names of ships, ordered by year they were built and their class?
|
[
"SELECT",
"name",
"FROM",
"ship",
"ORDER",
"BY",
"built_year",
",",
"CLASS"
] |
[
"select",
"name",
"from",
"ship",
"order",
"by",
"built_year",
",",
"class"
] |
[
"What",
"are",
"the",
"names",
"of",
"ships",
",",
"ordered",
"by",
"year",
"they",
"were",
"built",
"and",
"their",
"class",
"?"
] |
ship_1
|
SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'
|
Find the ship type that are used by both ships with Panama and Malta flags.
|
[
"SELECT",
"TYPE",
"FROM",
"ship",
"WHERE",
"flag",
"=",
"'Panama",
"'",
"INTERSECT",
"SELECT",
"TYPE",
"FROM",
"ship",
"WHERE",
"flag",
"=",
"'Malta",
"'"
] |
[
"select",
"type",
"from",
"ship",
"where",
"flag",
"=",
"value",
"intersect",
"select",
"type",
"from",
"ship",
"where",
"flag",
"=",
"value"
] |
[
"Find",
"the",
"ship",
"type",
"that",
"are",
"used",
"by",
"both",
"ships",
"with",
"Panama",
"and",
"Malta",
"flags",
"."
] |
ship_1
|
SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'
|
What types of ships have both ships that have Panama Flags and Malta flags?
|
[
"SELECT",
"TYPE",
"FROM",
"ship",
"WHERE",
"flag",
"=",
"'Panama",
"'",
"INTERSECT",
"SELECT",
"TYPE",
"FROM",
"ship",
"WHERE",
"flag",
"=",
"'Malta",
"'"
] |
[
"select",
"type",
"from",
"ship",
"where",
"flag",
"=",
"value",
"intersect",
"select",
"type",
"from",
"ship",
"where",
"flag",
"=",
"value"
] |
[
"What",
"types",
"of",
"ships",
"have",
"both",
"ships",
"that",
"have",
"Panama",
"Flags",
"and",
"Malta",
"flags",
"?"
] |
ship_1
|
SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1
|
In which year were most of ships built?
|
[
"SELECT",
"built_year",
"FROM",
"ship",
"GROUP",
"BY",
"built_year",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"built_year",
"from",
"ship",
"group",
"by",
"built_year",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"In",
"which",
"year",
"were",
"most",
"of",
"ships",
"built",
"?"
] |
ship_1
|
SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1
|
What is the year in which most ships were built?
|
[
"SELECT",
"built_year",
"FROM",
"ship",
"GROUP",
"BY",
"built_year",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"built_year",
"from",
"ship",
"group",
"by",
"built_year",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"year",
"in",
"which",
"most",
"ships",
"were",
"built",
"?"
] |
ship_1
|
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1
|
Find the name of the ships that have more than one captain.
|
[
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"GROUP",
"BY",
"t2.ship_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"group",
"by",
"t2",
".",
"ship_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"Find",
"the",
"name",
"of",
"the",
"ships",
"that",
"have",
"more",
"than",
"one",
"captain",
"."
] |
ship_1
|
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1
|
What are the names of ships that have more than one captain?
|
[
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"GROUP",
"BY",
"t2.ship_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"group",
"by",
"t2",
".",
"ship_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"What",
"are",
"the",
"names",
"of",
"ships",
"that",
"have",
"more",
"than",
"one",
"captain",
"?"
] |
ship_1
|
SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)
|
what are the names and classes of the ships that do not have any captain yet?
|
[
"SELECT",
"name",
",",
"CLASS",
"FROM",
"ship",
"WHERE",
"ship_id",
"NOT",
"IN",
"(",
"SELECT",
"ship_id",
"FROM",
"captain",
")"
] |
[
"select",
"name",
",",
"class",
"from",
"ship",
"where",
"ship_id",
"not",
"in",
"(",
"select",
"ship_id",
"from",
"captain",
")"
] |
[
"what",
"are",
"the",
"names",
"and",
"classes",
"of",
"the",
"ships",
"that",
"do",
"not",
"have",
"any",
"captain",
"yet",
"?"
] |
ship_1
|
SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)
|
Return the names and classes of ships that do not have a captain?
|
[
"SELECT",
"name",
",",
"CLASS",
"FROM",
"ship",
"WHERE",
"ship_id",
"NOT",
"IN",
"(",
"SELECT",
"ship_id",
"FROM",
"captain",
")"
] |
[
"select",
"name",
",",
"class",
"from",
"ship",
"where",
"ship_id",
"not",
"in",
"(",
"select",
"ship_id",
"from",
"captain",
")"
] |
[
"Return",
"the",
"names",
"and",
"classes",
"of",
"ships",
"that",
"do",
"not",
"have",
"a",
"captain",
"?"
] |
ship_1
|
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1
|
Find the name of the ship that is steered by the youngest captain.
|
[
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"ORDER",
"BY",
"t2.age",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"order",
"by",
"t2",
".",
"age",
"limit",
"value"
] |
[
"Find",
"the",
"name",
"of",
"the",
"ship",
"that",
"is",
"steered",
"by",
"the",
"youngest",
"captain",
"."
] |
ship_1
|
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1
|
What is the name of the ship that is commanded by the youngest captain?
|
[
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"ORDER",
"BY",
"t2.age",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"order",
"by",
"t2",
".",
"age",
"limit",
"value"
] |
[
"What",
"is",
"the",
"name",
"of",
"the",
"ship",
"that",
"is",
"commanded",
"by",
"the",
"youngest",
"captain",
"?"
] |
ship_1
|
SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')
|
Find the name and flag of ships that are not steered by any captain with Midshipman rank.
|
[
"SELECT",
"name",
",",
"flag",
"FROM",
"ship",
"WHERE",
"ship_id",
"NOT",
"IN",
"(",
"SELECT",
"ship_id",
"FROM",
"captain",
"WHERE",
"rank",
"=",
"'Midshipman",
"'",
")"
] |
[
"select",
"name",
",",
"flag",
"from",
"ship",
"where",
"ship_id",
"not",
"in",
"(",
"select",
"ship_id",
"from",
"captain",
"where",
"rank",
"=",
"value",
")"
] |
[
"Find",
"the",
"name",
"and",
"flag",
"of",
"ships",
"that",
"are",
"not",
"steered",
"by",
"any",
"captain",
"with",
"Midshipman",
"rank",
"."
] |
ship_1
|
SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')
|
What are the names and flags of ships that do not have a captain with the rank of Midshipman?
|
[
"SELECT",
"name",
",",
"flag",
"FROM",
"ship",
"WHERE",
"ship_id",
"NOT",
"IN",
"(",
"SELECT",
"ship_id",
"FROM",
"captain",
"WHERE",
"rank",
"=",
"'Midshipman",
"'",
")"
] |
[
"select",
"name",
",",
"flag",
"from",
"ship",
"where",
"ship_id",
"not",
"in",
"(",
"select",
"ship_id",
"from",
"captain",
"where",
"rank",
"=",
"value",
")"
] |
[
"What",
"are",
"the",
"names",
"and",
"flags",
"of",
"ships",
"that",
"do",
"not",
"have",
"a",
"captain",
"with",
"the",
"rank",
"of",
"Midshipman",
"?"
] |
ship_1
|
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'
|
Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.
|
[
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"WHERE",
"t2.rank",
"=",
"'Midshipman",
"'",
"INTERSECT",
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"WHERE",
"t2.rank",
"=",
"'Lieutenant",
"'"
] |
[
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"where",
"t2",
".",
"rank",
"=",
"value",
"intersect",
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"where",
"t2",
".",
"rank",
"=",
"value"
] |
[
"Find",
"the",
"name",
"of",
"the",
"ships",
"that",
"are",
"steered",
"by",
"both",
"a",
"captain",
"with",
"Midshipman",
"rank",
"and",
"a",
"captain",
"with",
"Lieutenant",
"rank",
"."
] |
ship_1
|
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'
|
What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?
|
[
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"WHERE",
"t2.rank",
"=",
"'Midshipman",
"'",
"INTERSECT",
"SELECT",
"t1.name",
"FROM",
"ship",
"AS",
"t1",
"JOIN",
"captain",
"AS",
"t2",
"ON",
"t1.ship_id",
"=",
"t2.ship_id",
"WHERE",
"t2.rank",
"=",
"'Lieutenant",
"'"
] |
[
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"where",
"t2",
".",
"rank",
"=",
"value",
"intersect",
"select",
"t1",
".",
"name",
"from",
"ship",
"as",
"t1",
"join",
"captain",
"as",
"t2",
"on",
"t1",
".",
"ship_id",
"=",
"t2",
".",
"ship_id",
"where",
"t2",
".",
"rank",
"=",
"value"
] |
[
"What",
"are",
"the",
"names",
"of",
"ships",
"that",
"are",
"commanded",
"by",
"both",
"captains",
"with",
"the",
"rank",
"of",
"Midshipman",
"and",
"captains",
"with",
"the",
"rank",
"of",
"Lieutenant",
"?"
] |
city_record
|
SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1
|
What is id of the city that hosted events in the most recent year?
|
[
"SELECT",
"host_city",
"FROM",
"hosting_city",
"ORDER",
"BY",
"YEAR",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"host_city",
"from",
"hosting_city",
"order",
"by",
"year",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"id",
"of",
"the",
"city",
"that",
"hosted",
"events",
"in",
"the",
"most",
"recent",
"year",
"?"
] |
city_record
|
SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1
|
Find the city that hosted some events in the most recent year. What is the id of this city?
|
[
"SELECT",
"host_city",
"FROM",
"hosting_city",
"ORDER",
"BY",
"YEAR",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"host_city",
"from",
"hosting_city",
"order",
"by",
"year",
"desc",
"limit",
"value"
] |
[
"Find",
"the",
"city",
"that",
"hosted",
"some",
"events",
"in",
"the",
"most",
"recent",
"year",
".",
"What",
"is",
"the",
"id",
"of",
"this",
"city",
"?"
] |
city_record
|
SELECT match_id FROM MATCH WHERE competition = "1994 FIFA World Cup qualification"
|
Find the match ids of the cities that hosted competition "1994 FIFA World Cup qualification"?
|
[
"SELECT",
"match_id",
"FROM",
"MATCH",
"WHERE",
"competition",
"=",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''"
] |
[
"select",
"match_id",
"from",
"match",
"where",
"competition",
"=",
"value"
] |
[
"Find",
"the",
"match",
"ids",
"of",
"the",
"cities",
"that",
"hosted",
"competition",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''",
"?"
] |
city_record
|
SELECT match_id FROM MATCH WHERE competition = "1994 FIFA World Cup qualification"
|
What is the match id of the competition called "1994 FIFA World Cup qualification"?
|
[
"SELECT",
"match_id",
"FROM",
"MATCH",
"WHERE",
"competition",
"=",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''"
] |
[
"select",
"match_id",
"from",
"match",
"where",
"competition",
"=",
"value"
] |
[
"What",
"is",
"the",
"match",
"id",
"of",
"the",
"competition",
"called",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010
|
Find the cities which were once a host city after 2010?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"WHERE",
"T2.year",
">",
"2010"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"where",
"t2",
".",
"year",
">",
"value"
] |
[
"Find",
"the",
"cities",
"which",
"were",
"once",
"a",
"host",
"city",
"after",
"2010",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010
|
Which cities served as a host city after 2010?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"WHERE",
"T2.year",
">",
"2010"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"where",
"t2",
".",
"year",
">",
"value"
] |
[
"Which",
"cities",
"served",
"as",
"a",
"host",
"city",
"after",
"2010",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1
|
Which city has hosted the most events?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"GROUP",
"BY",
"T2.host_city",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"group",
"by",
"t2",
".",
"host_city",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"city",
"has",
"hosted",
"the",
"most",
"events",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1
|
Find the city that hosted the most events.
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"GROUP",
"BY",
"T2.host_city",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"group",
"by",
"t2",
".",
"host_city",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Find",
"the",
"city",
"that",
"hosted",
"the",
"most",
"events",
"."
] |
city_record
|
SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = "Nanjing ( Jiangsu )" AND T3.competition = "1994 FIFA World Cup qualification"
|
What is the venue of the competition "1994 FIFA World Cup qualification" hosted by "Nanjing ( Jiangsu )"?
|
[
"SELECT",
"T3.venue",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"JOIN",
"MATCH",
"AS",
"T3",
"ON",
"T2.match_id",
"=",
"T3.match_id",
"WHERE",
"T1.city",
"=",
"``",
"Nanjing",
"(",
"Jiangsu",
")",
"''",
"AND",
"T3.competition",
"=",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''"
] |
[
"select",
"t3",
".",
"venue",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"join",
"match",
"as",
"t3",
"on",
"t2",
".",
"match_id",
"=",
"t3",
".",
"match_id",
"where",
"t1",
".",
"city",
"=",
"value",
"and",
"t3",
".",
"competition",
"=",
"value"
] |
[
"What",
"is",
"the",
"venue",
"of",
"the",
"competition",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''",
"hosted",
"by",
"``",
"Nanjing",
"(",
"Jiangsu",
")",
"''",
"?"
] |
city_record
|
SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = "Nanjing ( Jiangsu )" AND T3.competition = "1994 FIFA World Cup qualification"
|
Find the venue of the competition "1994 FIFA World Cup qualification" which was hosted by "Nanjing ( Jiangsu )".
|
[
"SELECT",
"T3.venue",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"JOIN",
"MATCH",
"AS",
"T3",
"ON",
"T2.match_id",
"=",
"T3.match_id",
"WHERE",
"T1.city",
"=",
"``",
"Nanjing",
"(",
"Jiangsu",
")",
"''",
"AND",
"T3.competition",
"=",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''"
] |
[
"select",
"t3",
".",
"venue",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"join",
"match",
"as",
"t3",
"on",
"t2",
".",
"match_id",
"=",
"t3",
".",
"match_id",
"where",
"t1",
".",
"city",
"=",
"value",
"and",
"t3",
".",
"competition",
"=",
"value"
] |
[
"Find",
"the",
"venue",
"of",
"the",
"competition",
"``",
"1994",
"FIFA",
"World",
"Cup",
"qualification",
"''",
"which",
"was",
"hosted",
"by",
"``",
"Nanjing",
"(",
"Jiangsu",
")",
"''",
"."
] |
city_record
|
SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = "Shanghai"
|
Give me the temperature of Shanghai in January.
|
[
"SELECT",
"T2.Jan",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T1.city",
"=",
"``",
"Shanghai",
"''"
] |
[
"select",
"t2",
".",
"jan",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t1",
".",
"city",
"=",
"value"
] |
[
"Give",
"me",
"the",
"temperature",
"of",
"Shanghai",
"in",
"January",
"."
] |
city_record
|
SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = "Shanghai"
|
What is the temperature of "Shanghai" city in January?
|
[
"SELECT",
"T2.Jan",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T1.city",
"=",
"``",
"Shanghai",
"''"
] |
[
"select",
"t2",
".",
"jan",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t1",
".",
"city",
"=",
"value"
] |
[
"What",
"is",
"the",
"temperature",
"of",
"``",
"Shanghai",
"''",
"city",
"in",
"January",
"?"
] |
city_record
|
SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = "Taizhou ( Zhejiang )"
|
What is the host year of city "Taizhou ( Zhejiang )"?
|
[
"SELECT",
"T2.year",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"WHERE",
"T1.city",
"=",
"``",
"Taizhou",
"(",
"Zhejiang",
")",
"''"
] |
[
"select",
"t2",
".",
"year",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"where",
"t1",
".",
"city",
"=",
"value"
] |
[
"What",
"is",
"the",
"host",
"year",
"of",
"city",
"``",
"Taizhou",
"(",
"Zhejiang",
")",
"''",
"?"
] |
city_record
|
SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = "Taizhou ( Zhejiang )"
|
IN which year did city "Taizhou ( Zhejiang )" serve as a host city?
|
[
"SELECT",
"T2.year",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"hosting_city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.host_city",
"WHERE",
"T1.city",
"=",
"``",
"Taizhou",
"(",
"Zhejiang",
")",
"''"
] |
[
"select",
"t2",
".",
"year",
"from",
"city",
"as",
"t1",
"join",
"hosting_city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"host_city",
"where",
"t1",
".",
"city",
"=",
"value"
] |
[
"IN",
"which",
"year",
"did",
"city",
"``",
"Taizhou",
"(",
"Zhejiang",
")",
"''",
"serve",
"as",
"a",
"host",
"city",
"?"
] |
city_record
|
SELECT city FROM city ORDER BY regional_population DESC LIMIT 3
|
Which three cities have the largest regional population?
|
[
"SELECT",
"city",
"FROM",
"city",
"ORDER",
"BY",
"regional_population",
"DESC",
"LIMIT",
"3"
] |
[
"select",
"city",
"from",
"city",
"order",
"by",
"regional_population",
"desc",
"limit",
"value"
] |
[
"Which",
"three",
"cities",
"have",
"the",
"largest",
"regional",
"population",
"?"
] |
city_record
|
SELECT city FROM city ORDER BY regional_population DESC LIMIT 3
|
What are the three largest cities in terms of regional population?
|
[
"SELECT",
"city",
"FROM",
"city",
"ORDER",
"BY",
"regional_population",
"DESC",
"LIMIT",
"3"
] |
[
"select",
"city",
"from",
"city",
"order",
"by",
"regional_population",
"desc",
"limit",
"value"
] |
[
"What",
"are",
"the",
"three",
"largest",
"cities",
"in",
"terms",
"of",
"regional",
"population",
"?"
] |
city_record
|
SELECT city , GDP FROM city ORDER BY GDP LIMIT 1
|
Which city has the lowest GDP? Please list the city name and its GDP.
|
[
"SELECT",
"city",
",",
"GDP",
"FROM",
"city",
"ORDER",
"BY",
"GDP",
"LIMIT",
"1"
] |
[
"select",
"city",
",",
"gdp",
"from",
"city",
"order",
"by",
"gdp",
"limit",
"value"
] |
[
"Which",
"city",
"has",
"the",
"lowest",
"GDP",
"?",
"Please",
"list",
"the",
"city",
"name",
"and",
"its",
"GDP",
"."
] |
city_record
|
SELECT city , GDP FROM city ORDER BY GDP LIMIT 1
|
What is the city with the smallest GDP? Return the city and its GDP.
|
[
"SELECT",
"city",
",",
"GDP",
"FROM",
"city",
"ORDER",
"BY",
"GDP",
"LIMIT",
"1"
] |
[
"select",
"city",
",",
"gdp",
"from",
"city",
"order",
"by",
"gdp",
"limit",
"value"
] |
[
"What",
"is",
"the",
"city",
"with",
"the",
"smallest",
"GDP",
"?",
"Return",
"the",
"city",
"and",
"its",
"GDP",
"."
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1
|
Which city has the highest temperature in February?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"ORDER",
"BY",
"T2.Feb",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"order",
"by",
"t2",
".",
"feb",
"desc",
"limit",
"value"
] |
[
"Which",
"city",
"has",
"the",
"highest",
"temperature",
"in",
"February",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1
|
In February, which city marks the highest temperature?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"ORDER",
"BY",
"T2.Feb",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"order",
"by",
"t2",
".",
"feb",
"desc",
"limit",
"value"
] |
[
"In",
"February",
",",
"which",
"city",
"marks",
"the",
"highest",
"temperature",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct
|
Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Mar",
"<",
"T2.Jul",
"OR",
"T2.Mar",
">",
"T2.Oct"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"mar",
"<",
"t2",
".",
"jul",
"or",
"t2",
".",
"mar",
">",
"t2",
".",
"oct"
] |
[
"Give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"temperature",
"in",
"March",
"is",
"lower",
"than",
"that",
"in",
"July",
"or",
"higher",
"than",
"that",
"in",
"Oct",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct
|
Which cities' temperature in March is lower than that in July or higher than that in Oct?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Mar",
"<",
"T2.Jul",
"OR",
"T2.Mar",
">",
"T2.Oct"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"mar",
"<",
"t2",
".",
"jul",
"or",
"t2",
".",
"mar",
">",
"t2",
".",
"oct"
] |
[
"Which",
"cities",
"'",
"temperature",
"in",
"March",
"is",
"lower",
"than",
"that",
"in",
"July",
"or",
"higher",
"than",
"that",
"in",
"Oct",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
|
Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Mar",
"<",
"T2.Jul",
"INTERSECT",
"SELECT",
"T3.city",
"FROM",
"city",
"AS",
"T3",
"JOIN",
"hosting_city",
"AS",
"T4",
"ON",
"T3.city_id",
"=",
"T4.host_city"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"mar",
"<",
"t2",
".",
"jul",
"intersect",
"select",
"t3",
".",
"city",
"from",
"city",
"as",
"t3",
"join",
"hosting_city",
"as",
"t4",
"on",
"t3",
".",
"city_id",
"=",
"t4",
".",
"host_city"
] |
[
"Give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"temperature",
"in",
"Mar",
"is",
"lower",
"than",
"that",
"in",
"July",
"and",
"which",
"have",
"also",
"served",
"as",
"host",
"cities",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
|
Which cities have lower temperature in March than in July and have been once host cities?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Mar",
"<",
"T2.Jul",
"INTERSECT",
"SELECT",
"T3.city",
"FROM",
"city",
"AS",
"T3",
"JOIN",
"hosting_city",
"AS",
"T4",
"ON",
"T3.city_id",
"=",
"T4.host_city"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"mar",
"<",
"t2",
".",
"jul",
"intersect",
"select",
"t3",
".",
"city",
"from",
"city",
"as",
"t3",
"join",
"hosting_city",
"as",
"t4",
"on",
"t3",
".",
"city_id",
"=",
"t4",
".",
"host_city"
] |
[
"Which",
"cities",
"have",
"lower",
"temperature",
"in",
"March",
"than",
"in",
"July",
"and",
"have",
"been",
"once",
"host",
"cities",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
|
Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Mar",
"<",
"T2.Dec",
"EXCEPT",
"SELECT",
"T3.city",
"FROM",
"city",
"AS",
"T3",
"JOIN",
"hosting_city",
"AS",
"T4",
"ON",
"T3.city_id",
"=",
"T4.host_city"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"mar",
"<",
"t2",
".",
"dec",
"except",
"select",
"t3",
".",
"city",
"from",
"city",
"as",
"t3",
"join",
"hosting_city",
"as",
"t4",
"on",
"t3",
".",
"city_id",
"=",
"t4",
".",
"host_city"
] |
[
"Give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"temperature",
"in",
"Mar",
"is",
"lower",
"than",
"that",
"in",
"Dec",
"and",
"which",
"have",
"never",
"been",
"host",
"cities",
"."
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
|
Which cities have lower temperature in March than in Dec and have never served as host cities?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Mar",
"<",
"T2.Dec",
"EXCEPT",
"SELECT",
"T3.city",
"FROM",
"city",
"AS",
"T3",
"JOIN",
"hosting_city",
"AS",
"T4",
"ON",
"T3.city_id",
"=",
"T4.host_city"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"mar",
"<",
"t2",
".",
"dec",
"except",
"select",
"t3",
".",
"city",
"from",
"city",
"as",
"t3",
"join",
"hosting_city",
"as",
"t4",
"on",
"t3",
".",
"city_id",
"=",
"t4",
".",
"host_city"
] |
[
"Which",
"cities",
"have",
"lower",
"temperature",
"in",
"March",
"than",
"in",
"Dec",
"and",
"have",
"never",
"served",
"as",
"host",
"cities",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
|
Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Feb",
">",
"T2.Jun",
"UNION",
"SELECT",
"T3.city",
"FROM",
"city",
"AS",
"T3",
"JOIN",
"hosting_city",
"AS",
"T4",
"ON",
"T3.city_id",
"=",
"T4.host_city"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"feb",
">",
"t2",
".",
"jun",
"union",
"select",
"t3",
".",
"city",
"from",
"city",
"as",
"t3",
"join",
"hosting_city",
"as",
"t4",
"on",
"t3",
".",
"city_id",
"=",
"t4",
".",
"host_city"
] |
[
"Give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"temperature",
"in",
"Feb",
"is",
"higher",
"than",
"that",
"in",
"Jun",
"or",
"cities",
"that",
"were",
"once",
"host",
"cities",
"?"
] |
city_record
|
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
|
Which cities have higher temperature in Feb than in Jun or have once served as host cities?
|
[
"SELECT",
"T1.city",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"temperature",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"WHERE",
"T2.Feb",
">",
"T2.Jun",
"UNION",
"SELECT",
"T3.city",
"FROM",
"city",
"AS",
"T3",
"JOIN",
"hosting_city",
"AS",
"T4",
"ON",
"T3.city_id",
"=",
"T4.host_city"
] |
[
"select",
"t1",
".",
"city",
"from",
"city",
"as",
"t1",
"join",
"temperature",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"where",
"t2",
".",
"feb",
">",
"t2",
".",
"jun",
"union",
"select",
"t3",
".",
"city",
"from",
"city",
"as",
"t3",
"join",
"hosting_city",
"as",
"t4",
"on",
"t3",
".",
"city_id",
"=",
"t4",
".",
"host_city"
] |
[
"Which",
"cities",
"have",
"higher",
"temperature",
"in",
"Feb",
"than",
"in",
"Jun",
"or",
"have",
"once",
"served",
"as",
"host",
"cities",
"?"
] |
city_record
|
SELECT city FROM city WHERE regional_population > 10000000
|
Please give me a list of cities whose regional population is over 10000000.
|
[
"SELECT",
"city",
"FROM",
"city",
"WHERE",
"regional_population",
">",
"10000000"
] |
[
"select",
"city",
"from",
"city",
"where",
"regional_population",
">",
"value"
] |
[
"Please",
"give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"regional",
"population",
"is",
"over",
"10000000",
"."
] |
city_record
|
SELECT city FROM city WHERE regional_population > 10000000
|
Which cities have regional population above 10000000?
|
[
"SELECT",
"city",
"FROM",
"city",
"WHERE",
"regional_population",
">",
"10000000"
] |
[
"select",
"city",
"from",
"city",
"where",
"regional_population",
">",
"value"
] |
[
"Which",
"cities",
"have",
"regional",
"population",
"above",
"10000000",
"?"
] |
city_record
|
SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000
|
Please give me a list of cities whose regional population is over 8000000 or under 5000000.
|
[
"SELECT",
"city",
"FROM",
"city",
"WHERE",
"regional_population",
">",
"10000000",
"UNION",
"SELECT",
"city",
"FROM",
"city",
"WHERE",
"regional_population",
"<",
"5000000"
] |
[
"select",
"city",
"from",
"city",
"where",
"regional_population",
">",
"value",
"union",
"select",
"city",
"from",
"city",
"where",
"regional_population",
"<",
"value"
] |
[
"Please",
"give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"regional",
"population",
"is",
"over",
"8000000",
"or",
"under",
"5000000",
"."
] |
city_record
|
SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000
|
Which cities have regional population above 8000000 or below 5000000?
|
[
"SELECT",
"city",
"FROM",
"city",
"WHERE",
"regional_population",
">",
"10000000",
"UNION",
"SELECT",
"city",
"FROM",
"city",
"WHERE",
"regional_population",
"<",
"5000000"
] |
[
"select",
"city",
"from",
"city",
"where",
"regional_population",
">",
"value",
"union",
"select",
"city",
"from",
"city",
"where",
"regional_population",
"<",
"value"
] |
[
"Which",
"cities",
"have",
"regional",
"population",
"above",
"8000000",
"or",
"below",
"5000000",
"?"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.