db_id stringclasses 20
values | query stringlengths 20 422 | question stringlengths 22 174 | query_toks listlengths 4 63 | query_toks_no_value listlengths 4 88 | question_toks listlengths 5 33 |
|---|---|---|---|---|---|
concert_singer | SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France' | What is the average, minimum, and maximum age for all French singers? | [
"SELECT",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
"FROM",
"singer",
"WHERE",
"country",
"=",
"'France",
"'"
] | [
"select",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
"from",
"singer",
"where",
"country",
"=",
"value"
] | [
"What",
"is",
"the",
"average",
",",
"minimum",
",",
"and",
"maximum",
"age",
"for",
"all",
"French",
"singers",
"?"
] |
concert_singer | SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1 | Show the name and the release year of the song by the youngest singer. | [
"SELECT",
"song_name",
",",
"song_release_year",
"FROM",
"singer",
"ORDER",
"BY",
"age",
"LIMIT",
"1"
] | [
"select",
"song_name",
",",
"song_release_year",
"from",
"singer",
"order",
"by",
"age",
"limit",
"value"
] | [
"Show",
"the",
"name",
"and",
"the",
"release",
"year",
"of",
"the",
"song",
"by",
"the",
"youngest",
"singer",
"."
] |
concert_singer | SELECT country , count(*) FROM singer GROUP BY country | Show all countries and the number of singers in each country. | [
"SELECT",
"country",
",",
"count",
"(",
"*",
")",
"FROM",
"singer",
"GROUP",
"BY",
"country"
] | [
"select",
"country",
",",
"count",
"(",
"*",
")",
"from",
"singer",
"group",
"by",
"country"
] | [
"Show",
"all",
"countries",
"and",
"the",
"number",
"of",
"singers",
"in",
"each",
"country",
"."
] |
concert_singer | SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000 | Show location and name for all stadiums with a capacity between 5000 and 10000. | [
"SELECT",
"LOCATION",
",",
"name",
"FROM",
"stadium",
"WHERE",
"capacity",
"BETWEEN",
"5000",
"AND",
"10000"
] | [
"select",
"location",
",",
"name",
"from",
"stadium",
"where",
"capacity",
"between",
"value",
"and",
"value"
] | [
"Show",
"location",
"and",
"name",
"for",
"all",
"stadiums",
"with",
"a",
"capacity",
"between",
"5000",
"and",
"10000",
"."
] |
concert_singer | SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id | Show the stadium name and the number of concerts in each stadium. | [
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"concert",
"AS",
"T1",
"JOIN",
"stadium",
"AS",
"T2",
"ON",
"T1.stadium_id",
"=",
"T2.stadium_id",
"GROUP",
"BY",
"T1.stadium_id"
] | [
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1",
".",
"stadium_id",
"=",
"t2",
".",
"stadium_id",
"group",
"by",
"t1",
".",
"stadium_id"
] | [
"Show",
"the",
"stadium",
"name",
"and",
"the",
"number",
"of",
"concerts",
"in",
"each",
"stadium",
"."
] |
concert_singer | SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert) | What are the names of the stadiums without any concerts? | [
"SELECT",
"name",
"FROM",
"stadium",
"WHERE",
"stadium_id",
"NOT",
"IN",
"(",
"SELECT",
"stadium_id",
"FROM",
"concert",
")"
] | [
"select",
"name",
"from",
"stadium",
"where",
"stadium_id",
"not",
"in",
"(",
"select",
"stadium_id",
"from",
"concert",
")"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"stadiums",
"without",
"any",
"concerts",
"?"
] |
concert_singer | SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014 | Show names for all stadiums except for stadiums having a concert in year 2014. | [
"SELECT",
"name",
"FROM",
"stadium",
"EXCEPT",
"SELECT",
"T2.name",
"FROM",
"concert",
"AS",
"T1",
"JOIN",
"stadium",
"AS",
"T2",
"ON",
"T1.stadium_id",
"=",
"T2.stadium_id",
"WHERE",
"T1.year",
"=",
"2014"
] | [
"select",
"name",
"from",
"stadium",
"except",
"select",
"t2",
".",
"name",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1",
".",
"stadium_id",
"=",
"t2",
".",
"stadium_id",
"where",
"t1",
".",
"year",
"=",
"value"
] | [
"Show",
"names",
"for",
"all",
"stadiums",
"except",
"for",
"stadiums",
"having",
"a",
"concert",
"in",
"year",
"2014",
"."
] |
concert_singer | SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014 | What are the names of all stadiums that did not have a concert in 2014? | [
"SELECT",
"name",
"FROM",
"stadium",
"EXCEPT",
"SELECT",
"T2.name",
"FROM",
"concert",
"AS",
"T1",
"JOIN",
"stadium",
"AS",
"T2",
"ON",
"T1.stadium_id",
"=",
"T2.stadium_id",
"WHERE",
"T1.year",
"=",
"2014"
] | [
"select",
"name",
"from",
"stadium",
"except",
"select",
"t2",
".",
"name",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1",
".",
"stadium_id",
"=",
"t2",
".",
"stadium_id",
"where",
"t1",
".",
"year",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"all",
"stadiums",
"that",
"did",
"not",
"have",
"a",
"concert",
"in",
"2014",
"?"
] |
concert_singer | SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id | Show the name and theme for all concerts and the number of singers in each concert. | [
"SELECT",
"T2.concert_name",
",",
"T2.theme",
",",
"count",
"(",
"*",
")",
"FROM",
"singer_in_concert",
"AS",
"T1",
"JOIN",
"concert",
"AS",
"T2",
"ON",
"T1.concert_id",
"=",
"T2.concert_id",
"GROUP",
"BY",
"T2.concert_id"
] | [
"select",
"t2",
".",
"concert_name",
",",
"t2",
".",
"theme",
",",
"count",
"(",
"*",
")",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"concert",
"as",
"t2",
"on",
"t1",
".",
"concert_id",
"=",
"t2",
".",
"concert_id",
"group",
"by",
"t2",
".",
... | [
"Show",
"the",
"name",
"and",
"theme",
"for",
"all",
"concerts",
"and",
"the",
"number",
"of",
"singers",
"in",
"each",
"concert",
"."
] |
concert_singer | select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id | What are the names , themes , and number of singers for every concert ? | [
"select",
"t2.concert_name",
",",
"t2.theme",
",",
"count",
"(",
"*",
")",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"concert",
"as",
"t2",
"on",
"t1.concert_id",
"=",
"t2.concert_id",
"group",
"by",
"t2.concert_id"
] | [
"select",
"t2",
".",
"concert_name",
",",
"t2",
".",
"theme",
",",
"count",
"(",
"*",
")",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"concert",
"as",
"t2",
"on",
"t1",
".",
"concert_id",
"=",
"t2",
".",
"concert_id",
"group",
"by",
"t2",
".",
... | [
"What",
"are",
"the",
"names",
",",
"themes",
",",
"and",
"number",
"of",
"singers",
"for",
"every",
"concert",
"?"
] |
concert_singer | SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id | List singer names and number of concerts for each singer. | [
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"singer_in_concert",
"AS",
"T1",
"JOIN",
"singer",
"AS",
"T2",
"ON",
"T1.singer_id",
"=",
"T2.singer_id",
"GROUP",
"BY",
"T2.singer_id"
] | [
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"singer",
"as",
"t2",
"on",
"t1",
".",
"singer_id",
"=",
"t2",
".",
"singer_id",
"group",
"by",
"t2",
".",
"singer_id"
] | [
"List",
"singer",
"names",
"and",
"number",
"of",
"concerts",
"for",
"each",
"singer",
"."
] |
concert_singer | SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id | What are the names of the singers and number of concerts for each person? | [
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"singer_in_concert",
"AS",
"T1",
"JOIN",
"singer",
"AS",
"T2",
"ON",
"T1.singer_id",
"=",
"T2.singer_id",
"GROUP",
"BY",
"T2.singer_id"
] | [
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"singer",
"as",
"t2",
"on",
"t1",
".",
"singer_id",
"=",
"t2",
".",
"singer_id",
"group",
"by",
"t2",
".",
"singer_id"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"singers",
"and",
"number",
"of",
"concerts",
"for",
"each",
"person",
"?"
] |
concert_singer | SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 | List all singer names in concerts in year 2014. | [
"SELECT",
"T2.name",
"FROM",
"singer_in_concert",
"AS",
"T1",
"JOIN",
"singer",
"AS",
"T2",
"ON",
"T1.singer_id",
"=",
"T2.singer_id",
"JOIN",
"concert",
"AS",
"T3",
"ON",
"T1.concert_id",
"=",
"T3.concert_id",
"WHERE",
"T3.year",
"=",
"2014"
] | [
"select",
"t2",
".",
"name",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"singer",
"as",
"t2",
"on",
"t1",
".",
"singer_id",
"=",
"t2",
".",
"singer_id",
"join",
"concert",
"as",
"t3",
"on",
"t1",
".",
"concert_id",
"=",
"t3",
".",
"concert_id",
"... | [
"List",
"all",
"singer",
"names",
"in",
"concerts",
"in",
"year",
"2014",
"."
] |
concert_singer | SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 | What are the names of the singers who performed in a concert in 2014? | [
"SELECT",
"T2.name",
"FROM",
"singer_in_concert",
"AS",
"T1",
"JOIN",
"singer",
"AS",
"T2",
"ON",
"T1.singer_id",
"=",
"T2.singer_id",
"JOIN",
"concert",
"AS",
"T3",
"ON",
"T1.concert_id",
"=",
"T3.concert_id",
"WHERE",
"T3.year",
"=",
"2014"
] | [
"select",
"t2",
".",
"name",
"from",
"singer_in_concert",
"as",
"t1",
"join",
"singer",
"as",
"t2",
"on",
"t1",
".",
"singer_id",
"=",
"t2",
".",
"singer_id",
"join",
"concert",
"as",
"t3",
"on",
"t1",
".",
"concert_id",
"=",
"t3",
".",
"concert_id",
"... | [
"What",
"are",
"the",
"names",
"of",
"the",
"singers",
"who",
"performed",
"in",
"a",
"concert",
"in",
"2014",
"?"
] |
concert_singer | SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015 | Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015. | [
"SELECT",
"T2.name",
",",
"T2.location",
"FROM",
"concert",
"AS",
"T1",
"JOIN",
"stadium",
"AS",
"T2",
"ON",
"T1.stadium_id",
"=",
"T2.stadium_id",
"WHERE",
"T1.Year",
"=",
"2014",
"INTERSECT",
"SELECT",
"T2.name",
",",
"T2.location",
"FROM",
"concert",
"AS",
... | [
"select",
"t2",
".",
"name",
",",
"t2",
".",
"location",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1",
".",
"stadium_id",
"=",
"t2",
".",
"stadium_id",
"where",
"t1",
".",
"year",
"=",
"value",
"intersect",
"select",
"t2",
... | [
"Find",
"the",
"name",
"and",
"location",
"of",
"the",
"stadiums",
"which",
"some",
"concerts",
"happened",
"in",
"the",
"years",
"of",
"both",
"2014",
"and",
"2015",
"."
] |
concert_singer | select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1) | What are the number of concerts that occurred in the stadium with the largest capacity ? | [
"select",
"count",
"(",
"*",
")",
"from",
"concert",
"where",
"stadium_id",
"=",
"(",
"select",
"stadium_id",
"from",
"stadium",
"order",
"by",
"capacity",
"desc",
"limit",
"1",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"concert",
"where",
"stadium_id",
"=",
"(",
"select",
"stadium_id",
"from",
"stadium",
"order",
"by",
"capacity",
"desc",
"limit",
"value",
")"
] | [
"What",
"are",
"the",
"number",
"of",
"concerts",
"that",
"occurred",
"in",
"the",
"stadium",
"with",
"the",
"largest",
"capacity",
"?"
] |
pets_1 | SELECT weight FROM pets ORDER BY pet_age LIMIT 1 | Find the weight of the youngest dog. | [
"SELECT",
"weight",
"FROM",
"pets",
"ORDER",
"BY",
"pet_age",
"LIMIT",
"1"
] | [
"select",
"weight",
"from",
"pets",
"order",
"by",
"pet_age",
"limit",
"value"
] | [
"Find",
"the",
"weight",
"of",
"the",
"youngest",
"dog",
"."
] |
pets_1 | SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 | Find number of pets owned by students who are older than 20. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"WHERE",
"T1.age",
">",
"20"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"where",
"t1",
".",
"age",
">",
"value"
] | [
"Find",
"number",
"of",
"pets",
"owned",
"by",
"students",
"who",
"are",
"older",
"than",
"20",
"."
] |
pets_1 | SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 | How many pets are owned by students that have an age greater than 20? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"WHERE",
"T1.age",
">",
"20"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"where",
"t1",
".",
"age",
">",
"value"
] | [
"How",
"many",
"pets",
"are",
"owned",
"by",
"students",
"that",
"have",
"an",
"age",
"greater",
"than",
"20",
"?"
] |
pets_1 | SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog' | Find the number of dog pets that are raised by female students (with sex F). | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T2.petid",
"=",
"T3.petid",
"WHERE",
"T1.sex",
"=",
"'F",
"'",
"AND",
"T3.pettype",
"=... | [
"select",
"count",
"(",
"*",
")",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t2",
".",
"petid",
"=",
"t3",
".",
"petid",
"where",
"t1",
".",
... | [
"Find",
"the",
"number",
"of",
"dog",
"pets",
"that",
"are",
"raised",
"by",
"female",
"students",
"(",
"with",
"sex",
"F",
")",
"."
] |
pets_1 | SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog' | How many dog pets are raised by female students? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T2.petid",
"=",
"T3.petid",
"WHERE",
"T1.sex",
"=",
"'F",
"'",
"AND",
"T3.pettype",
"=... | [
"select",
"count",
"(",
"*",
")",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t2",
".",
"petid",
"=",
"t3",
".",
"petid",
"where",
"t1",
".",
... | [
"How",
"many",
"dog",
"pets",
"are",
"raised",
"by",
"female",
"students",
"?"
] |
pets_1 | SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog' | Find the first name of students who have cat or dog pet. | [
"SELECT",
"DISTINCT",
"T1.Fname",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T3.petid",
"=",
"T2.petid",
"WHERE",
"T3.pettype",
"=",
"'cat",
"'",
"OR",
"T3.pettype",
"... | [
"select",
"distinct",
"t1",
".",
"fname",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t3",
".",
"petid",
"=",
"t2",
".",
"petid",
"where",
"t3",... | [
"Find",
"the",
"first",
"name",
"of",
"students",
"who",
"have",
"cat",
"or",
"dog",
"pet",
"."
] |
pets_1 | select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'dog' | Find the first name of students who have both cat and dog pets . | [
"select",
"t1.fname",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1.stuid",
"=",
"t2.stuid",
"join",
"pets",
"as",
"t3",
"on",
"t3.petid",
"=",
"t2.petid",
"where",
"t3.pettype",
"=",
"\"cat\"",
"intersect",
"select",
"t1.fname",
"f... | [
"select",
"t1",
".",
"fname",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t3",
".",
"petid",
"=",
"t2",
".",
"petid",
"where",
"t3",
".",
"pet... | [
"Find",
"the",
"first",
"name",
"of",
"students",
"who",
"have",
"both",
"cat",
"and",
"dog",
"pets",
"."
] |
pets_1 | SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') | Find the major and age of students who do not have a cat pet. | [
"SELECT",
"major",
",",
"age",
"FROM",
"student",
"WHERE",
"stuid",
"NOT",
"IN",
"(",
"SELECT",
"T1.stuid",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T3.petid",
"="... | [
"select",
"major",
",",
"age",
"from",
"student",
"where",
"stuid",
"not",
"in",
"(",
"select",
"t1",
".",
"stuid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",... | [
"Find",
"the",
"major",
"and",
"age",
"of",
"students",
"who",
"do",
"not",
"have",
"a",
"cat",
"pet",
"."
] |
pets_1 | SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') | What major is every student who does not own a cat as a pet, and also how old are they? | [
"SELECT",
"major",
",",
"age",
"FROM",
"student",
"WHERE",
"stuid",
"NOT",
"IN",
"(",
"SELECT",
"T1.stuid",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T3.petid",
"="... | [
"select",
"major",
",",
"age",
"from",
"student",
"where",
"stuid",
"not",
"in",
"(",
"select",
"t1",
".",
"stuid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",... | [
"What",
"major",
"is",
"every",
"student",
"who",
"does",
"not",
"own",
"a",
"cat",
"as",
"a",
"pet",
",",
"and",
"also",
"how",
"old",
"are",
"they",
"?"
] |
pets_1 | SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' | What are the ids of the students who do not own cats as pets? | [
"SELECT",
"stuid",
"FROM",
"student",
"EXCEPT",
"SELECT",
"T1.stuid",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T3.petid",
"=",
"T2.petid",
"WHERE",
"T3.pettype",
"=",
... | [
"select",
"stuid",
"from",
"student",
"except",
"select",
"t1",
".",
"stuid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t3",
".",
"petid",
"=",
... | [
"What",
"are",
"the",
"ids",
"of",
"the",
"students",
"who",
"do",
"not",
"own",
"cats",
"as",
"pets",
"?"
] |
pets_1 | SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = '... | Find the first name and age of students who have a dog but do not have a cat as a pet. | [
"SELECT",
"T1.fname",
",",
"T1.age",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T3.petid",
"=",
"T2.petid",
"WHERE",
"T3.pettype",
"=",
"'dog",
"'",
"AND",
"T1.stuid",... | [
"select",
"t1",
".",
"fname",
",",
"t1",
".",
"age",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t3",
".",
"petid",
"=",
"t2",
".",
"petid",
... | [
"Find",
"the",
"first",
"name",
"and",
"age",
"of",
"students",
"who",
"have",
"a",
"dog",
"but",
"do",
"not",
"have",
"a",
"cat",
"as",
"a",
"pet",
"."
] |
pets_1 | SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = '... | What is the first name of every student who has a dog but does not have a cat? | [
"SELECT",
"T1.fname",
",",
"T1.age",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"JOIN",
"pets",
"AS",
"T3",
"ON",
"T3.petid",
"=",
"T2.petid",
"WHERE",
"T3.pettype",
"=",
"'dog",
"'",
"AND",
"T1.stuid",... | [
"select",
"t1",
".",
"fname",
",",
"t1",
".",
"age",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"join",
"pets",
"as",
"t3",
"on",
"t3",
".",
"petid",
"=",
"t2",
".",
"petid",
... | [
"What",
"is",
"the",
"first",
"name",
"of",
"every",
"student",
"who",
"has",
"a",
"dog",
"but",
"does",
"not",
"have",
"a",
"cat",
"?"
] |
pets_1 | SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype | What is the average and maximum age for each pet type? | [
"SELECT",
"avg",
"(",
"pet_age",
")",
",",
"max",
"(",
"pet_age",
")",
",",
"pettype",
"FROM",
"pets",
"GROUP",
"BY",
"pettype"
] | [
"select",
"avg",
"(",
"pet_age",
")",
",",
"max",
"(",
"pet_age",
")",
",",
"pettype",
"from",
"pets",
"group",
"by",
"pettype"
] | [
"What",
"is",
"the",
"average",
"and",
"maximum",
"age",
"for",
"each",
"pet",
"type",
"?"
] |
pets_1 | SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid | Find the first name and age of students who have a pet. | [
"SELECT",
"DISTINCT",
"T1.fname",
",",
"T1.age",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid"
] | [
"select",
"distinct",
"t1",
".",
"fname",
",",
"t1",
".",
"age",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid"
] | [
"Find",
"the",
"first",
"name",
"and",
"age",
"of",
"students",
"who",
"have",
"a",
"pet",
"."
] |
pets_1 | SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid | What are the different first names and ages of the students who do have pets? | [
"SELECT",
"DISTINCT",
"T1.fname",
",",
"T1.age",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid"
] | [
"select",
"distinct",
"t1",
".",
"fname",
",",
"t1",
".",
"age",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid"
] | [
"What",
"are",
"the",
"different",
"first",
"names",
"and",
"ages",
"of",
"the",
"students",
"who",
"do",
"have",
"pets",
"?"
] |
pets_1 | SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' | Find the id of the pet owned by student whose last name is ‘Smith’. | [
"SELECT",
"T2.petid",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"WHERE",
"T1.Lname",
"=",
"'Smith",
"'"
] | [
"select",
"t2",
".",
"petid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"where",
"t1",
".",
"lname",
"=",
"value"
] | [
"Find",
"the",
"id",
"of",
"the",
"pet",
"owned",
"by",
"student",
"whose",
"last",
"name",
"is",
"‘Smith’",
"."
] |
pets_1 | SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' | What is the id of the pet owned by the student whose last name is 'Smith'? | [
"SELECT",
"T2.petid",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"WHERE",
"T1.Lname",
"=",
"'Smith",
"'"
] | [
"select",
"t2",
".",
"petid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"where",
"t1",
".",
"lname",
"=",
"value"
] | [
"What",
"is",
"the",
"id",
"of",
"the",
"pet",
"owned",
"by",
"the",
"student",
"whose",
"last",
"name",
"is",
"'Smith",
"'",
"?"
] |
pets_1 | SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid | Find the number of pets for each student who has any pet and student id. | [
"SELECT",
"count",
"(",
"*",
")",
",",
"T1.stuid",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"GROUP",
"BY",
"T1.stuid"
] | [
"select",
"count",
"(",
"*",
")",
",",
"t1",
".",
"stuid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"group",
"by",
"t1",
".",
"stuid"
] | [
"Find",
"the",
"number",
"of",
"pets",
"for",
"each",
"student",
"who",
"has",
"any",
"pet",
"and",
"student",
"id",
"."
] |
pets_1 | select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid | For students who have pets , how many pets does each student have ? list their ids instead of names . | [
"select",
"count",
"(",
"*",
")",
",",
"t1.stuid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1.stuid",
"=",
"t2.stuid",
"group",
"by",
"t1.stuid"
] | [
"select",
"count",
"(",
"*",
")",
",",
"t1",
".",
"stuid",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"group",
"by",
"t1",
".",
"stuid"
] | [
"For",
"students",
"who",
"have",
"pets",
",",
"how",
"many",
"pets",
"does",
"each",
"student",
"have",
"?",
"list",
"their",
"ids",
"instead",
"of",
"names",
"."
] |
pets_1 | SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1 | Find the first name and gender of student who have more than one pet. | [
"SELECT",
"T1.fname",
",",
"T1.sex",
"FROM",
"student",
"AS",
"T1",
"JOIN",
"has_pet",
"AS",
"T2",
"ON",
"T1.stuid",
"=",
"T2.stuid",
"GROUP",
"BY",
"T1.stuid",
"HAVING",
"count",
"(",
"*",
")",
">",
"1"
] | [
"select",
"t1",
".",
"fname",
",",
"t1",
".",
"sex",
"from",
"student",
"as",
"t1",
"join",
"has_pet",
"as",
"t2",
"on",
"t1",
".",
"stuid",
"=",
"t2",
".",
"stuid",
"group",
"by",
"t1",
".",
"stuid",
"having",
"count",
"(",
"*",
")",
">",
"value... | [
"Find",
"the",
"first",
"name",
"and",
"gender",
"of",
"student",
"who",
"have",
"more",
"than",
"one",
"pet",
"."
] |
pets_1 | select avg(age) from student where stuid not in (select stuid from has_pet) | Find the average age of students who do not have any pet . | [
"select",
"avg",
"(",
"age",
")",
"from",
"student",
"where",
"stuid",
"not",
"in",
"(",
"select",
"stuid",
"from",
"has_pet",
")"
] | [
"select",
"avg",
"(",
"age",
")",
"from",
"student",
"where",
"stuid",
"not",
"in",
"(",
"select",
"stuid",
"from",
"has_pet",
")"
] | [
"Find",
"the",
"average",
"age",
"of",
"students",
"who",
"do",
"not",
"have",
"any",
"pet",
"."
] |
pets_1 | select avg(age) from student where stuid not in (select stuid from has_pet) | What is the average age for all students who do not own any pets ? | [
"select",
"avg",
"(",
"age",
")",
"from",
"student",
"where",
"stuid",
"not",
"in",
"(",
"select",
"stuid",
"from",
"has_pet",
")"
] | [
"select",
"avg",
"(",
"age",
")",
"from",
"student",
"where",
"stuid",
"not",
"in",
"(",
"select",
"stuid",
"from",
"has_pet",
")"
] | [
"What",
"is",
"the",
"average",
"age",
"for",
"all",
"students",
"who",
"do",
"not",
"own",
"any",
"pets",
"?"
] |
car_1 | SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId; | How many countries does each continent have? List the continent id, continent name and the number of countries. | [
"SELECT",
"T1.ContId",
",",
"T1.Continent",
",",
"count",
"(",
"*",
")",
"FROM",
"CONTINENTS",
"AS",
"T1",
"JOIN",
"COUNTRIES",
"AS",
"T2",
"ON",
"T1.ContId",
"=",
"T2.Continent",
"GROUP",
"BY",
"T1.ContId",
";"
] | [
"select",
"t1",
".",
"contid",
",",
"t1",
".",
"continent",
",",
"count",
"(",
"*",
")",
"from",
"continents",
"as",
"t1",
"join",
"countries",
"as",
"t2",
"on",
"t1",
".",
"contid",
"=",
"t2",
".",
"continent",
"group",
"by",
"t1",
".",
"contid"
] | [
"How",
"many",
"countries",
"does",
"each",
"continent",
"have",
"?",
"List",
"the",
"continent",
"id",
",",
"continent",
"name",
"and",
"the",
"number",
"of",
"countries",
"."
] |
car_1 | SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId; | For each continent, list its id, name, and how many countries it has? | [
"SELECT",
"T1.ContId",
",",
"T1.Continent",
",",
"count",
"(",
"*",
")",
"FROM",
"CONTINENTS",
"AS",
"T1",
"JOIN",
"COUNTRIES",
"AS",
"T2",
"ON",
"T1.ContId",
"=",
"T2.Continent",
"GROUP",
"BY",
"T1.ContId",
";"
] | [
"select",
"t1",
".",
"contid",
",",
"t1",
".",
"continent",
",",
"count",
"(",
"*",
")",
"from",
"continents",
"as",
"t1",
"join",
"countries",
"as",
"t2",
"on",
"t1",
".",
"contid",
"=",
"t2",
".",
"continent",
"group",
"by",
"t1",
".",
"contid"
] | [
"For",
"each",
"continent",
",",
"list",
"its",
"id",
",",
"name",
",",
"and",
"how",
"many",
"countries",
"it",
"has",
"?"
] |
car_1 | SELECT count(*) FROM COUNTRIES; | How many countries are listed? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"COUNTRIES",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"countries"
] | [
"How",
"many",
"countries",
"are",
"listed",
"?"
] |
car_1 | SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id; | How many models does each car maker produce? List maker full name, id and the number. | [
"SELECT",
"T1.FullName",
",",
"T1.Id",
",",
"count",
"(",
"*",
")",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"GROUP",
"BY",
"T1.Id",
";"
] | [
"select",
"t1",
".",
"fullname",
",",
"t1",
".",
"id",
",",
"count",
"(",
"*",
")",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"group",
"by",
"t1",
".",
"id"
] | [
"How",
"many",
"models",
"does",
"each",
"car",
"maker",
"produce",
"?",
"List",
"maker",
"full",
"name",
",",
"id",
"and",
"the",
"number",
"."
] |
car_1 | SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; | Which model of the car has the minimum horsepower? | [
"SELECT",
"T1.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"ORDER",
"BY",
"T2.horsepower",
"ASC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"order",
"by",
"t2",
".",
"horsepower",
"asc",
"limit",
"value"
] | [
"Which",
"model",
"of",
"the",
"car",
"has",
"the",
"minimum",
"horsepower",
"?"
] |
car_1 | SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; | What is the model of the car with the smallest amount of horsepower? | [
"SELECT",
"T1.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"ORDER",
"BY",
"T2.horsepower",
"ASC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"order",
"by",
"t2",
".",
"horsepower",
"asc",
"limit",
"value"
] | [
"What",
"is",
"the",
"model",
"of",
"the",
"car",
"with",
"the",
"smallest",
"amount",
"of",
"horsepower",
"?"
] |
car_1 | SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA) | Find the model of the car whose weight is below the average weight. | [
"SELECT",
"T1.model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T2.Weight",
"<",
"(",
"SELECT",
"avg",
"(",
"Weight",
")",
"FROM",
"CARS_DATA",
")"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"weight",
"<",
"(",
"select",
"avg",
"(",
"weight",
")",
"from",
"cars_data",
")"
] | [
"Find",
"the",
"model",
"of",
"the",
"car",
"whose",
"weight",
"is",
"below",
"the",
"average",
"weight",
"."
] |
car_1 | SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA) | What is the model for the car with a weight smaller than the average? | [
"SELECT",
"T1.model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T2.Weight",
"<",
"(",
"SELECT",
"avg",
"(",
"Weight",
")",
"FROM",
"CARS_DATA",
")"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"weight",
"<",
"(",
"select",
"avg",
"(",
"weight",
")",
"from",
"cars_data",
")"
] | [
"What",
"is",
"the",
"model",
"for",
"the",
"car",
"with",
"a",
"weight",
"smaller",
"than",
"the",
"average",
"?"
] |
car_1 | SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'; | Find the name of the makers that produced some cars in the year of 1970? | [
"SELECT",
"DISTINCT",
"T1.Maker",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"JOIN",
"CAR_NAMES",
"AS",
"T3",
"ON",
"T2.model",
"=",
"T3.model",
"JOIN",
"CARS_DATA",
"AS",
"T4",
"ON",
"T3.MakeId",
"=",... | [
"select",
"distinct",
"t1",
".",
"maker",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"join",
"car_names",
"as",
"t3",
"on",
"t2",
".",
"model",
"=",
"t3",
".",
"model",
"join",
... | [
"Find",
"the",
"name",
"of",
"the",
"makers",
"that",
"produced",
"some",
"cars",
"in",
"the",
"year",
"of",
"1970",
"?"
] |
car_1 | SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'; | What is the name of the different car makers who produced a car in 1970? | [
"SELECT",
"DISTINCT",
"T1.Maker",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"JOIN",
"CAR_NAMES",
"AS",
"T3",
"ON",
"T2.model",
"=",
"T3.model",
"JOIN",
"CARS_DATA",
"AS",
"T4",
"ON",
"T3.MakeId",
"=",... | [
"select",
"distinct",
"t1",
".",
"maker",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"join",
"car_names",
"as",
"t3",
"on",
"t2",
".",
"model",
"=",
"t3",
".",
"model",
"join",
... | [
"What",
"is",
"the",
"name",
"of",
"the",
"different",
"car",
"makers",
"who",
"produced",
"a",
"car",
"in",
"1970",
"?"
] |
car_1 | SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA); | What is the maker of the carr produced in the earliest year and what year was it? | [
"SELECT",
"T2.Make",
",",
"T1.Year",
"FROM",
"CARS_DATA",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.MakeId",
"WHERE",
"T1.Year",
"=",
"(",
"SELECT",
"min",
"(",
"YEAR",
")",
"FROM",
"CARS_DATA",
")",
";"
] | [
"select",
"t2",
".",
"make",
",",
"t1",
".",
"year",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"makeid",
"where",
"t1",
".",
"year",
"=",
"(",
"select",
"min",
"(",
"year",
")",
"from... | [
"What",
"is",
"the",
"maker",
"of",
"the",
"carr",
"produced",
"in",
"the",
"earliest",
"year",
"and",
"what",
"year",
"was",
"it",
"?"
] |
car_1 | SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; | Which distinct car models are the produced after 1980? | [
"SELECT",
"DISTINCT",
"T1.model",
"FROM",
"MODEL_LIST",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.model",
"=",
"T2.model",
"JOIN",
"CARS_DATA",
"AS",
"T3",
"ON",
"T2.MakeId",
"=",
"T3.id",
"WHERE",
"T3.year",
">",
"1980",
";"
] | [
"select",
"distinct",
"t1",
".",
"model",
"from",
"model_list",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"model",
"=",
"t2",
".",
"model",
"join",
"cars_data",
"as",
"t3",
"on",
"t2",
".",
"makeid",
"=",
"t3",
".",
"id",
"where",... | [
"Which",
"distinct",
"car",
"models",
"are",
"the",
"produced",
"after",
"1980",
"?"
] |
car_1 | SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; | What are the different models for the cards produced after 1980? | [
"SELECT",
"DISTINCT",
"T1.model",
"FROM",
"MODEL_LIST",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.model",
"=",
"T2.model",
"JOIN",
"CARS_DATA",
"AS",
"T3",
"ON",
"T2.MakeId",
"=",
"T3.id",
"WHERE",
"T3.year",
">",
"1980",
";"
] | [
"select",
"distinct",
"t1",
".",
"model",
"from",
"model_list",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"model",
"=",
"t2",
".",
"model",
"join",
"cars_data",
"as",
"t3",
"on",
"t2",
".",
"makeid",
"=",
"t3",
".",
"id",
"where",... | [
"What",
"are",
"the",
"different",
"models",
"for",
"the",
"cards",
"produced",
"after",
"1980",
"?"
] |
car_1 | SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent; | How many car makers are there in each continents? List the continent name and the count. | [
"SELECT",
"T1.Continent",
",",
"count",
"(",
"*",
")",
"FROM",
"CONTINENTS",
"AS",
"T1",
"JOIN",
"COUNTRIES",
"AS",
"T2",
"ON",
"T1.ContId",
"=",
"T2.continent",
"JOIN",
"car_makers",
"AS",
"T3",
"ON",
"T2.CountryId",
"=",
"T3.Country",
"GROUP",
"BY",
"T1.Co... | [
"select",
"t1",
".",
"continent",
",",
"count",
"(",
"*",
")",
"from",
"continents",
"as",
"t1",
"join",
"countries",
"as",
"t2",
"on",
"t1",
".",
"contid",
"=",
"t2",
".",
"continent",
"join",
"car_makers",
"as",
"t3",
"on",
"t2",
".",
"countryid",
... | [
"How",
"many",
"car",
"makers",
"are",
"there",
"in",
"each",
"continents",
"?",
"List",
"the",
"continent",
"name",
"and",
"the",
"count",
"."
] |
car_1 | SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent; | What is the name of each continent and how many car makers are there in each one? | [
"SELECT",
"T1.Continent",
",",
"count",
"(",
"*",
")",
"FROM",
"CONTINENTS",
"AS",
"T1",
"JOIN",
"COUNTRIES",
"AS",
"T2",
"ON",
"T1.ContId",
"=",
"T2.continent",
"JOIN",
"car_makers",
"AS",
"T3",
"ON",
"T2.CountryId",
"=",
"T3.Country",
"GROUP",
"BY",
"T1.Co... | [
"select",
"t1",
".",
"continent",
",",
"count",
"(",
"*",
")",
"from",
"continents",
"as",
"t1",
"join",
"countries",
"as",
"t2",
"on",
"t1",
".",
"contid",
"=",
"t2",
".",
"continent",
"join",
"car_makers",
"as",
"t3",
"on",
"t2",
".",
"countryid",
... | [
"What",
"is",
"the",
"name",
"of",
"each",
"continent",
"and",
"how",
"many",
"car",
"makers",
"are",
"there",
"in",
"each",
"one",
"?"
] |
car_1 | SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1; | Which of the countries has the most car makers? List the country name. | [
"SELECT",
"T2.CountryName",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"COUNTRIES",
"AS",
"T2",
"ON",
"T1.Country",
"=",
"T2.CountryId",
"GROUP",
"BY",
"T1.Country",
"ORDER",
"BY",
"Count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t2",
".",
"countryname",
"from",
"car_makers",
"as",
"t1",
"join",
"countries",
"as",
"t2",
"on",
"t1",
".",
"country",
"=",
"t2",
".",
"countryid",
"group",
"by",
"t1",
".",
"country",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",... | [
"Which",
"of",
"the",
"countries",
"has",
"the",
"most",
"car",
"makers",
"?",
"List",
"the",
"country",
"name",
"."
] |
car_1 | SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1; | What is the name of the country with the most car makers? | [
"SELECT",
"T2.CountryName",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"COUNTRIES",
"AS",
"T2",
"ON",
"T1.Country",
"=",
"T2.CountryId",
"GROUP",
"BY",
"T1.Country",
"ORDER",
"BY",
"Count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t2",
".",
"countryname",
"from",
"car_makers",
"as",
"t1",
"join",
"countries",
"as",
"t2",
"on",
"t1",
".",
"country",
"=",
"t2",
".",
"countryid",
"group",
"by",
"t1",
".",
"country",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",... | [
"What",
"is",
"the",
"name",
"of",
"the",
"country",
"with",
"the",
"most",
"car",
"makers",
"?"
] |
car_1 | select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id; | How many car models are produced by each maker ? Only list the count and the maker full name . | [
"select",
"count",
"(",
"*",
")",
",",
"t2.fullname",
"from",
"model_list",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1.maker",
"=",
"t2.id",
"group",
"by",
"t2.id",
";"
] | [
"select",
"count",
"(",
"*",
")",
",",
"t2",
".",
"fullname",
"from",
"model_list",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1",
".",
"maker",
"=",
"t2",
".",
"id",
"group",
"by",
"t2",
".",
"id"
] | [
"How",
"many",
"car",
"models",
"are",
"produced",
"by",
"each",
"maker",
"?",
"Only",
"list",
"the",
"count",
"and",
"the",
"maker",
"full",
"name",
"."
] |
car_1 | SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id; | What is the number of car models that are produced by each maker and what is the id and full name of each maker? | [
"SELECT",
"Count",
"(",
"*",
")",
",",
"T2.FullName",
",",
"T2.id",
"FROM",
"MODEL_LIST",
"AS",
"T1",
"JOIN",
"CAR_MAKERS",
"AS",
"T2",
"ON",
"T1.Maker",
"=",
"T2.Id",
"GROUP",
"BY",
"T2.id",
";"
] | [
"select",
"count",
"(",
"*",
")",
",",
"t2",
".",
"fullname",
",",
"t2",
".",
"id",
"from",
"model_list",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1",
".",
"maker",
"=",
"t2",
".",
"id",
"group",
"by",
"t2",
".",
"id"
] | [
"What",
"is",
"the",
"number",
"of",
"car",
"models",
"that",
"are",
"produced",
"by",
"each",
"maker",
"and",
"what",
"is",
"the",
"id",
"and",
"full",
"name",
"of",
"each",
"maker",
"?"
] |
car_1 | SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'; | What is the accelerate of the car make amc hornet sportabout (sw)? | [
"SELECT",
"T1.Accelerate",
"FROM",
"CARS_DATA",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.MakeId",
"WHERE",
"T2.Make",
"=",
"'amc",
"hornet",
"sportabout",
"(",
"sw",
")",
"'",
";"
] | [
"select",
"t1",
".",
"accelerate",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"makeid",
"where",
"t2",
".",
"make",
"=",
"value"
] | [
"What",
"is",
"the",
"accelerate",
"of",
"the",
"car",
"make",
"amc",
"hornet",
"sportabout",
"(",
"sw",
")",
"?"
] |
car_1 | SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'; | How much does the car accelerate that makes amc hornet sportabout (sw)? | [
"SELECT",
"T1.Accelerate",
"FROM",
"CARS_DATA",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.MakeId",
"WHERE",
"T2.Make",
"=",
"'amc",
"hornet",
"sportabout",
"(",
"sw",
")",
"'",
";"
] | [
"select",
"t1",
".",
"accelerate",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"makeid",
"where",
"t2",
".",
"make",
"=",
"value"
] | [
"How",
"much",
"does",
"the",
"car",
"accelerate",
"that",
"makes",
"amc",
"hornet",
"sportabout",
"(",
"sw",
")",
"?"
] |
car_1 | SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4; | What is the average miles per gallon of all the cards with 4 cylinders? | [
"SELECT",
"avg",
"(",
"mpg",
")",
"FROM",
"CARS_DATA",
"WHERE",
"Cylinders",
"=",
"4",
";"
] | [
"select",
"avg",
"(",
"mpg",
")",
"from",
"cars_data",
"where",
"cylinders",
"=",
"value"
] | [
"What",
"is",
"the",
"average",
"miles",
"per",
"gallon",
"of",
"all",
"the",
"cards",
"with",
"4",
"cylinders",
"?"
] |
car_1 | SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1; | What are the countries having at least one car maker? List name and id. | [
"SELECT",
"T1.CountryName",
",",
"T1.CountryId",
"FROM",
"COUNTRIES",
"AS",
"T1",
"JOIN",
"CAR_MAKERS",
"AS",
"T2",
"ON",
"T1.CountryId",
"=",
"T2.Country",
"GROUP",
"BY",
"T1.CountryId",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"1",
";"
] | [
"select",
"t1",
".",
"countryname",
",",
"t1",
".",
"countryid",
"from",
"countries",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1",
".",
"countryid",
"=",
"t2",
".",
"country",
"group",
"by",
"t1",
".",
"countryid",
"having",
"count",
"(",
... | [
"What",
"are",
"the",
"countries",
"having",
"at",
"least",
"one",
"car",
"maker",
"?",
"List",
"name",
"and",
"id",
"."
] |
car_1 | SELECT count(*) FROM CARS_DATA WHERE horsepower > 150; | What is the number of the cars with horsepower more than 150? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"CARS_DATA",
"WHERE",
"horsepower",
">",
"150",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"cars_data",
"where",
"horsepower",
">",
"value"
] | [
"What",
"is",
"the",
"number",
"of",
"the",
"cars",
"with",
"horsepower",
"more",
"than",
"150",
"?"
] |
car_1 | SELECT count(*) FROM CARS_DATA WHERE horsepower > 150; | What is the number of cars with a horsepower greater than 150? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"CARS_DATA",
"WHERE",
"horsepower",
">",
"150",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"cars_data",
"where",
"horsepower",
">",
"value"
] | [
"What",
"is",
"the",
"number",
"of",
"cars",
"with",
"a",
"horsepower",
"greater",
"than",
"150",
"?"
] |
car_1 | SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3; | Which countries in europe have at least 3 car manufacturers? | [
"SELECT",
"T1.CountryName",
"FROM",
"COUNTRIES",
"AS",
"T1",
"JOIN",
"CONTINENTS",
"AS",
"T2",
"ON",
"T1.Continent",
"=",
"T2.ContId",
"JOIN",
"CAR_MAKERS",
"AS",
"T3",
"ON",
"T1.CountryId",
"=",
"T3.Country",
"WHERE",
"T2.Continent",
"=",
"'europe",
"'",
"GROUP... | [
"select",
"t1",
".",
"countryname",
"from",
"countries",
"as",
"t1",
"join",
"continents",
"as",
"t2",
"on",
"t1",
".",
"continent",
"=",
"t2",
".",
"contid",
"join",
"car_makers",
"as",
"t3",
"on",
"t1",
".",
"countryid",
"=",
"t3",
".",
"country",
"w... | [
"Which",
"countries",
"in",
"europe",
"have",
"at",
"least",
"3",
"car",
"manufacturers",
"?"
] |
car_1 | SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3; | What are the names of all European countries with at least 3 manufacturers? | [
"SELECT",
"T1.CountryName",
"FROM",
"COUNTRIES",
"AS",
"T1",
"JOIN",
"CONTINENTS",
"AS",
"T2",
"ON",
"T1.Continent",
"=",
"T2.ContId",
"JOIN",
"CAR_MAKERS",
"AS",
"T3",
"ON",
"T1.CountryId",
"=",
"T3.Country",
"WHERE",
"T2.Continent",
"=",
"'europe",
"'",
"GROUP... | [
"select",
"t1",
".",
"countryname",
"from",
"countries",
"as",
"t1",
"join",
"continents",
"as",
"t2",
"on",
"t1",
".",
"continent",
"=",
"t2",
".",
"contid",
"join",
"car_makers",
"as",
"t3",
"on",
"t1",
".",
"countryid",
"=",
"t3",
".",
"country",
"w... | [
"What",
"are",
"the",
"names",
"of",
"all",
"European",
"countries",
"with",
"at",
"least",
"3",
"manufacturers",
"?"
] |
car_1 | SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1; | What is the maximum horsepower and the make of the car models with 3 cylinders? | [
"SELECT",
"T2.horsepower",
",",
"T1.Make",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T2.cylinders",
"=",
"3",
"ORDER",
"BY",
"T2.horsepower",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t2",
".",
"horsepower",
",",
"t1",
".",
"make",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"cylinders",
"=",
"value",
"order",
"by",
"t2",
".",
"... | [
"What",
"is",
"the",
"maximum",
"horsepower",
"and",
"the",
"make",
"of",
"the",
"car",
"models",
"with",
"3",
"cylinders",
"?"
] |
car_1 | SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1; | What is the largest amount of horsepower for the models with 3 cylinders and what make is it? | [
"SELECT",
"T2.horsepower",
",",
"T1.Make",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T2.cylinders",
"=",
"3",
"ORDER",
"BY",
"T2.horsepower",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t2",
".",
"horsepower",
",",
"t1",
".",
"make",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"cylinders",
"=",
"value",
"order",
"by",
"t2",
".",
"... | [
"What",
"is",
"the",
"largest",
"amount",
"of",
"horsepower",
"for",
"the",
"models",
"with",
"3",
"cylinders",
"and",
"what",
"make",
"is",
"it",
"?"
] |
car_1 | SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1; | Which model saves the most gasoline? That is to say, have the maximum miles per gallon. | [
"SELECT",
"T1.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"ORDER",
"BY",
"T2.mpg",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"order",
"by",
"t2",
".",
"mpg",
"desc",
"limit",
"value"
] | [
"Which",
"model",
"saves",
"the",
"most",
"gasoline",
"?",
"That",
"is",
"to",
"say",
",",
"have",
"the",
"maximum",
"miles",
"per",
"gallon",
"."
] |
car_1 | select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.mpg desc limit 1; | What is the car model with the highest mpg ? | [
"select",
"t1.model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1.makeid",
"=",
"t2.id",
"order",
"by",
"t2.mpg",
"desc",
"limit",
"1",
";"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"order",
"by",
"t2",
".",
"mpg",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"car",
"model",
"with",
"the",
"highest",
"mpg",
"?"
] |
car_1 | SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'; | What is the average edispl of the cars of model volvo? | [
"SELECT",
"avg",
"(",
"T2.edispl",
")",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T1.Model",
"=",
"'volvo",
"'",
";"
] | [
"select",
"avg",
"(",
"t2",
".",
"edispl",
")",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t1",
".",
"model",
"=",
"value"
] | [
"What",
"is",
"the",
"average",
"edispl",
"of",
"the",
"cars",
"of",
"model",
"volvo",
"?"
] |
car_1 | SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'; | How many car models were produced by the maker with full name American Motor Company? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"WHERE",
"T1.FullName",
"=",
"'American",
"Motor",
"Company",
"'",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"where",
"t1",
".",
"fullname",
"=",
"value"
] | [
"How",
"many",
"car",
"models",
"were",
"produced",
"by",
"the",
"maker",
"with",
"full",
"name",
"American",
"Motor",
"Company",
"?"
] |
car_1 | SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'; | What is the number of car models created by the car maker American Motor Company? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"WHERE",
"T1.FullName",
"=",
"'American",
"Motor",
"Company",
"'",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"where",
"t1",
".",
"fullname",
"=",
"value"
] | [
"What",
"is",
"the",
"number",
"of",
"car",
"models",
"created",
"by",
"the",
"car",
"maker",
"American",
"Motor",
"Company",
"?"
] |
car_1 | SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3; | Which makers designed more than 3 car models? List full name and the id. | [
"SELECT",
"T1.FullName",
",",
"T1.Id",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"GROUP",
"BY",
"T1.Id",
"HAVING",
"count",
"(",
"*",
")",
">",
"3",
";"
] | [
"select",
"t1",
".",
"fullname",
",",
"t1",
".",
"id",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"group",
"by",
"t1",
".",
"id",
"having",
"count",
"(",
"*",
")",
">",
"val... | [
"Which",
"makers",
"designed",
"more",
"than",
"3",
"car",
"models",
"?",
"List",
"full",
"name",
"and",
"the",
"id",
"."
] |
car_1 | SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3; | What are the names and ids of all makers with more than 3 models? | [
"SELECT",
"T1.FullName",
",",
"T1.Id",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"GROUP",
"BY",
"T1.Id",
"HAVING",
"count",
"(",
"*",
")",
">",
"3",
";"
] | [
"select",
"t1",
".",
"fullname",
",",
"t1",
".",
"id",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"group",
"by",
"t1",
".",
"id",
"having",
"count",
"(",
"*",
")",
">",
"val... | [
"What",
"are",
"the",
"names",
"and",
"ids",
"of",
"all",
"makers",
"with",
"more",
"than",
"3",
"models",
"?"
] |
car_1 | SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500; | Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500? | [
"SELECT",
"DISTINCT",
"T2.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Model",
"=",
"T2.Model",
"JOIN",
"CAR_MAKERS",
"AS",
"T3",
"ON",
"T2.Maker",
"=",
"T3.Id",
"JOIN",
"CARS_DATA",
"AS",
"T4",
"ON",
"T1.MakeId",
"=",... | [
"select",
"distinct",
"t2",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"model",
"=",
"t2",
".",
"model",
"join",
"car_makers",
"as",
"t3",
"on",
"t2",
".",
"maker",
"=",
"t3",
".",
"id",
"join",
... | [
"Which",
"distinctive",
"models",
"are",
"produced",
"by",
"maker",
"with",
"the",
"full",
"name",
"General",
"Motors",
"or",
"weighing",
"more",
"than",
"3500",
"?"
] |
car_1 | SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500; | What are the different models created by either the car maker General Motors or weighed more than 3500? | [
"SELECT",
"DISTINCT",
"T2.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Model",
"=",
"T2.Model",
"JOIN",
"CAR_MAKERS",
"AS",
"T3",
"ON",
"T2.Maker",
"=",
"T3.Id",
"JOIN",
"CARS_DATA",
"AS",
"T4",
"ON",
"T1.MakeId",
"=",... | [
"select",
"distinct",
"t2",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"model",
"=",
"t2",
".",
"model",
"join",
"car_makers",
"as",
"t3",
"on",
"t2",
".",
"maker",
"=",
"t3",
".",
"id",
"join",
... | [
"What",
"are",
"the",
"different",
"models",
"created",
"by",
"either",
"the",
"car",
"maker",
"General",
"Motors",
"or",
"weighed",
"more",
"than",
"3500",
"?"
] |
car_1 | select distinct year from cars_data where weight between 3000 and 4000; | What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ? | [
"select",
"distinct",
"year",
"from",
"cars_data",
"where",
"weight",
"between",
"3000",
"and",
"4000",
";"
] | [
"select",
"distinct",
"year",
"from",
"cars_data",
"where",
"weight",
"between",
"value",
"and",
"value"
] | [
"What",
"are",
"the",
"different",
"years",
"in",
"which",
"there",
"were",
"cars",
"produced",
"that",
"weighed",
"less",
"than",
"4000",
"and",
"also",
"cars",
"that",
"weighted",
"more",
"than",
"3000",
"?"
] |
car_1 | SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1; | What is the horsepower of the car with the largest accelerate? | [
"SELECT",
"T1.horsepower",
"FROM",
"CARS_DATA",
"AS",
"T1",
"ORDER",
"BY",
"T1.accelerate",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"horsepower",
"from",
"cars_data",
"as",
"t1",
"order",
"by",
"t1",
".",
"accelerate",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"horsepower",
"of",
"the",
"car",
"with",
"the",
"largest",
"accelerate",
"?"
] |
car_1 | SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1; | For model volvo, how many cylinders does the car with the least accelerate have? | [
"SELECT",
"T1.cylinders",
"FROM",
"CARS_DATA",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.MakeId",
"WHERE",
"T2.Model",
"=",
"'volvo",
"'",
"ORDER",
"BY",
"T1.accelerate",
"ASC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"cylinders",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"makeid",
"where",
"t2",
".",
"model",
"=",
"value",
"order",
"by",
"t1",
".",
"accelerate",
"asc",
"limit",
"v... | [
"For",
"model",
"volvo",
",",
"how",
"many",
"cylinders",
"does",
"the",
"car",
"with",
"the",
"least",
"accelerate",
"have",
"?"
] |
car_1 | SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1; | For a volvo model, how many cylinders does the version with least accelerate have? | [
"SELECT",
"T1.cylinders",
"FROM",
"CARS_DATA",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.MakeId",
"WHERE",
"T2.Model",
"=",
"'volvo",
"'",
"ORDER",
"BY",
"T1.accelerate",
"ASC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"cylinders",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"makeid",
"where",
"t2",
".",
"model",
"=",
"value",
"order",
"by",
"t1",
".",
"accelerate",
"asc",
"limit",
"v... | [
"For",
"a",
"volvo",
"model",
",",
"how",
"many",
"cylinders",
"does",
"the",
"version",
"with",
"least",
"accelerate",
"have",
"?"
] |
car_1 | SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 ); | How many cars have a larger accelerate than the car with the largest horsepower? | [
"SELECT",
"COUNT",
"(",
"*",
")",
"FROM",
"CARS_DATA",
"WHERE",
"Accelerate",
">",
"(",
"SELECT",
"Accelerate",
"FROM",
"CARS_DATA",
"ORDER",
"BY",
"Horsepower",
"DESC",
"LIMIT",
"1",
")",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"cars_data",
"where",
"accelerate",
">",
"(",
"select",
"accelerate",
"from",
"cars_data",
"order",
"by",
"horsepower",
"desc",
"limit",
"value",
")"
] | [
"How",
"many",
"cars",
"have",
"a",
"larger",
"accelerate",
"than",
"the",
"car",
"with",
"the",
"largest",
"horsepower",
"?"
] |
car_1 | SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1; | For the cars with 4 cylinders, which model has the largest horsepower? | [
"SELECT",
"T1.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T2.Cylinders",
"=",
"4",
"ORDER",
"BY",
"T2.horsepower",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"cylinders",
"=",
"value",
"order",
"by",
"t2",
".",
"horsepower",
"desc",
"limit",
"... | [
"For",
"the",
"cars",
"with",
"4",
"cylinders",
",",
"which",
"model",
"has",
"the",
"largest",
"horsepower",
"?"
] |
car_1 | SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1; | For all of the 4 cylinder cars, which model has the most horsepower? | [
"SELECT",
"T1.Model",
"FROM",
"CAR_NAMES",
"AS",
"T1",
"JOIN",
"CARS_DATA",
"AS",
"T2",
"ON",
"T1.MakeId",
"=",
"T2.Id",
"WHERE",
"T2.Cylinders",
"=",
"4",
"ORDER",
"BY",
"T2.horsepower",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"model",
"from",
"car_names",
"as",
"t1",
"join",
"cars_data",
"as",
"t2",
"on",
"t1",
".",
"makeid",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"cylinders",
"=",
"value",
"order",
"by",
"t2",
".",
"horsepower",
"desc",
"limit",
"... | [
"For",
"all",
"of",
"the",
"4",
"cylinder",
"cars",
",",
"which",
"model",
"has",
"the",
"most",
"horsepower",
"?"
] |
car_1 | select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4; | Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ? | [
"select",
"t2.makeid",
",",
"t2.make",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1.id",
"=",
"t2.makeid",
"where",
"t1.horsepower",
">",
"(",
"select",
"min",
"(",
"horsepower",
")",
"from",
"cars_data",
")",
"and",
"t1.cylind... | [
"select",
"t2",
".",
"makeid",
",",
"t2",
".",
"make",
"from",
"cars_data",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"makeid",
"where",
"t1",
".",
"horsepower",
">",
"(",
"select",
"min",
"(",
"horsepower",
... | [
"Among",
"the",
"cars",
"that",
"do",
"not",
"have",
"the",
"minimum",
"horsepower",
",",
"what",
"are",
"the",
"make",
"ids",
"and",
"names",
"of",
"all",
"those",
"with",
"less",
"than",
"4",
"cylinders",
"?"
] |
car_1 | select max(mpg) from cars_data where cylinders = 8 or year < 1980 | What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ? | [
"select",
"max",
"(",
"mpg",
")",
"from",
"cars_data",
"where",
"cylinders",
"=",
"8",
"or",
"year",
"<",
"1980"
] | [
"select",
"max",
"(",
"mpg",
")",
"from",
"cars_data",
"where",
"cylinders",
"=",
"value",
"or",
"year",
"<",
"value"
] | [
"What",
"is",
"the",
"maximum",
"mpg",
"of",
"the",
"cars",
"that",
"had",
"8",
"cylinders",
"or",
"that",
"were",
"produced",
"before",
"1980",
"?"
] |
car_1 | SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'; | Which models are lighter than 3500 but not built by the 'Ford Motor Company'? | [
"SELECT",
"DISTINCT",
"T1.model",
"FROM",
"MODEL_LIST",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Model",
"=",
"T2.Model",
"JOIN",
"CARS_DATA",
"AS",
"T3",
"ON",
"T2.MakeId",
"=",
"T3.Id",
"JOIN",
"CAR_MAKERS",
"AS",
"T4",
"ON",
"T1.Maker",
"=",... | [
"select",
"distinct",
"t1",
".",
"model",
"from",
"model_list",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"model",
"=",
"t2",
".",
"model",
"join",
"cars_data",
"as",
"t3",
"on",
"t2",
".",
"makeid",
"=",
"t3",
".",
"id",
"join",
... | [
"Which",
"models",
"are",
"lighter",
"than",
"3500",
"but",
"not",
"built",
"by",
"the",
"'Ford",
"Motor",
"Company",
"'",
"?"
] |
car_1 | SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'; | What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company? | [
"SELECT",
"DISTINCT",
"T1.model",
"FROM",
"MODEL_LIST",
"AS",
"T1",
"JOIN",
"CAR_NAMES",
"AS",
"T2",
"ON",
"T1.Model",
"=",
"T2.Model",
"JOIN",
"CARS_DATA",
"AS",
"T3",
"ON",
"T2.MakeId",
"=",
"T3.Id",
"JOIN",
"CAR_MAKERS",
"AS",
"T4",
"ON",
"T1.Maker",
"=",... | [
"select",
"distinct",
"t1",
".",
"model",
"from",
"model_list",
"as",
"t1",
"join",
"car_names",
"as",
"t2",
"on",
"t1",
".",
"model",
"=",
"t2",
".",
"model",
"join",
"cars_data",
"as",
"t3",
"on",
"t2",
".",
"makeid",
"=",
"t3",
".",
"id",
"join",
... | [
"What",
"are",
"the",
"different",
"models",
"wthat",
"are",
"lighter",
"than",
"3500",
"but",
"were",
"not",
"built",
"by",
"the",
"Ford",
"Motor",
"Company",
"?"
] |
car_1 | SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country; | What are the names of the countries with no car makers? | [
"SELECT",
"CountryName",
"FROM",
"countries",
"EXCEPT",
"SELECT",
"T1.CountryName",
"FROM",
"countries",
"AS",
"T1",
"JOIN",
"CAR_MAKERS",
"AS",
"T2",
"ON",
"T1.countryId",
"=",
"T2.Country",
";"
] | [
"select",
"countryname",
"from",
"countries",
"except",
"select",
"t1",
".",
"countryname",
"from",
"countries",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1",
".",
"countryid",
"=",
"t2",
".",
"country"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"countries",
"with",
"no",
"car",
"makers",
"?"
] |
car_1 | select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker group by t1.id having count(*) >= 2 intersect select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker join car_names as t3 on t2.model = t3.model group by t1.id having count(*) > 3; | Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker . | [
"select",
"t1.id",
",",
"t1.maker",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1.id",
"=",
"t2.maker",
"group",
"by",
"t1.id",
"having",
"count",
"(",
"*",
")",
">=",
"2",
"intersect",
"select",
"t1.id",
",",
"t1.maker",
... | [
"select",
"t1",
".",
"id",
",",
"t1",
".",
"maker",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"group",
"by",
"t1",
".",
"id",
"having",
"count",
"(",
"*",
")",
">",
"=",
... | [
"Which",
"are",
"the",
"car",
"makers",
"which",
"produce",
"at",
"least",
"2",
"models",
"and",
"more",
"than",
"3",
"car",
"makers",
"?",
"List",
"the",
"id",
"and",
"the",
"maker",
"."
] |
car_1 | SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3; | What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars? | [
"SELECT",
"T1.Id",
",",
"T1.Maker",
"FROM",
"CAR_MAKERS",
"AS",
"T1",
"JOIN",
"MODEL_LIST",
"AS",
"T2",
"ON",
"T1.Id",
"=",
"T2.Maker",
"GROUP",
"BY",
"T1.Id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2",
"INTERSECT",
"SELECT",
"T1.Id",
",",
"T1.Make... | [
"select",
"t1",
".",
"id",
",",
"t1",
".",
"maker",
"from",
"car_makers",
"as",
"t1",
"join",
"model_list",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"maker",
"group",
"by",
"t1",
".",
"id",
"having",
"count",
"(",
"*",
")",
">",
"=",
... | [
"What",
"are",
"the",
"ids",
"and",
"makers",
"of",
"all",
"car",
"makers",
"that",
"produce",
"at",
"least",
"2",
"models",
"and",
"make",
"more",
"than",
"3",
"cars",
"?"
] |
car_1 | select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker wh... | What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ? | [
"select",
"t1.countryid",
",",
"t1.countryname",
"from",
"countries",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1.countryid",
"=",
"t2.country",
"group",
"by",
"t1.countryid",
"having",
"count",
"(",
"*",
")",
">",
"3",
"union",
"select",
"t1.count... | [
"select",
"t1",
".",
"countryid",
",",
"t1",
".",
"countryname",
"from",
"countries",
"as",
"t1",
"join",
"car_makers",
"as",
"t2",
"on",
"t1",
".",
"countryid",
"=",
"t2",
".",
"country",
"group",
"by",
"t1",
".",
"countryid",
"having",
"count",
"(",
... | [
"What",
"are",
"the",
"ids",
"and",
"names",
"of",
"all",
"countries",
"that",
"either",
"have",
"more",
"than",
"3",
"car",
"makers",
"or",
"produce",
"fiat",
"model",
"?"
] |
flight_2 | SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = "Anthony" | List the airport code and name in the city of Anthony. | [
"SELECT",
"AirportCode",
",",
"AirportName",
"FROM",
"AIRPORTS",
"WHERE",
"city",
"=",
"``",
"Anthony",
"''"
] | [
"select",
"airportcode",
",",
"airportname",
"from",
"airports",
"where",
"city",
"=",
"value"
] | [
"List",
"the",
"airport",
"code",
"and",
"name",
"in",
"the",
"city",
"of",
"Anthony",
"."
] |
flight_2 | SELECT count(*) FROM AIRLINES | What is the total number of airlines? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"AIRLINES"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"airlines"
] | [
"What",
"is",
"the",
"total",
"number",
"of",
"airlines",
"?"
] |
flight_2 | SELECT count(*) FROM FLIGHTS | Return the number of flights. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"FLIGHTS"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"flights"
] | [
"Return",
"the",
"number",
"of",
"flights",
"."
] |
flight_2 | SELECT City , Country FROM AIRPORTS WHERE AirportName = "Alton" | Give the city and country for the Alton airport. | [
"SELECT",
"City",
",",
"Country",
"FROM",
"AIRPORTS",
"WHERE",
"AirportName",
"=",
"``",
"Alton",
"''"
] | [
"select",
"city",
",",
"country",
"from",
"airports",
"where",
"airportname",
"=",
"value"
] | [
"Give",
"the",
"city",
"and",
"country",
"for",
"the",
"Alton",
"airport",
"."
] |
flight_2 | SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | Count the number of flights departing from 'APG'. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"FLIGHTS",
"WHERE",
"SourceAirport",
"=",
"``",
"APG",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"flights",
"where",
"sourceairport",
"=",
"value"
] | [
"Count",
"the",
"number",
"of",
"flights",
"departing",
"from",
"'APG",
"'",
"."
] |
flight_2 | SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | Count the number of flights into ATO. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"FLIGHTS",
"WHERE",
"DestAirport",
"=",
"``",
"ATO",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"flights",
"where",
"destairport",
"=",
"value"
] | [
"Count",
"the",
"number",
"of",
"flights",
"into",
"ATO",
"."
] |
flight_2 | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | How many flights depart from City Aberdeen? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"FLIGHTS",
"AS",
"T1",
"JOIN",
"AIRPORTS",
"AS",
"T2",
"ON",
"T1.SourceAirport",
"=",
"T2.AirportCode",
"WHERE",
"T2.City",
"=",
"``",
"Aberdeen",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"flights",
"as",
"t1",
"join",
"airports",
"as",
"t2",
"on",
"t1",
".",
"sourceairport",
"=",
"t2",
".",
"airportcode",
"where",
"t2",
".",
"city",
"=",
"value"
] | [
"How",
"many",
"flights",
"depart",
"from",
"City",
"Aberdeen",
"?"
] |
flight_2 | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | Return the number of flights departing from Aberdeen. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"FLIGHTS",
"AS",
"T1",
"JOIN",
"AIRPORTS",
"AS",
"T2",
"ON",
"T1.SourceAirport",
"=",
"T2.AirportCode",
"WHERE",
"T2.City",
"=",
"``",
"Aberdeen",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"flights",
"as",
"t1",
"join",
"airports",
"as",
"t2",
"on",
"t1",
".",
"sourceairport",
"=",
"t2",
".",
"airportcode",
"where",
"t2",
".",
"city",
"=",
"value"
] | [
"Return",
"the",
"number",
"of",
"flights",
"departing",
"from",
"Aberdeen",
"."
] |
flight_2 | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | How many flights arriving in Aberdeen city? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"FLIGHTS",
"AS",
"T1",
"JOIN",
"AIRPORTS",
"AS",
"T2",
"ON",
"T1.DestAirport",
"=",
"T2.AirportCode",
"WHERE",
"T2.City",
"=",
"``",
"Aberdeen",
"''"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"flights",
"as",
"t1",
"join",
"airports",
"as",
"t2",
"on",
"t1",
".",
"destairport",
"=",
"t2",
".",
"airportcode",
"where",
"t2",
".",
"city",
"=",
"value"
] | [
"How",
"many",
"flights",
"arriving",
"in",
"Aberdeen",
"city",
"?"
] |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 10