prompt stringlengths 155 8.09k | answer stringlengths 18 577 |
|---|---|
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the numbers of the shortest flights?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arriva... | SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average distance and average price for flights from Los Angeles., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,... | SELECT avg(distance) , avg(price) FROM Flight WHERE origin = "Los Angeles" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average distance and price for all flights from LA?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure... | SELECT avg(distance) , avg(price) FROM Flight WHERE origin = "Los Angeles" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all origins and the number of flights from each origin., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_da... | SELECT origin , count(*) FROM Flight GROUP BY origin |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:For each origin, how many flights came from there?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, a... | SELECT origin , count(*) FROM Flight GROUP BY origin |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all destinations and the number of flights to each destination., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), depa... | SELECT destination , count(*) FROM Flight GROUP BY destination |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the destinations and number of flights to each one?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_da... | SELECT destination , count(*) FROM Flight GROUP BY destination |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which origin has most number of flights?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_dat... | SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What place has the most flights coming from there?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, a... | SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which destination has least number of flights?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arriv... | SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What destination has the fewest number of flights?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, a... | SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the aircraft name for the flight with number 99, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date da... | SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of the aircraft that was on flight number 99?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_... | SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all flight numbers with aircraft Airbus A340-300., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date dat... | SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = "Airbus A340-300" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the flight numbers for the aircraft Airbus A340-300?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_d... | SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = "Airbus A340-300" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show aircraft names and number of flights for each aircraft., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_da... | SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of each aircraft and how many flights does each one complete?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(... | SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show names for all aircraft with at least two flights., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date dat... | SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names for all aircrafts with at least 2 flights?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_d... | SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many employees have certificate., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date da... | SELECT count(DISTINCT eid) FROM Certificate |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the count of distinct employees with certificates?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date... | SELECT count(DISTINCT eid) FROM Certificate |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show ids for all employees who don't have a certificate., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date d... | SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the ids of all employees that don't have certificates?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), departure... | SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show names for all aircrafts of which John Williams has certificates., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), dep... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all aircrafts that John Williams have certificates to be able to fly?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), dis... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show names for all employees who have certificate of Boeing 737-800., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), depa... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all employees who have a certificate to fly Boeing 737-800?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance numb... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), ... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20)... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show names for all employees who do not have certificate of Boeing 737-800., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all employees who are not certified to fly Boeing 737-800s?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance numb... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name of aircraft which fewest people have its certificate., schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(6,0), depar... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of the aircraft that the least people are certified to fly?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance number(... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate., schema:create table flight( flno number(4,0) primary key, origin varchar2(20)... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?, schema:create table flight( flno number(4,0) primary key, origin varcha... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:what is the salary and name of the employee who has the most number of aircraft certificates?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), d... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the salaray and name of the employee that is certified to fly the most planes?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar2(20), distance... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?, schema:create table flight( flno number(4,0) primary key, origin varchar2... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the salaray and name of the employee with the most certificates to fly planes more than 5000?, schema:create table flight( flno number(4,0) primary key, origin varchar2(20), destination varchar... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many allergies are there?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT count(DISTINCT allergy) FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many allergy entries are there?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT count(DISTINCT allergy) FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many different allergy types exist?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEG... | SELECT count(DISTINCT allergytype) FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many distinct allergies are there?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGE... | SELECT count(DISTINCT allergytype) FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all allergy types., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, Allerg... | SELECT DISTINCT allergytype FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different allergy types?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER... | SELECT DISTINCT allergytype FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all allergies and their types., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT allergy , allergytype FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the allergies and their types?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEG... | SELECT allergy , allergytype FROM Allergy_type |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all allergies with type food., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = "food" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are all the different food allergies?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID IN... | SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = "food" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the type of allergy Cat?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT allergytype FROM Allergy_type WHERE allergy = "Cat" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is allergy type of a cat allergy?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGE... | SELECT allergytype FROM Allergy_type WHERE allergy = "Cat" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many allergies have type animal?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER,... | SELECT count(*) FROM Allergy_type WHERE allergytype = "animal" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many animal type allergies exist?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER... | SELECT count(*) FROM Allergy_type WHERE allergytype = "animal" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all allergy types and the number of allergies in each type., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Aller... | SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the allergy types and how many allergies correspond to each one?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table ... | SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which allergy type has most number of allergies?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID... | SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which allergy type is most common?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which allergy type has least number of allergies?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuI... | SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which allergy type is the least common?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEG... | SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many students are there?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, A... | SELECT count(*) FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the total number of students?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER... | SELECT count(*) FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show first name and last name for all students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID ... | SELECT Fname , Lname FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the full names of all students, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEG... | SELECT Fname , Lname FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many different advisors are listed?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEG... | SELECT count(DISTINCT advisor) FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many advisors are there?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, A... | SELECT count(DISTINCT advisor) FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all majors., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, Allergy VA... | SELECT DISTINCT Major FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different majors?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT DISTINCT Major FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all cities where students live., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER,... | SELECT DISTINCT city_code FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What cities do students live in?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT DISTINCT city_code FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show first name, last name, age for all female students. Their sex is F., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table H... | SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the full names and ages for all female students whose sex is F?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table H... | SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show student ids for all male students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEG... | SELECT StuID FROM Student WHERE Sex = 'M' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the student ids for all male students?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID ... | SELECT StuID FROM Student WHERE Sex = 'M' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many students are age 18?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT count(*) FROM Student WHERE age = 18 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many students are 18 years old?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, ... | SELECT count(*) FROM Student WHERE age = 18 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all student ids who are older than 20., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID I... | SELECT StuID FROM Student WHERE age > 20 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the student ids for students over 20 years old?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT StuID FROM Student WHERE age > 20 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which city does the student whose last name is "Kim" live in?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ... | SELECT city_code FROM Student WHERE LName = "Kim" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the city that the student whose family name is Kim lives in., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Alle... | SELECT city_code FROM Student WHERE LName = "Kim" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Who is the advisor of student with ID 1004?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID I... | SELECT Advisor FROM Student WHERE StuID = 1004 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Who advises student 1004?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, Alle... | SELECT Advisor FROM Student WHERE StuID = 1004 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many students live in HKG or CHI?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER... | SELECT count(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the number of students living in either HKG or CHI., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT count(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the minimum, average, and maximum age of all students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT min(age) , avg(age) , max(age) FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the minimum, mean, and maximum age across all students?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allerg... | SELECT min(age) , avg(age) , max(age) FROM Student |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the last name of the youngest student?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID ... | SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Provide the last name of the youngest student., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID ... | SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the student id of the oldest student., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID IN... | SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What student id corresponds to the oldest student?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( Stu... | SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all majors and corresponding number of students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT major , count(*) FROM Student GROUP BY major |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many students are there for each major?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID I... | SELECT major , count(*) FROM Student GROUP BY major |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which major has most number of students?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTE... | SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the largest major?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER, All... | SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all ages and corresponding number of students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( St... | SELECT age , count(*) FROM Student GROUP BY age |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How old is each student and how many students are each age?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT age , count(*) FROM Student GROUP BY age |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the average age for male and female students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( Stu... | SELECT avg(age) , sex FROM Student GROUP BY sex |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the average ages for male and female students?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT avg(age) , sex FROM Student GROUP BY sex |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all cities and corresponding number of students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT city_code , count(*) FROM Student GROUP BY city_code |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many students live in each city?, schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( StuID INTEGER,... | SELECT city_code , count(*) FROM Student GROUP BY city_code |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all advisors and corresponding number of students., schema:create table Allergy_Type ( Allergy VARCHAR(20) PRIMARY KEY, AllergyType VARCHAR(20)); create table Has_Allergy ( ... | SELECT advisor , count(*) FROM Student GROUP BY advisor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.