db_id
stringlengths 4
31
| query
stringlengths 18
577
| question
stringlengths 19
228
| query_toks
list | query_toks_no_value
list | question_toks
list |
---|---|---|---|---|---|
flight_1
|
SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3
|
What-all are the numbers of the shortest flights?
|
[
"SELECT",
"flno",
"FROM",
"Flight",
"ORDER",
"BY",
"distance",
"ASC",
"LIMIT",
"3"
] |
[
"select",
"flno",
"from",
"flight",
"order",
"by",
"distance",
"asc",
"limit",
"value"
] |
[
"What-all",
"are",
"the",
"numbers",
"of",
"the",
"shortest",
"flights?"
] |
flight_1
|
SELECT avg(distance) , avg(price) FROM Flight WHERE origin = "Los Angeles"
|
What-all is the average distance and average price for flights from Los Angeles.
|
[
"SELECT",
"avg",
"(",
"distance",
")",
",",
"avg",
"(",
"price",
")",
"FROM",
"Flight",
"WHERE",
"origin",
"=",
"``",
"Los",
"Angeles",
"''"
] |
[
"select",
"avg",
"(",
"distance",
")",
",",
"avg",
"(",
"price",
")",
"from",
"flight",
"where",
"origin",
"=",
"value"
] |
[
"What-all",
"is",
"the",
"average",
"distance",
"and",
"average",
"price",
"for",
"flights",
"from",
"Los",
"Angeles."
] |
flight_1
|
SELECT avg(distance) , avg(price) FROM Flight WHERE origin = "Los Angeles"
|
What-all is the average distance and price for all flights from LA?
|
[
"SELECT",
"avg",
"(",
"distance",
")",
",",
"avg",
"(",
"price",
")",
"FROM",
"Flight",
"WHERE",
"origin",
"=",
"``",
"Los",
"Angeles",
"''"
] |
[
"select",
"avg",
"(",
"distance",
")",
",",
"avg",
"(",
"price",
")",
"from",
"flight",
"where",
"origin",
"=",
"value"
] |
[
"What-all",
"is",
"the",
"average",
"distance",
"and",
"price",
"for",
"all",
"flights",
"from",
"LA?"
] |
flight_1
|
SELECT origin , count(*) FROM Flight GROUP BY origin
|
Show all origins and the number of flights from each origin.
|
[
"SELECT",
"origin",
",",
"count",
"(",
"*",
")",
"FROM",
"Flight",
"GROUP",
"BY",
"origin"
] |
[
"select",
"origin",
",",
"count",
"(",
"*",
")",
"from",
"flight",
"group",
"by",
"origin"
] |
[
"Show",
"all",
"origins",
"and",
"the",
"number",
"of",
"flights",
"from",
"each",
"origin."
] |
flight_1
|
SELECT origin , count(*) FROM Flight GROUP BY origin
|
For each origin, how many flights come from there?
|
[
"SELECT",
"origin",
",",
"count",
"(",
"*",
")",
"FROM",
"Flight",
"GROUP",
"BY",
"origin"
] |
[
"select",
"origin",
",",
"count",
"(",
"*",
")",
"from",
"flight",
"group",
"by",
"origin"
] |
[
"For",
"each",
"origin,",
"how",
"many",
"flights",
"come",
"from",
"there?"
] |
flight_1
|
SELECT destination , count(*) FROM Flight GROUP BY destination
|
Are Showing all destinations and the number of flights to each destination.
|
[
"SELECT",
"destination",
",",
"count",
"(",
"*",
")",
"FROM",
"Flight",
"GROUP",
"BY",
"destination"
] |
[
"select",
"destination",
",",
"count",
"(",
"*",
")",
"from",
"flight",
"group",
"by",
"destination"
] |
[
"Are",
"Showing",
"all",
"destinations",
"and",
"the",
"number",
"of",
"flights",
"to",
"each",
"destination."
] |
flight_1
|
SELECT destination , count(*) FROM Flight GROUP BY destination
|
What-all are the destinations and number of flights to each one?
|
[
"SELECT",
"destination",
",",
"count",
"(",
"*",
")",
"FROM",
"Flight",
"GROUP",
"BY",
"destination"
] |
[
"select",
"destination",
",",
"count",
"(",
"*",
")",
"from",
"flight",
"group",
"by",
"destination"
] |
[
"What-all",
"are",
"the",
"destinations",
"and",
"number",
"of",
"flights",
"to",
"each",
"one?"
] |
flight_1
|
SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1
|
It is most number of flights that which origin has?
|
[
"SELECT",
"origin",
"FROM",
"Flight",
"GROUP",
"BY",
"origin",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"origin",
"from",
"flight",
"group",
"by",
"origin",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"It",
"is",
"most",
"number",
"of",
"flights",
"that",
"which",
"origin",
"has?"
] |
flight_1
|
SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1
|
What place has the most flights a-coming from there?
|
[
"SELECT",
"origin",
"FROM",
"Flight",
"GROUP",
"BY",
"origin",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"origin",
"from",
"flight",
"group",
"by",
"origin",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"place",
"has",
"the",
"most",
"flights",
"a-coming",
"from",
"there?"
] |
flight_1
|
SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1
|
Which destination has least flights number?
|
[
"SELECT",
"destination",
"FROM",
"Flight",
"GROUP",
"BY",
"destination",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"LIMIT",
"1"
] |
[
"select",
"destination",
"from",
"flight",
"group",
"by",
"destination",
"order",
"by",
"count",
"(",
"*",
")",
"limit",
"value"
] |
[
"Which",
"destination",
"has",
"least",
"flights",
"number?"
] |
flight_1
|
SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1
|
What destination has the fewest flights number?
|
[
"SELECT",
"destination",
"FROM",
"Flight",
"GROUP",
"BY",
"destination",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"LIMIT",
"1"
] |
[
"select",
"destination",
"from",
"flight",
"group",
"by",
"destination",
"order",
"by",
"count",
"(",
"*",
")",
"limit",
"value"
] |
[
"What",
"destination",
"has",
"the",
"fewest",
"flights",
"number?"
] |
flight_1
|
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99
|
What-all is the aircraft name for the flight with number 99
|
[
"SELECT",
"T2.name",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"WHERE",
"T1.flno",
"=",
"99"
] |
[
"select",
"t2",
".",
"name",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t1",
".",
"flno",
"=",
"value"
] |
[
"What-all",
"is",
"the",
"aircraft",
"name",
"for",
"the",
"flight",
"with",
"number",
"99"
] |
flight_1
|
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99
|
What-all is the name of the aircraft had been on flight number 99?
|
[
"SELECT",
"T2.name",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"WHERE",
"T1.flno",
"=",
"99"
] |
[
"select",
"t2",
".",
"name",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t1",
".",
"flno",
"=",
"value"
] |
[
"What-all",
"is",
"the",
"name",
"of",
"the",
"aircraft",
"had",
"been",
"on",
"flight",
"number",
"99?"
] |
flight_1
|
SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = "Airbus A340-300"
|
Show all flight numbers with aircraft Airbus A340-300.
|
[
"SELECT",
"T1.flno",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"WHERE",
"T2.name",
"=",
"``",
"Airbus",
"A340-300",
"''"
] |
[
"select",
"t1",
".",
"flno",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t2",
".",
"name",
"=",
"value"
] |
[
"Show",
"all",
"flight",
"numbers",
"with",
"aircraft",
"Airbus",
"A340-300."
] |
flight_1
|
SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = "Airbus A340-300"
|
What-all are the flight numbers for the aircraft Airbus A340-300?
|
[
"SELECT",
"T1.flno",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"WHERE",
"T2.name",
"=",
"``",
"Airbus",
"A340-300",
"''"
] |
[
"select",
"t1",
".",
"flno",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t2",
".",
"name",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"flight",
"numbers",
"for",
"the",
"aircraft",
"Airbus",
"A340-300?"
] |
flight_1
|
SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid
|
Show aircraft names and number of flights for each aircraft.
|
[
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"GROUP",
"BY",
"T1.aid"
] |
[
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"group",
"by",
"t1",
".",
"aid"
] |
[
"Show",
"aircraft",
"names",
"and",
"number",
"of",
"flights",
"for",
"each",
"aircraft."
] |
flight_1
|
SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid
|
What-all is the name of each aircraft and how many flights does each one complete?
|
[
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"GROUP",
"BY",
"T1.aid"
] |
[
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"group",
"by",
"t1",
".",
"aid"
] |
[
"What-all",
"is",
"the",
"name",
"of",
"each",
"aircraft",
"and",
"how",
"many",
"flights",
"does",
"each",
"one",
"complete?"
] |
flight_1
|
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2
|
Are Showing names for all aircraft with at least two flight.
|
[
"SELECT",
"T2.name",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"GROUP",
"BY",
"T1.aid",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] |
[
"select",
"t2",
".",
"name",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"group",
"by",
"t1",
".",
"aid",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"Are",
"Showing",
"names",
"for",
"all",
"aircraft",
"with",
"at",
"least",
"two",
"flight."
] |
flight_1
|
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2
|
What-all are the names for all aircrafts with at least 2 flights?
|
[
"SELECT",
"T2.name",
"FROM",
"Flight",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T1.aid",
"=",
"T2.aid",
"GROUP",
"BY",
"T1.aid",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] |
[
"select",
"t2",
".",
"name",
"from",
"flight",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t1",
".",
"aid",
"=",
"t2",
".",
"aid",
"group",
"by",
"t1",
".",
"aid",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"names",
"for",
"all",
"aircrafts",
"with",
"at",
"least",
"2",
"flights?"
] |
flight_1
|
SELECT count(DISTINCT eid) FROM Certificate
|
How many employees have certificate.
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"eid",
")",
"FROM",
"Certificate"
] |
[
"select",
"count",
"(",
"distinct",
"eid",
")",
"from",
"certificate"
] |
[
"How",
"many",
"employees",
"have",
"certificate."
] |
flight_1
|
SELECT count(DISTINCT eid) FROM Certificate
|
What-all is the count of distinct employees with certificates?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"eid",
")",
"FROM",
"Certificate"
] |
[
"select",
"count",
"(",
"distinct",
"eid",
")",
"from",
"certificate"
] |
[
"What-all",
"is",
"the",
"count",
"of",
"distinct",
"employees",
"with",
"certificates?"
] |
flight_1
|
SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate
|
Show ids for all employees don't ai no certificate.
|
[
"SELECT",
"eid",
"FROM",
"Employee",
"EXCEPT",
"SELECT",
"eid",
"FROM",
"Certificate"
] |
[
"select",
"eid",
"from",
"employee",
"except",
"select",
"eid",
"from",
"certificate"
] |
[
"Show",
"ids",
"for",
"all",
"employees",
"don't",
"ai",
"no",
"certificate."
] |
flight_1
|
SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate
|
What-all are the ids of all employees don't ai no certificates?
|
[
"SELECT",
"eid",
"FROM",
"Employee",
"EXCEPT",
"SELECT",
"eid",
"FROM",
"Certificate"
] |
[
"select",
"eid",
"from",
"employee",
"except",
"select",
"eid",
"from",
"certificate"
] |
[
"What-all",
"are",
"the",
"ids",
"of",
"all",
"employees",
"don't",
"ai",
"no",
"certificates?"
] |
flight_1
|
SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = "John Williams"
|
Show names for all aircrafts of which John has certificates.
|
[
"SELECT",
"T3.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T1.name",
"=",
"``",
"John",
"Williams",
"''"
] |
[
"select",
"t3",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t1",
".",
"name",
"=",
"value"
] |
[
"Show",
"names",
"for",
"all",
"aircrafts",
"of",
"which",
"John",
"has",
"certificates."
] |
flight_1
|
SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = "John Williams"
|
What-all are the names of all aircrafts that John Williams have certificates for to be able to fly?
|
[
"SELECT",
"T3.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T1.name",
"=",
"``",
"John",
"Williams",
"''"
] |
[
"select",
"t3",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t1",
".",
"name",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"names",
"of",
"all",
"aircrafts",
"that",
"John",
"Williams",
"have",
"certificates",
"for",
"to",
"be",
"able",
"to",
"fly?"
] |
flight_1
|
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
|
Are Showing names for all employees which have certificate of Boeing 737-800.
|
[
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Boeing",
"737-800",
"''"
] |
[
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value"
] |
[
"Are",
"Showing",
"names",
"for",
"all",
"employees",
"which",
"have",
"certificate",
"of",
"Boeing",
"737-800."
] |
flight_1
|
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
|
What-all are the names of all employees have a certificate for to fly Boeing 737-800?
|
[
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Boeing",
"737-800",
"''"
] |
[
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"names",
"of",
"all",
"employees",
"have",
"a",
"certificate",
"for",
"to",
"fly",
"Boeing",
"737-800?"
] |
flight_1
|
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Airbus A340-300"
|
Are Showing names for all employees which have certificates on both Boeing 737-800 and Airbus A340-300.
|
[
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Boeing",
"737-800",
"''",
"INTERSECT",
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Airbus",
"A340-300",
"''"
] |
[
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value",
"intersect",
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value"
] |
[
"Are",
"Showing",
"names",
"for",
"all",
"employees",
"which",
"have",
"certificates",
"on",
"both",
"Boeing",
"737-800",
"and",
"Airbus",
"A340-300."
] |
flight_1
|
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Airbus A340-300"
|
What-all are the names of all employees can fly both the Boeing 737-800 and the Airbus A340-300?
|
[
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Boeing",
"737-800",
"''",
"INTERSECT",
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Airbus",
"A340-300",
"''"
] |
[
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value",
"intersect",
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"names",
"of",
"all",
"employees",
"can",
"fly",
"both",
"the",
"Boeing",
"737-800",
"and",
"the",
"Airbus",
"A340-300?"
] |
flight_1
|
SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
|
Are Showing names for all employees do ain't no certificate of Boeing 737-800.
|
[
"SELECT",
"name",
"FROM",
"Employee",
"EXCEPT",
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Boeing",
"737-800",
"''"
] |
[
"select",
"name",
"from",
"employee",
"except",
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value"
] |
[
"Are",
"Showing",
"names",
"for",
"all",
"employees",
"do",
"ain't",
"no",
"certificate",
"of",
"Boeing",
"737-800."
] |
flight_1
|
SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
|
What-all are the names of all employees which ain't a-certified to fly Boeing 737-800s?
|
[
"SELECT",
"name",
"FROM",
"Employee",
"EXCEPT",
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.name",
"=",
"``",
"Boeing",
"737-800",
"''"
] |
[
"select",
"name",
"from",
"employee",
"except",
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"name",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"names",
"of",
"all",
"employees",
"which",
"ain't",
"a-certified",
"to",
"fly",
"Boeing",
"737-800s?"
] |
flight_1
|
SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1
|
Are Showing the name of aircraft which fewest have its certificate.
|
[
"SELECT",
"T2.name",
"FROM",
"Certificate",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T2.aid",
"=",
"T1.aid",
"GROUP",
"BY",
"T1.aid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"name",
"from",
"certificate",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t2",
".",
"aid",
"=",
"t1",
".",
"aid",
"group",
"by",
"t1",
".",
"aid",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Are",
"Showing",
"the",
"name",
"of",
"aircraft",
"which",
"fewest",
"have",
"its",
"certificate."
] |
flight_1
|
SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1
|
What-all are the names of the aircraft that the least people are certified to fly?
|
[
"SELECT",
"T2.name",
"FROM",
"Certificate",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T2.aid",
"=",
"T1.aid",
"GROUP",
"BY",
"T1.aid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"name",
"from",
"certificate",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t2",
".",
"aid",
"=",
"t1",
".",
"aid",
"group",
"by",
"t1",
".",
"aid",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What-all",
"are",
"the",
"names",
"of",
"the",
"aircraft",
"that",
"the",
"least",
"people",
"are",
"certified",
"to",
"fly?"
] |
flight_1
|
SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5
|
Are Showing the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have itsn certificate.
|
[
"SELECT",
"T2.name",
"FROM",
"Certificate",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T2.aid",
"=",
"T1.aid",
"WHERE",
"T2.distance",
">",
"5000",
"GROUP",
"BY",
"T1.aid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
">",
"=",
"5"
] |
[
"select",
"t2",
".",
"name",
"from",
"certificate",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t2",
".",
"aid",
"=",
"t1",
".",
"aid",
"where",
"t2",
".",
"distance",
">",
"value",
"group",
"by",
"t1",
".",
"aid",
"order",
"by",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"Are",
"Showing",
"the",
"name",
"and",
"distance",
"of",
"the",
"aircrafts",
"with",
"more",
"than",
"5000",
"distance",
"and",
"which",
"at",
"least",
"5",
"people",
"have",
"itsn",
"certificate."
] |
flight_1
|
SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5
|
What-all is the name and distance of every aircraft that might can cover a distance of more than 5000 and so which at least 5 person might can fly?
|
[
"SELECT",
"T2.name",
"FROM",
"Certificate",
"AS",
"T1",
"JOIN",
"Aircraft",
"AS",
"T2",
"ON",
"T2.aid",
"=",
"T1.aid",
"WHERE",
"T2.distance",
">",
"5000",
"GROUP",
"BY",
"T1.aid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
">",
"=",
"5"
] |
[
"select",
"t2",
".",
"name",
"from",
"certificate",
"as",
"t1",
"join",
"aircraft",
"as",
"t2",
"on",
"t2",
".",
"aid",
"=",
"t1",
".",
"aid",
"where",
"t2",
".",
"distance",
">",
"value",
"group",
"by",
"t1",
".",
"aid",
"order",
"by",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"What-all",
"is",
"the",
"name",
"and",
"distance",
"of",
"every",
"aircraft",
"that",
"might",
"can",
"cover",
"a",
"distance",
"of",
"more",
"than",
"5000",
"and",
"so",
"which",
"at",
"least",
"5",
"person",
"might",
"can",
"fly?"
] |
flight_1
|
SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
|
what-all is the salary and name of the employee has the most number of aircraft certificates?
|
[
"SELECT",
"T1.name",
",",
"T1.salary",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"GROUP",
"BY",
"T1.eid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
",",
"t1",
".",
"salary",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"group",
"by",
"t1",
".",
"eid",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"what-all",
"is",
"the",
"salary",
"and",
"name",
"of",
"the",
"employee",
"has",
"the",
"most",
"number",
"of",
"aircraft",
"certificates?"
] |
flight_1
|
SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
|
What-all is the salaray and name of the that is a-certified fly the most planes employee?
|
[
"SELECT",
"T1.name",
",",
"T1.salary",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"GROUP",
"BY",
"T1.eid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
",",
"t1",
".",
"salary",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"group",
"by",
"t1",
".",
"eid",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What-all",
"is",
"the",
"salaray",
"and",
"name",
"of",
"the",
"that",
"is",
"a-certified",
"fly",
"the",
"most",
"planes",
"employee?"
] |
flight_1
|
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
|
What-all is the salary and name of the employee has the most number of certificates on aircrafts with distance more than 5000?
|
[
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.distance",
">",
"5000",
"GROUP",
"BY",
"T1.eid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"distance",
">",
"value",
"group",
"by",
"t1",
".",
"eid",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What-all",
"is",
"the",
"salary",
"and",
"name",
"of",
"the",
"employee",
"has",
"the",
"most",
"number",
"of",
"certificates",
"on",
"aircrafts",
"with",
"distance",
"more",
"than",
"5000?"
] |
flight_1
|
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
|
What-all is the salaray and name of the employee with the most certificates fly planes more than 5000?
|
[
"SELECT",
"T1.name",
"FROM",
"Employee",
"AS",
"T1",
"JOIN",
"Certificate",
"AS",
"T2",
"ON",
"T1.eid",
"=",
"T2.eid",
"JOIN",
"Aircraft",
"AS",
"T3",
"ON",
"T3.aid",
"=",
"T2.aid",
"WHERE",
"T3.distance",
">",
"5000",
"GROUP",
"BY",
"T1.eid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"employee",
"as",
"t1",
"join",
"certificate",
"as",
"t2",
"on",
"t1",
".",
"eid",
"=",
"t2",
".",
"eid",
"join",
"aircraft",
"as",
"t3",
"on",
"t3",
".",
"aid",
"=",
"t2",
".",
"aid",
"where",
"t3",
".",
"distance",
">",
"value",
"group",
"by",
"t1",
".",
"eid",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What-all",
"is",
"the",
"salaray",
"and",
"name",
"of",
"the",
"employee",
"with",
"the",
"most",
"certificates",
"fly",
"planes",
"more",
"than",
"5000?"
] |
allergy_1
|
SELECT count(DISTINCT allergy) FROM Allergy_type
|
How many allergies are there?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"allergy",
")",
"FROM",
"Allergy_type"
] |
[
"select",
"count",
"(",
"distinct",
"allergy",
")",
"from",
"allergy_type"
] |
[
"How",
"many",
"allergies",
"are",
"there?"
] |
allergy_1
|
SELECT count(DISTINCT allergy) FROM Allergy_type
|
How many allergy entries are there?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"allergy",
")",
"FROM",
"Allergy_type"
] |
[
"select",
"count",
"(",
"distinct",
"allergy",
")",
"from",
"allergy_type"
] |
[
"How",
"many",
"allergy",
"entries",
"are",
"there?"
] |
allergy_1
|
SELECT count(DISTINCT allergytype) FROM Allergy_type
|
How many different allergy types are existing?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"allergytype",
")",
"FROM",
"Allergy_type"
] |
[
"select",
"count",
"(",
"distinct",
"allergytype",
")",
"from",
"allergy_type"
] |
[
"How",
"many",
"different",
"allergy",
"types",
"are",
"existing?"
] |
allergy_1
|
SELECT count(DISTINCT allergytype) FROM Allergy_type
|
How many distinct allergies are there?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"allergytype",
")",
"FROM",
"Allergy_type"
] |
[
"select",
"count",
"(",
"distinct",
"allergytype",
")",
"from",
"allergy_type"
] |
[
"How",
"many",
"distinct",
"allergies",
"are",
"there?"
] |
allergy_1
|
SELECT DISTINCT allergytype FROM Allergy_type
|
Show all allergy types.
|
[
"SELECT",
"DISTINCT",
"allergytype",
"FROM",
"Allergy_type"
] |
[
"select",
"distinct",
"allergytype",
"from",
"allergy_type"
] |
[
"Show",
"all",
"allergy",
"types."
] |
allergy_1
|
SELECT DISTINCT allergytype FROM Allergy_type
|
What-all are the different allergy types?
|
[
"SELECT",
"DISTINCT",
"allergytype",
"FROM",
"Allergy_type"
] |
[
"select",
"distinct",
"allergytype",
"from",
"allergy_type"
] |
[
"What-all",
"are",
"the",
"different",
"allergy",
"types?"
] |
allergy_1
|
SELECT allergy , allergytype FROM Allergy_type
|
Show all allergies and theirn types.
|
[
"SELECT",
"allergy",
",",
"allergytype",
"FROM",
"Allergy_type"
] |
[
"select",
"allergy",
",",
"allergytype",
"from",
"allergy_type"
] |
[
"Show",
"all",
"allergies",
"and",
"theirn",
"types."
] |
allergy_1
|
SELECT allergy , allergytype FROM Allergy_type
|
What-all are the allergies and their types?
|
[
"SELECT",
"allergy",
",",
"allergytype",
"FROM",
"Allergy_type"
] |
[
"select",
"allergy",
",",
"allergytype",
"from",
"allergy_type"
] |
[
"What-all",
"are",
"the",
"allergies",
"and",
"their",
"types?"
] |
allergy_1
|
SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = "food"
|
Show all allergies with type food.
|
[
"SELECT",
"DISTINCT",
"allergy",
"FROM",
"Allergy_type",
"WHERE",
"allergytype",
"=",
"``",
"food",
"''"
] |
[
"select",
"distinct",
"allergy",
"from",
"allergy_type",
"where",
"allergytype",
"=",
"value"
] |
[
"Show",
"all",
"allergies",
"with",
"type",
"food."
] |
allergy_1
|
SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = "food"
|
What-all are all the different food allergies?
|
[
"SELECT",
"DISTINCT",
"allergy",
"FROM",
"Allergy_type",
"WHERE",
"allergytype",
"=",
"``",
"food",
"''"
] |
[
"select",
"distinct",
"allergy",
"from",
"allergy_type",
"where",
"allergytype",
"=",
"value"
] |
[
"What-all",
"are",
"all",
"the",
"different",
"food",
"allergies?"
] |
allergy_1
|
SELECT allergytype FROM Allergy_type WHERE allergy = "Cat"
|
What-all are the types of allergy Cat?
|
[
"SELECT",
"allergytype",
"FROM",
"Allergy_type",
"WHERE",
"allergy",
"=",
"``",
"Cat",
"''"
] |
[
"select",
"allergytype",
"from",
"allergy_type",
"where",
"allergy",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"types",
"of",
"allergy",
"Cat?"
] |
allergy_1
|
SELECT allergytype FROM Allergy_type WHERE allergy = "Cat"
|
What-all is allergy type of a cat allergy?
|
[
"SELECT",
"allergytype",
"FROM",
"Allergy_type",
"WHERE",
"allergy",
"=",
"``",
"Cat",
"''"
] |
[
"select",
"allergytype",
"from",
"allergy_type",
"where",
"allergy",
"=",
"value"
] |
[
"What-all",
"is",
"allergy",
"type",
"of",
"a",
"cat",
"allergy?"
] |
allergy_1
|
SELECT count(*) FROM Allergy_type WHERE allergytype = "animal"
|
How many allergies have types animal?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Allergy_type",
"WHERE",
"allergytype",
"=",
"``",
"animal",
"''"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"allergy_type",
"where",
"allergytype",
"=",
"value"
] |
[
"How",
"many",
"allergies",
"have",
"types",
"animal?"
] |
allergy_1
|
SELECT count(*) FROM Allergy_type WHERE allergytype = "animal"
|
How many animal type allergies exist?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Allergy_type",
"WHERE",
"allergytype",
"=",
"``",
"animal",
"''"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"allergy_type",
"where",
"allergytype",
"=",
"value"
] |
[
"How",
"many",
"animal",
"type",
"allergies",
"exist?"
] |
allergy_1
|
SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype
|
Are Showing all allergy types and the number of allergies in each type.
|
[
"SELECT",
"allergytype",
",",
"count",
"(",
"*",
")",
"FROM",
"Allergy_type",
"GROUP",
"BY",
"allergytype"
] |
[
"select",
"allergytype",
",",
"count",
"(",
"*",
")",
"from",
"allergy_type",
"group",
"by",
"allergytype"
] |
[
"Are",
"Showing",
"all",
"allergy",
"types",
"and",
"the",
"number",
"of",
"allergies",
"in",
"each",
"type."
] |
allergy_1
|
SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype
|
What-all are the allergy types and how many allergies correspond to each one?
|
[
"SELECT",
"allergytype",
",",
"count",
"(",
"*",
")",
"FROM",
"Allergy_type",
"GROUP",
"BY",
"allergytype"
] |
[
"select",
"allergytype",
",",
"count",
"(",
"*",
")",
"from",
"allergy_type",
"group",
"by",
"allergytype"
] |
[
"What-all",
"are",
"the",
"allergy",
"types",
"and",
"how",
"many",
"allergies",
"correspond",
"to",
"each",
"one?"
] |
allergy_1
|
SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1
|
It is most number of allergies that which allergy type has?
|
[
"SELECT",
"allergytype",
"FROM",
"Allergy_type",
"GROUP",
"BY",
"allergytype",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"allergytype",
"from",
"allergy_type",
"group",
"by",
"allergytype",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"It",
"is",
"most",
"number",
"of",
"allergies",
"that",
"which",
"allergy",
"type",
"has?"
] |
allergy_1
|
SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1
|
Which allergy type is most common?
|
[
"SELECT",
"allergytype",
"FROM",
"Allergy_type",
"GROUP",
"BY",
"allergytype",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"allergytype",
"from",
"allergy_type",
"group",
"by",
"allergytype",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"allergy",
"type",
"is",
"most",
"common?"
] |
allergy_1
|
SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1
|
Which allergy type has least allergies number?
|
[
"SELECT",
"allergytype",
"FROM",
"Allergy_type",
"GROUP",
"BY",
"allergytype",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"allergytype",
"from",
"allergy_type",
"group",
"by",
"allergytype",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
] |
[
"Which",
"allergy",
"type",
"has",
"least",
"allergies",
"number?"
] |
allergy_1
|
SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1
|
Which allergy types are the least common?
|
[
"SELECT",
"allergytype",
"FROM",
"Allergy_type",
"GROUP",
"BY",
"allergytype",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"allergytype",
"from",
"allergy_type",
"group",
"by",
"allergytype",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
] |
[
"Which",
"allergy",
"types",
"are",
"the",
"least",
"common?"
] |
allergy_1
|
SELECT count(*) FROM Student
|
How many students are there?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Student"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"student"
] |
[
"How",
"many",
"students",
"are",
"there?"
] |
allergy_1
|
SELECT count(*) FROM Student
|
What-all is the total number of students?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Student"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"student"
] |
[
"What-all",
"is",
"the",
"total",
"number",
"of",
"students?"
] |
allergy_1
|
SELECT Fname , Lname FROM Student
|
Show first and last name all students name.
|
[
"SELECT",
"Fname",
",",
"Lname",
"FROM",
"Student"
] |
[
"select",
"fname",
",",
"lname",
"from",
"student"
] |
[
"Show",
"first",
"and",
"last",
"name",
"all",
"students",
"name."
] |
allergy_1
|
SELECT Fname , Lname FROM Student
|
What-all are the full names of all students
|
[
"SELECT",
"Fname",
",",
"Lname",
"FROM",
"Student"
] |
[
"select",
"fname",
",",
"lname",
"from",
"student"
] |
[
"What-all",
"are",
"the",
"full",
"names",
"of",
"all",
"students"
] |
allergy_1
|
SELECT count(DISTINCT advisor) FROM Student
|
How many different advisors are a-listed?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"advisor",
")",
"FROM",
"Student"
] |
[
"select",
"count",
"(",
"distinct",
"advisor",
")",
"from",
"student"
] |
[
"How",
"many",
"different",
"advisors",
"are",
"a-listed?"
] |
allergy_1
|
SELECT count(DISTINCT advisor) FROM Student
|
How many advisors are there?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"advisor",
")",
"FROM",
"Student"
] |
[
"select",
"count",
"(",
"distinct",
"advisor",
")",
"from",
"student"
] |
[
"How",
"many",
"advisors",
"are",
"there?"
] |
allergy_1
|
SELECT DISTINCT Major FROM Student
|
Are Showing all majors.
|
[
"SELECT",
"DISTINCT",
"Major",
"FROM",
"Student"
] |
[
"select",
"distinct",
"major",
"from",
"student"
] |
[
"Are",
"Showing",
"all",
"majors."
] |
allergy_1
|
SELECT DISTINCT Major FROM Student
|
What-all are the different majors?
|
[
"SELECT",
"DISTINCT",
"Major",
"FROM",
"Student"
] |
[
"select",
"distinct",
"major",
"from",
"student"
] |
[
"What-all",
"are",
"the",
"different",
"majors?"
] |
allergy_1
|
SELECT DISTINCT city_code FROM Student
|
Are Showing all cities where students are living.
|
[
"SELECT",
"DISTINCT",
"city_code",
"FROM",
"Student"
] |
[
"select",
"distinct",
"city_code",
"from",
"student"
] |
[
"Are",
"Showing",
"all",
"cities",
"where",
"students",
"are",
"living."
] |
allergy_1
|
SELECT DISTINCT city_code FROM Student
|
What cities do students are living in?
|
[
"SELECT",
"DISTINCT",
"city_code",
"FROM",
"Student"
] |
[
"select",
"distinct",
"city_code",
"from",
"student"
] |
[
"What",
"cities",
"do",
"students",
"are",
"living",
"in?"
] |
allergy_1
|
SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'
|
Are Showing first name, last name, age for all female students. Theirn sex is F.
|
[
"SELECT",
"Fname",
",",
"Lname",
",",
"Age",
"FROM",
"Student",
"WHERE",
"Sex",
"=",
"'F",
"'"
] |
[
"select",
"fname",
",",
"lname",
",",
"age",
"from",
"student",
"where",
"sex",
"=",
"value"
] |
[
"Are",
"Showing",
"first",
"name,",
"last",
"name,",
"age",
"for",
"all",
"female",
"students.",
"Theirn",
"sex",
"is",
"F."
] |
allergy_1
|
SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'
|
What-all are the full names and ages for all female students whose sex is F?
|
[
"SELECT",
"Fname",
",",
"Lname",
",",
"Age",
"FROM",
"Student",
"WHERE",
"Sex",
"=",
"'F",
"'"
] |
[
"select",
"fname",
",",
"lname",
",",
"age",
"from",
"student",
"where",
"sex",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"full",
"names",
"and",
"ages",
"for",
"all",
"female",
"students",
"whose",
"sex",
"is",
"F?"
] |
allergy_1
|
SELECT StuID FROM Student WHERE Sex = 'M'
|
Are Showing student ids for all male students.
|
[
"SELECT",
"StuID",
"FROM",
"Student",
"WHERE",
"Sex",
"=",
"'M",
"'"
] |
[
"select",
"stuid",
"from",
"student",
"where",
"sex",
"=",
"value"
] |
[
"Are",
"Showing",
"student",
"ids",
"for",
"all",
"male",
"students."
] |
allergy_1
|
SELECT StuID FROM Student WHERE Sex = 'M'
|
What-all are the student ids for all male students?
|
[
"SELECT",
"StuID",
"FROM",
"Student",
"WHERE",
"Sex",
"=",
"'M",
"'"
] |
[
"select",
"stuid",
"from",
"student",
"where",
"sex",
"=",
"value"
] |
[
"What-all",
"are",
"the",
"student",
"ids",
"for",
"all",
"male",
"students?"
] |
allergy_1
|
SELECT count(*) FROM Student WHERE age = 18
|
How many students are age 18?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Student",
"WHERE",
"age",
"=",
"18"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"student",
"where",
"age",
"=",
"value"
] |
[
"How",
"many",
"students",
"are",
"age",
"18?"
] |
allergy_1
|
SELECT count(*) FROM Student WHERE age = 18
|
How many students are 18 year old?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Student",
"WHERE",
"age",
"=",
"18"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"student",
"where",
"age",
"=",
"value"
] |
[
"How",
"many",
"students",
"are",
"18",
"year",
"old?"
] |
allergy_1
|
SELECT StuID FROM Student WHERE age > 20
|
Show all student ids are older to 20.
|
[
"SELECT",
"StuID",
"FROM",
"Student",
"WHERE",
"age",
">",
"20"
] |
[
"select",
"stuid",
"from",
"student",
"where",
"age",
">",
"value"
] |
[
"Show",
"all",
"student",
"ids",
"are",
"older",
"to",
"20."
] |
allergy_1
|
SELECT StuID FROM Student WHERE age > 20
|
What-all are the student ids for students over 20 year old?
|
[
"SELECT",
"StuID",
"FROM",
"Student",
"WHERE",
"age",
">",
"20"
] |
[
"select",
"stuid",
"from",
"student",
"where",
"age",
">",
"value"
] |
[
"What-all",
"are",
"the",
"student",
"ids",
"for",
"students",
"over",
"20",
"year",
"old?"
] |
allergy_1
|
SELECT city_code FROM Student WHERE LName = "Kim"
|
Which city does the student that's last is "Kim" is living in?
|
[
"SELECT",
"city_code",
"FROM",
"Student",
"WHERE",
"LName",
"=",
"``",
"Kim",
"''"
] |
[
"select",
"city_code",
"from",
"student",
"where",
"lname",
"=",
"value"
] |
[
"Which",
"city",
"does",
"the",
"student",
"that's",
"last",
"is",
"\"Kim\"",
"is",
"living",
"in?"
] |
allergy_1
|
SELECT city_code FROM Student WHERE LName = "Kim"
|
Are Giving the city that the student whose family name is Kim is living in.
|
[
"SELECT",
"city_code",
"FROM",
"Student",
"WHERE",
"LName",
"=",
"``",
"Kim",
"''"
] |
[
"select",
"city_code",
"from",
"student",
"where",
"lname",
"=",
"value"
] |
[
"Are",
"Giving",
"the",
"city",
"that",
"the",
"student",
"whose",
"family",
"name",
"is",
"Kim",
"is",
"living",
"in."
] |
allergy_1
|
SELECT Advisor FROM Student WHERE StuID = 1004
|
Who-all is the advisor of student with ID 1004?
|
[
"SELECT",
"Advisor",
"FROM",
"Student",
"WHERE",
"StuID",
"=",
"1004"
] |
[
"select",
"advisor",
"from",
"student",
"where",
"stuid",
"=",
"value"
] |
[
"Who-all",
"is",
"the",
"advisor",
"of",
"student",
"with",
"ID",
"1004?"
] |
allergy_1
|
SELECT Advisor FROM Student WHERE StuID = 1004
|
It is student 1004 that who is advising?
|
[
"SELECT",
"Advisor",
"FROM",
"Student",
"WHERE",
"StuID",
"=",
"1004"
] |
[
"select",
"advisor",
"from",
"student",
"where",
"stuid",
"=",
"value"
] |
[
"It",
"is",
"student",
"1004",
"that",
"who",
"is",
"advising?"
] |
allergy_1
|
SELECT count(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI"
|
How many students are living in HKG or CHI?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Student",
"WHERE",
"city_code",
"=",
"``",
"HKG",
"''",
"OR",
"city_code",
"=",
"``",
"CHI",
"''"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"student",
"where",
"city_code",
"=",
"value",
"or",
"city_code",
"=",
"value"
] |
[
"How",
"many",
"students",
"are",
"living",
"in",
"HKG",
"or",
"CHI?"
] |
allergy_1
|
SELECT count(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI"
|
Are Giving the number of students living in either HKG or CHI.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Student",
"WHERE",
"city_code",
"=",
"``",
"HKG",
"''",
"OR",
"city_code",
"=",
"``",
"CHI",
"''"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"student",
"where",
"city_code",
"=",
"value",
"or",
"city_code",
"=",
"value"
] |
[
"Are",
"Giving",
"the",
"number",
"of",
"students",
"living",
"in",
"either",
"HKG",
"or",
"CHI."
] |
allergy_1
|
SELECT min(age) , avg(age) , max(age) FROM Student
|
Are Showing the minimum, average, and maximum all students age.
|
[
"SELECT",
"min",
"(",
"age",
")",
",",
"avg",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
"FROM",
"Student"
] |
[
"select",
"min",
"(",
"age",
")",
",",
"avg",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
"from",
"student"
] |
[
"Are",
"Showing",
"the",
"minimum,",
"average,",
"and",
"maximum",
"all",
"students",
"age."
] |
allergy_1
|
SELECT min(age) , avg(age) , max(age) FROM Student
|
What-all is the minimum, mean, and maximum age across all students?
|
[
"SELECT",
"min",
"(",
"age",
")",
",",
"avg",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
"FROM",
"Student"
] |
[
"select",
"min",
"(",
"age",
")",
",",
"avg",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
"from",
"student"
] |
[
"What-all",
"is",
"the",
"minimum,",
"mean,",
"and",
"maximum",
"age",
"across",
"all",
"students?"
] |
allergy_1
|
SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)
|
What-all is the last name of the most youngest student?
|
[
"SELECT",
"LName",
"FROM",
"Student",
"WHERE",
"age",
"=",
"(",
"SELECT",
"min",
"(",
"age",
")",
"FROM",
"Student",
")"
] |
[
"select",
"lname",
"from",
"student",
"where",
"age",
"=",
"(",
"select",
"min",
"(",
"age",
")",
"from",
"student",
")"
] |
[
"What-all",
"is",
"the",
"last",
"name",
"of",
"the",
"most",
"youngest",
"student?"
] |
allergy_1
|
SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)
|
Are Providing the last name of the youngest student.
|
[
"SELECT",
"LName",
"FROM",
"Student",
"WHERE",
"age",
"=",
"(",
"SELECT",
"min",
"(",
"age",
")",
"FROM",
"Student",
")"
] |
[
"select",
"lname",
"from",
"student",
"where",
"age",
"=",
"(",
"select",
"min",
"(",
"age",
")",
"from",
"student",
")"
] |
[
"Are",
"Providing",
"the",
"last",
"name",
"of",
"the",
"youngest",
"student."
] |
allergy_1
|
SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)
|
Show the student imight would of the oldest student.
|
[
"SELECT",
"StuID",
"FROM",
"Student",
"WHERE",
"age",
"=",
"(",
"SELECT",
"max",
"(",
"age",
")",
"FROM",
"Student",
")"
] |
[
"select",
"stuid",
"from",
"student",
"where",
"age",
"=",
"(",
"select",
"max",
"(",
"age",
")",
"from",
"student",
")"
] |
[
"Show",
"the",
"student",
"imight",
"would",
"of",
"the",
"oldest",
"student."
] |
allergy_1
|
SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)
|
What student id am corresponding to the oldest student?
|
[
"SELECT",
"StuID",
"FROM",
"Student",
"WHERE",
"age",
"=",
"(",
"SELECT",
"max",
"(",
"age",
")",
"FROM",
"Student",
")"
] |
[
"select",
"stuid",
"from",
"student",
"where",
"age",
"=",
"(",
"select",
"max",
"(",
"age",
")",
"from",
"student",
")"
] |
[
"What",
"student",
"id",
"am",
"corresponding",
"to",
"the",
"oldest",
"student?"
] |
allergy_1
|
SELECT major , count(*) FROM Student GROUP BY major
|
Show all and corresponding number students majors.
|
[
"SELECT",
"major",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"major"
] |
[
"select",
"major",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"major"
] |
[
"Show",
"all",
"and",
"corresponding",
"number",
"students",
"majors."
] |
allergy_1
|
SELECT major , count(*) FROM Student GROUP BY major
|
How many students are there for each major?
|
[
"SELECT",
"major",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"major"
] |
[
"select",
"major",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"major"
] |
[
"How",
"many",
"students",
"are",
"there",
"for",
"each",
"major?"
] |
allergy_1
|
SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1
|
Which major has most number of students?
|
[
"SELECT",
"major",
"FROM",
"Student",
"GROUP",
"BY",
"major",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"major",
"from",
"student",
"group",
"by",
"major",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"major",
"has",
"most",
"number",
"of",
"students?"
] |
allergy_1
|
SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1
|
What-all is the most largest major?
|
[
"SELECT",
"major",
"FROM",
"Student",
"GROUP",
"BY",
"major",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"major",
"from",
"student",
"group",
"by",
"major",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What-all",
"is",
"the",
"most",
"largest",
"major?"
] |
allergy_1
|
SELECT age , count(*) FROM Student GROUP BY age
|
Are Showing all ages and a-corresponding number of students.
|
[
"SELECT",
"age",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"age"
] |
[
"select",
"age",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"age"
] |
[
"Are",
"Showing",
"all",
"ages",
"and",
"a-corresponding",
"number",
"of",
"students."
] |
allergy_1
|
SELECT age , count(*) FROM Student GROUP BY age
|
How old is each student and how many students are each age?
|
[
"SELECT",
"age",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"age"
] |
[
"select",
"age",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"age"
] |
[
"How",
"old",
"is",
"each",
"student",
"and",
"how",
"many",
"students",
"are",
"each",
"age?"
] |
allergy_1
|
SELECT avg(age) , sex FROM Student GROUP BY sex
|
Show the average ages for male and female students.
|
[
"SELECT",
"avg",
"(",
"age",
")",
",",
"sex",
"FROM",
"Student",
"GROUP",
"BY",
"sex"
] |
[
"select",
"avg",
"(",
"age",
")",
",",
"sex",
"from",
"student",
"group",
"by",
"sex"
] |
[
"Show",
"the",
"average",
"ages",
"for",
"male",
"and",
"female",
"students."
] |
allergy_1
|
SELECT avg(age) , sex FROM Student GROUP BY sex
|
What-all are the average ages for male and female students?
|
[
"SELECT",
"avg",
"(",
"age",
")",
",",
"sex",
"FROM",
"Student",
"GROUP",
"BY",
"sex"
] |
[
"select",
"avg",
"(",
"age",
")",
",",
"sex",
"from",
"student",
"group",
"by",
"sex"
] |
[
"What-all",
"are",
"the",
"average",
"ages",
"for",
"male",
"and",
"female",
"students?"
] |
allergy_1
|
SELECT city_code , count(*) FROM Student GROUP BY city_code
|
Show all cities and a-corresponding number of students.
|
[
"SELECT",
"city_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"city_code"
] |
[
"select",
"city_code",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"city_code"
] |
[
"Show",
"all",
"cities",
"and",
"a-corresponding",
"number",
"of",
"students."
] |
allergy_1
|
SELECT city_code , count(*) FROM Student GROUP BY city_code
|
How many students are living in each city?
|
[
"SELECT",
"city_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"city_code"
] |
[
"select",
"city_code",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"city_code"
] |
[
"How",
"many",
"students",
"are",
"living",
"in",
"each",
"city?"
] |
allergy_1
|
SELECT advisor , count(*) FROM Student GROUP BY advisor
|
Show all advisors and corresponding number of students.
|
[
"SELECT",
"advisor",
",",
"count",
"(",
"*",
")",
"FROM",
"Student",
"GROUP",
"BY",
"advisor"
] |
[
"select",
"advisor",
",",
"count",
"(",
"*",
")",
"from",
"student",
"group",
"by",
"advisor"
] |
[
"Show",
"all",
"advisors",
"and",
"corresponding",
"number",
"of",
"students."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.