db_id stringclasses 20
values | query stringlengths 20 422 | question stringlengths 18 174 | query_toks listlengths 4 63 | query_toks_no_value listlengths 4 88 | question_toks listlengths 5 33 | schema stringclasses 20
values |
|---|---|---|---|---|---|---|
concert_singer | SELECT count(*) FROM singer | How many singers do we have? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"singer"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"singer"
] | [
"How",
"many",
"singers",
"do",
"we",
"have",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT count(*) FROM singer | What is the total number of singers? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"singer"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"singer"
] | [
"What",
"is",
"the",
"total",
"number",
"of",
"singers",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name , country , age FROM singer ORDER BY age DESC | Show name, country, age for all singers ordered by age from the oldest to the youngest. | [
"SELECT",
"name",
",",
"country",
",",
"age",
"FROM",
"singer",
"ORDER",
"BY",
"age",
"DESC"
] | [
"select",
"name",
",",
"country",
",",
"age",
"from",
"singer",
"order",
"by",
"age",
"desc"
] | [
"Show",
"name",
",",
"country",
",",
"age",
"for",
"all",
"singers",
"ordered",
"by",
"age",
"from",
"the",
"oldest",
"to",
"the",
"youngest",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name , country , age FROM singer ORDER BY age DESC | What are the names, countries, and ages for every singer in descending order of age? | [
"SELECT",
"name",
",",
"country",
",",
"age",
"FROM",
"singer",
"ORDER",
"BY",
"age",
"DESC"
] | [
"select",
"name",
",",
"country",
",",
"age",
"from",
"singer",
"order",
"by",
"age",
"desc"
] | [
"What",
"are",
"the",
"names",
",",
"countries",
",",
"and",
"ages",
"for",
"every",
"singer",
"in",
"descending",
"order",
"of",
"age",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France' | What is the average, minimum, and maximum age of all singers from France? | [
"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",
"of",
"all",
"singers",
"from",
"France",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1 | What are the names and release years for all the songs of 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"
] | [
"What",
"are",
"the",
"names",
"and",
"release",
"years",
"for",
"all",
"the",
"songs",
"of",
"the",
"youngest",
"singer",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT DISTINCT country FROM singer WHERE age > 20 | What are all distinct countries where singers above age 20 are from? | [
"SELECT",
"DISTINCT",
"country",
"FROM",
"singer",
"WHERE",
"age",
">",
"20"
] | [
"select",
"distinct",
"country",
"from",
"singer",
"where",
"age",
">",
"value"
] | [
"What",
"are",
"all",
"distinct",
"countries",
"where",
"singers",
"above",
"age",
"20",
"are",
"from",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT DISTINCT country FROM singer WHERE age > 20 | What are the different countries with singers above age 20? | [
"SELECT",
"DISTINCT",
"country",
"FROM",
"singer",
"WHERE",
"age",
">",
"20"
] | [
"select",
"distinct",
"country",
"from",
"singer",
"where",
"age",
">",
"value"
] | [
"What",
"are",
"the",
"different",
"countries",
"with",
"singers",
"above",
"age",
"20",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT country , count(*) FROM singer GROUP BY country | How many singers are from each country? | [
"SELECT",
"country",
",",
"count",
"(",
"*",
")",
"FROM",
"singer",
"GROUP",
"BY",
"country"
] | [
"select",
"country",
",",
"count",
"(",
"*",
")",
"from",
"singer",
"group",
"by",
"country"
] | [
"How",
"many",
"singers",
"are",
"from",
"each",
"country",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer) | List all song names by singers above the average age. | [
"SELECT",
"song_name",
"FROM",
"singer",
"WHERE",
"age",
">",
"(",
"SELECT",
"avg",
"(",
"age",
")",
"FROM",
"singer",
")"
] | [
"select",
"song_name",
"from",
"singer",
"where",
"age",
">",
"(",
"select",
"avg",
"(",
"age",
")",
"from",
"singer",
")"
] | [
"List",
"all",
"song",
"names",
"by",
"singers",
"above",
"the",
"average",
"age",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer) | What are all the song names by singers who are older than average? | [
"SELECT",
"song_name",
"FROM",
"singer",
"WHERE",
"age",
">",
"(",
"SELECT",
"avg",
"(",
"age",
")",
"FROM",
"singer",
")"
] | [
"select",
"song_name",
"from",
"singer",
"where",
"age",
">",
"(",
"select",
"avg",
"(",
"age",
")",
"from",
"singer",
")"
] | [
"What",
"are",
"all",
"the",
"song",
"names",
"by",
"singers",
"who",
"are",
"older",
"than",
"average",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000 | What are the locations and names of all stations with 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"
] | [
"What",
"are",
"the",
"locations",
"and",
"names",
"of",
"all",
"stations",
"with",
"capacity",
"between",
"5000",
"and",
"10000",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | select max(capacity), average from stadium | What is the maximum capacity and the average of all stadiums ? | [
"select",
"max",
"(",
"capacity",
")",
",",
"average",
"from",
"stadium"
] | [
"select",
"max",
"(",
"capacity",
")",
",",
"average",
"from",
"stadium"
] | [
"What",
"is",
"the",
"maximum",
"capacity",
"and",
"the",
"average",
"of",
"all",
"stadiums",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | select avg(capacity) , max(capacity) from stadium | What is the average and maximum capacities for all stadiums ? | [
"select",
"avg",
"(",
"capacity",
")",
",",
"max",
"(",
"capacity",
")",
"from",
"stadium"
] | [
"select",
"avg",
"(",
"capacity",
")",
",",
"max",
"(",
"capacity",
")",
"from",
"stadium"
] | [
"What",
"is",
"the",
"average",
"and",
"maximum",
"capacities",
"for",
"all",
"stadiums",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1 | What is the name and capacity for the stadium with highest average attendance? | [
"SELECT",
"name",
",",
"capacity",
"FROM",
"stadium",
"ORDER",
"BY",
"average",
"DESC",
"LIMIT",
"1"
] | [
"select",
"name",
",",
"capacity",
"from",
"stadium",
"order",
"by",
"average",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"name",
"and",
"capacity",
"for",
"the",
"stadium",
"with",
"highest",
"average",
"attendance",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1 | What is the name and capacity for the stadium with the highest average attendance? | [
"SELECT",
"name",
",",
"capacity",
"FROM",
"stadium",
"ORDER",
"BY",
"average",
"DESC",
"LIMIT",
"1"
] | [
"select",
"name",
",",
"capacity",
"from",
"stadium",
"order",
"by",
"average",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"name",
"and",
"capacity",
"for",
"the",
"stadium",
"with",
"the",
"highest",
"average",
"attendance",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015 | How many concerts are there in year 2014 or 2015? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"concert",
"WHERE",
"YEAR",
"=",
"2014",
"OR",
"YEAR",
"=",
"2015"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"concert",
"where",
"year",
"=",
"value",
"or",
"year",
"=",
"value"
] | [
"How",
"many",
"concerts",
"are",
"there",
"in",
"year",
"2014",
"or",
"2015",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015 | How many concerts occurred in 2014 or 2015? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"concert",
"WHERE",
"YEAR",
"=",
"2014",
"OR",
"YEAR",
"=",
"2015"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"concert",
"where",
"year",
"=",
"value",
"or",
"year",
"=",
"value"
] | [
"How",
"many",
"concerts",
"occurred",
"in",
"2014",
"or",
"2015",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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 | For each stadium, how many concerts play there? | [
"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"
] | [
"For",
"each",
"stadium",
",",
"how",
"many",
"concerts",
"play",
"there",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1 | Show the stadium name and capacity with most number of concerts in year 2014 or after. | [
"SELECT",
"T2.name",
",",
"T2.capacity",
"FROM",
"concert",
"AS",
"T1",
"JOIN",
"stadium",
"AS",
"T2",
"ON",
"T1.stadium_id",
"=",
"T2.stadium_id",
"WHERE",
"T1.year",
">",
"=",
"2014",
"GROUP",
"BY",
"T2.stadium_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
... | [
"select",
"t2",
".",
"name",
",",
"t2",
".",
"capacity",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1",
".",
"stadium_id",
"=",
"t2",
".",
"stadium_id",
"where",
"t1",
".",
"year",
">",
"=",
"value",
"group",
"by",
"t2",
... | [
"Show",
"the",
"stadium",
"name",
"and",
"capacity",
"with",
"most",
"number",
"of",
"concerts",
"in",
"year",
"2014",
"or",
"after",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | select t2.name , t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id = t2.stadium_id where t1.year > 2013 group by t2.stadium_id order by count(*) desc limit 1 | What is the name and capacity of the stadium with the most concerts after 2013 ? | [
"select",
"t2.name",
",",
"t2.capacity",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1.stadium_id",
"=",
"t2.stadium_id",
"where",
"t1.year",
">",
"2013",
"group",
"by",
"t2.stadium_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc"... | [
"select",
"t2",
".",
"name",
",",
"t2",
".",
"capacity",
"from",
"concert",
"as",
"t1",
"join",
"stadium",
"as",
"t2",
"on",
"t1",
".",
"stadium_id",
"=",
"t2",
".",
"stadium_id",
"where",
"t1",
".",
"year",
">",
"value",
"group",
"by",
"t2",
".",
... | [
"What",
"is",
"the",
"name",
"and",
"capacity",
"of",
"the",
"stadium",
"with",
"the",
"most",
"concerts",
"after",
"2013",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | Which year has most number of concerts? | [
"SELECT",
"YEAR",
"FROM",
"concert",
"GROUP",
"BY",
"YEAR",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"year",
"from",
"concert",
"group",
"by",
"year",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Which",
"year",
"has",
"most",
"number",
"of",
"concerts",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | What is the year that had the most concerts? | [
"SELECT",
"YEAR",
"FROM",
"concert",
"GROUP",
"BY",
"YEAR",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"year",
"from",
"concert",
"group",
"by",
"year",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"year",
"that",
"had",
"the",
"most",
"concerts",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert) | Show the stadium names without any concert. | [
"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",
")"
] | [
"Show",
"the",
"stadium",
"names",
"without",
"any",
"concert",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30 | Show countries where a singer above age 40 and a singer below 30 are from. | [
"SELECT",
"country",
"FROM",
"singer",
"WHERE",
"age",
">",
"40",
"INTERSECT",
"SELECT",
"country",
"FROM",
"singer",
"WHERE",
"age",
"<",
"30"
] | [
"select",
"country",
"from",
"singer",
"where",
"age",
">",
"value",
"intersect",
"select",
"country",
"from",
"singer",
"where",
"age",
"<",
"value"
] | [
"Show",
"countries",
"where",
"a",
"singer",
"above",
"age",
"40",
"and",
"a",
"singer",
"below",
"30",
"are",
"from",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name , country FROM singer WHERE song_name LIKE '%Hey%' | what is the name and nation of the singer who have a song having 'Hey' in its name? | [
"SELECT",
"name",
",",
"country",
"FROM",
"singer",
"WHERE",
"song_name",
"LIKE",
"'",
"%",
"Hey",
"%",
"'"
] | [
"select",
"name",
",",
"country",
"from",
"singer",
"where",
"song_name",
"like",
"value"
] | [
"what",
"is",
"the",
"name",
"and",
"nation",
"of",
"the",
"singer",
"who",
"have",
"a",
"song",
"having",
"'Hey",
"'",
"in",
"its",
"name",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | SELECT name , country FROM singer WHERE song_name LIKE '%Hey%' | What is the name and country of origin of every singer who has a song with the word 'Hey' in its title? | [
"SELECT",
"name",
",",
"country",
"FROM",
"singer",
"WHERE",
"song_name",
"LIKE",
"'",
"%",
"Hey",
"%",
"'"
] | [
"select",
"name",
",",
"country",
"from",
"singer",
"where",
"song_name",
"like",
"value"
] | [
"What",
"is",
"the",
"name",
"and",
"country",
"of",
"origin",
"of",
"every",
"singer",
"who",
"has",
"a",
"song",
"with",
"the",
"word",
"'Hey",
"'",
"in",
"its",
"title",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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 | What are the names and locations of the stadiums that had concerts that occurred in 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",
... | [
"What",
"are",
"the",
"names",
"and",
"locations",
"of",
"the",
"stadiums",
"that",
"had",
"concerts",
"that",
"occurred",
"in",
"both",
"2014",
"and",
"2015",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
concert_singer | select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1) | Find the number of concerts happened in the stadium with the highest 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",
")"
] | [
"Find",
"the",
"number",
"of",
"concerts",
"happened",
"in",
"the",
"stadium",
"with",
"the",
"highest",
"capacity",
"."
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
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",
"?"
] | CREATE TABLE stadium (
Stadium_ID NUMBER PRIMARY KEY,
Location TEXT,
Name TEXT,
Capacity NUMBER,
Highest NUMBER,
Lowest NUMBER,
Average NUMBER
);
CREATE TABLE singer (
Singer_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Song_Name TEXT,
Song_release_year TEXT,
Age NUMBER,
Is_male OTHERS
)... |
pets_1 | SELECT count(*) FROM pets WHERE weight > 10 | Find the number of pets whose weight is heavier than 10. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"pets",
"WHERE",
"weight",
">",
"10"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"pets",
"where",
"weight",
">",
"value"
] | [
"Find",
"the",
"number",
"of",
"pets",
"whose",
"weight",
"is",
"heavier",
"than",
"10",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT count(*) FROM pets WHERE weight > 10 | How many pets have a greater weight than 10? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"pets",
"WHERE",
"weight",
">",
"10"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"pets",
"where",
"weight",
">",
"value"
] | [
"How",
"many",
"pets",
"have",
"a",
"greater",
"weight",
"than",
"10",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT weight FROM pets ORDER BY pet_age LIMIT 1 | How much does the youngest dog weigh? | [
"SELECT",
"weight",
"FROM",
"pets",
"ORDER",
"BY",
"pet_age",
"LIMIT",
"1"
] | [
"select",
"weight",
"from",
"pets",
"order",
"by",
"pet_age",
"limit",
"value"
] | [
"How",
"much",
"does",
"the",
"youngest",
"dog",
"weigh",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT max(weight) , petType FROM pets GROUP BY petType | Find the maximum weight for each type of pet. List the maximum weight and pet type. | [
"SELECT",
"max",
"(",
"weight",
")",
",",
"petType",
"FROM",
"pets",
"GROUP",
"BY",
"petType"
] | [
"select",
"max",
"(",
"weight",
")",
",",
"pettype",
"from",
"pets",
"group",
"by",
"pettype"
] | [
"Find",
"the",
"maximum",
"weight",
"for",
"each",
"type",
"of",
"pet",
".",
"List",
"the",
"maximum",
"weight",
"and",
"pet",
"type",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT max(weight) , petType FROM pets GROUP BY petType | List the maximum weight and type for each type of pet. | [
"SELECT",
"max",
"(",
"weight",
")",
",",
"petType",
"FROM",
"pets",
"GROUP",
"BY",
"petType"
] | [
"select",
"max",
"(",
"weight",
")",
",",
"pettype",
"from",
"pets",
"group",
"by",
"pettype"
] | [
"List",
"the",
"maximum",
"weight",
"and",
"type",
"for",
"each",
"type",
"of",
"pet",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
")",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT count(DISTINCT pettype) FROM pets | Find the number of distinct type of pets. | [
"SELECT",
"count",
"(",
"DISTINCT",
"pettype",
")",
"FROM",
"pets"
] | [
"select",
"count",
"(",
"distinct",
"pettype",
")",
"from",
"pets"
] | [
"Find",
"the",
"number",
"of",
"distinct",
"type",
"of",
"pets",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT count(DISTINCT pettype) FROM pets | How many different types of pet are there? | [
"SELECT",
"count",
"(",
"DISTINCT",
"pettype",
")",
"FROM",
"pets"
] | [
"select",
"count",
"(",
"distinct",
"pettype",
")",
"from",
"pets"
] | [
"How",
"many",
"different",
"types",
"of",
"pet",
"are",
"there",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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' | What are the first names of every student who has a cat or dog as a 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",... | [
"What",
"are",
"the",
"first",
"names",
"of",
"every",
"student",
"who",
"has",
"a",
"cat",
"or",
"dog",
"as",
"a",
"pet",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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' | What are the students' first names who have both cats and dogs as 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",
... | [
"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... | [
"What",
"are",
"the",
"students",
"'",
"first",
"names",
"who",
"have",
"both",
"cats",
"and",
"dogs",
"as",
"pets",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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' | Find the id of students who do not have a cat pet. | [
"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",
"=",
... | [
"Find",
"the",
"id",
"of",
"students",
"who",
"do",
"not",
"have",
"a",
"cat",
"pet",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1 | Find the type and weight of the youngest pet. | [
"SELECT",
"pettype",
",",
"weight",
"FROM",
"pets",
"ORDER",
"BY",
"pet_age",
"LIMIT",
"1"
] | [
"select",
"pettype",
",",
"weight",
"from",
"pets",
"order",
"by",
"pet_age",
"limit",
"value"
] | [
"Find",
"the",
"type",
"and",
"weight",
"of",
"the",
"youngest",
"pet",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1 | What type of pet is the youngest animal, and how much does it weigh? | [
"SELECT",
"pettype",
",",
"weight",
"FROM",
"pets",
"ORDER",
"BY",
"pet_age",
"LIMIT",
"1"
] | [
"select",
"pettype",
",",
"weight",
"from",
"pets",
"order",
"by",
"pet_age",
"limit",
"value"
] | [
"What",
"type",
"of",
"pet",
"is",
"the",
"youngest",
"animal",
",",
"and",
"how",
"much",
"does",
"it",
"weigh",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT petid , weight FROM pets WHERE pet_age > 1 | Find the id and weight of all pets whose age is older than 1. | [
"SELECT",
"petid",
",",
"weight",
"FROM",
"pets",
"WHERE",
"pet_age",
">",
"1"
] | [
"select",
"petid",
",",
"weight",
"from",
"pets",
"where",
"pet_age",
">",
"value"
] | [
"Find",
"the",
"id",
"and",
"weight",
"of",
"all",
"pets",
"whose",
"age",
"is",
"older",
"than",
"1",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT petid , weight FROM pets WHERE pet_age > 1 | What is the id and weight of every pet who is older than 1? | [
"SELECT",
"petid",
",",
"weight",
"FROM",
"pets",
"WHERE",
"pet_age",
">",
"1"
] | [
"select",
"petid",
",",
"weight",
"from",
"pets",
"where",
"pet_age",
">",
"value"
] | [
"What",
"is",
"the",
"id",
"and",
"weight",
"of",
"every",
"pet",
"who",
"is",
"older",
"than",
"1",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype | Find the average and maximum age for each type of pet. | [
"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"
] | [
"Find",
"the",
"average",
"and",
"maximum",
"age",
"for",
"each",
"type",
"of",
"pet",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT avg(weight) , pettype FROM pets GROUP BY pettype | Find the average weight for each pet type. | [
"SELECT",
"avg",
"(",
"weight",
")",
",",
"pettype",
"FROM",
"pets",
"GROUP",
"BY",
"pettype"
] | [
"select",
"avg",
"(",
"weight",
")",
",",
"pettype",
"from",
"pets",
"group",
"by",
"pettype"
] | [
"Find",
"the",
"average",
"weight",
"for",
"each",
"pet",
"type",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT avg(weight) , pettype FROM pets GROUP BY pettype | What is the average weight for each type of pet? | [
"SELECT",
"avg",
"(",
"weight",
")",
",",
"pettype",
"FROM",
"pets",
"GROUP",
"BY",
"pettype"
] | [
"select",
"avg",
"(",
"weight",
")",
",",
"pettype",
"from",
"pets",
"group",
"by",
"pettype"
] | [
"What",
"is",
"the",
"average",
"weight",
"for",
"each",
"type",
"of",
"pet",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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’",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"'",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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 | What is the first name and gender of the all the students 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... | [
"What",
"is",
"the",
"first",
"name",
"and",
"gender",
"of",
"the",
"all",
"the",
"students",
"who",
"have",
"more",
"than",
"one",
"pet",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT T1.lname 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_age = 3 AND T3.pettype = 'cat' | Find the last name of the student who has a cat that is age 3. | [
"SELECT",
"T1.lname",
"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_age",
"=",
"3",
"AND",
"T3.pettype",
"=",
"'cat",
"'"
] | [
"select",
"t1",
".",
"lname",
"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",
"last",
"name",
"of",
"the",
"student",
"who",
"has",
"a",
"cat",
"that",
"is",
"age",
"3",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
pets_1 | SELECT T1.lname 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_age = 3 AND T3.pettype = 'cat' | What is the last name of the student who has a cat that is 3 years old? | [
"SELECT",
"T1.lname",
"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_age",
"=",
"3",
"AND",
"T3.pettype",
"=",
"'cat",
"'"
] | [
"select",
"t1",
".",
"lname",
"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... | [
"What",
"is",
"the",
"last",
"name",
"of",
"the",
"student",
"who",
"has",
"a",
"cat",
"that",
"is",
"3",
"years",
"old",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
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",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT
);
CREATE TABLE Has_Pet (
StuID NUMBER,
PetID NUMBER,
FOREIGN KEY (StuID) REFERENCES Student(StuID),
FOREIGN KEY (PetID) REFERENCES Pets(PetID)
);
CREATE ... |
car_1 | SELECT count(*) FROM CONTINENTS; | How many continents are there? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"CONTINENTS",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"continents"
] | [
"How",
"many",
"continents",
"are",
"there",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
car_1 | SELECT count(*) FROM CONTINENTS; | What is the number of continents? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"CONTINENTS",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"continents"
] | [
"What",
"is",
"the",
"number",
"of",
"continents",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"."
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
car_1 | SELECT count(*) FROM COUNTRIES; | How many countries are listed? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"COUNTRIES",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"countries"
] | [
"How",
"many",
"countries",
"are",
"listed",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
car_1 | SELECT count(*) FROM COUNTRIES; | How many countries exist? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"COUNTRIES",
";"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"countries"
] | [
"How",
"many",
"countries",
"exist",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"."
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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; | What is the full name of each car maker, along with its id and how many models it produces? | [
"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"
] | [
"What",
"is",
"the",
"full",
"name",
"of",
"each",
"car",
"maker",
",",
"along",
"with",
"its",
"id",
"and",
"how",
"many",
"models",
"it",
"produces",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"."
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
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",
"?"
] | CREATE TABLE continents (
ContId NUMBER PRIMARY KEY,
Continent TEXT
);
CREATE TABLE countries (
CountryId NUMBER PRIMARY KEY,
CountryName TEXT,
Continent NUMBER,
FOREIGN KEY (Continent) REFERENCES continents(ContId)
);
CREATE TABLE car_makers (
Id NUMBER PRIMARY KEY,
Maker TEXT,
FullName TEXT,
Cou... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 5