db_id
stringlengths
4
31
text
stringlengths
398
4.9k
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the numbers of the shortest flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ order by _ asc limit _ | select flno from flight order by distance asc limit 3
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average distance and average price for flights from Los Angeles. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select avg ( _ ) , avg ( _ ) from _ where _ | select avg ( distance ) , avg ( price ) from flight where origin = 'Los Angeles'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average distance and price for all flights from LA? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select avg ( _ ) , avg ( _ ) from _ where _ | select avg ( distance ) , avg ( price ) from flight where origin = 'Los Angeles'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all origins and the number of flights from each origin. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ , count ( _ ) from _ group by _ | select origin , count ( * ) from flight group by origin
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each origin, how many flights came from there? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ , count ( _ ) from _ group by _ | select origin , count ( * ) from flight group by origin
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all destinations and the number of flights to each destination. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ , count ( _ ) from _ group by _ | select destination , count ( * ) from flight group by destination
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the destinations and number of flights to each one? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ , count ( _ ) from _ group by _ | select destination , count ( * ) from flight group by destination
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which origin has most number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select origin from flight group by origin order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What place has the most flights coming from there? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select origin from flight group by origin order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which destination has least number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) asc limit _ | select destination from flight group by destination order by count ( * ) asc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What destination has the fewest number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) asc limit _ | select destination from flight group by destination order by count ( * ) asc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the aircraft name for the flight with number 99 | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid where flight.flno = 99
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the aircraft that was on flight number 99? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid where flight.flno = 99
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all flight numbers with aircraft Airbus A340-300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select flight.flno from flight join aircraft on flight.aid = aircraft.aid where aircraft.name = 'Airbus A340-300'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the flight numbers for the aircraft Airbus A340-300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select flight.flno from flight join aircraft on flight.aid = aircraft.aid where aircraft.name = 'Airbus A340-300'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show aircraft names and number of flights for each aircraft. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ , count ( _ ) from _ group by _ | select aircraft.name , count ( * ) from flight join aircraft on flight.aid = aircraft.aid group by flight.aid
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of each aircraft and how many flights does each one complete? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ , count ( _ ) from _ group by _ | select aircraft.name , count ( * ) from flight join aircraft on flight.aid = aircraft.aid group by flight.aid
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names for all aircraft with at least two flights. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ having count ( _ ) >= _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid group by flight.aid having count ( * ) >= 2
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names for all aircrafts with at least 2 flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ having count ( _ ) >= _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid group by flight.aid having count ( * ) >= 2
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many employees have certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select count ( distinct _ ) from _ | select count ( distinct eid ) from certificate
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the count of distinct employees with certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select count ( distinct _ ) from _ | select count ( distinct eid ) from certificate
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show ids for all employees who don't have a certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ except select _ from _ | select eid from employee except select eid from certificate
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of all employees that don't have certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ except select _ from _ | select eid from employee except select eid from certificate
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names for all aircrafts of which John Williams has certificates. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select aircraft.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where employee.name = 'John Williams'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all aircrafts that John Williams have certificates to be able to fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select aircraft.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where employee.name = 'John Williams'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names for all employees who have certificate of Boeing 737-800. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all employees who have a certificate to fly Boeing 737-800? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ intersect select _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800' intersect select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Airbus A340-300'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ intersect select _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800' intersect select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Airbus A340-300'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names for all employees who do not have certificate of Boeing 737-800. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ except select _ from _ where _ | select name from employee except select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all employees who are not certified to fly Boeing 737-800s? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ except select _ from _ where _ | select name from employee except select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name of aircraft which fewest people have its certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid group by certificate.aid order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the aircraft that the least people are certified to fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid group by certificate.aid order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ group by _ order by count ( _ ) >= _ asc | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by certificate.aid order by count ( * ) >= 5 asc
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: 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? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ group by _ order by count ( _ ) >= _ asc | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by certificate.aid order by count ( * ) >= 5 asc
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is the salary and name of the employee who has the most number of aircraft certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select employee.name , employee.salary from employee join certificate on employee.eid = certificate.eid group by employee.eid order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the salaray and name of the employee that is certified to fly the most planes? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select employee.name , employee.salary from employee join certificate on employee.eid = certificate.eid group by employee.eid order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by employee.eid order by count ( * ) desc limit 1
flight_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the salaray and name of the employee with the most certificates to fly planes more than 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | ### Response: select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by employee.eid order by count ( * ) desc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many allergies are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( distinct _ ) from _ | select count ( distinct allergy ) from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many allergy entries are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( distinct _ ) from _ | select count ( distinct allergy ) from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different allergy types exist? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( distinct _ ) from _ | select count ( distinct allergytype ) from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct allergies are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( distinct _ ) from _ | select count ( distinct allergytype ) from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all allergy types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ | select distinct allergytype from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different allergy types? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ | select distinct allergytype from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all allergies and their types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ | select allergy , allergytype from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the allergies and their types? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ | select allergy , allergytype from allergy_type
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all allergies with type food. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ where _ | select distinct allergy from allergy_type where allergytype = 'food'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are all the different food allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ where _ | select distinct allergy from allergy_type where allergytype = 'food'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the type of allergy Cat? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select allergytype from allergy_type where allergy = 'Cat'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is allergy type of a cat allergy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select allergytype from allergy_type where allergy = 'Cat'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many allergies have type animal? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ where _ | select count ( * ) from allergy_type where allergytype = 'animal'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many animal type allergies exist? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ where _ | select count ( * ) from allergy_type where allergytype = 'animal'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all allergy types and the number of allergies in each type. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select allergytype , count ( * ) from allergy_type group by allergytype
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the allergy types and how many allergies correspond to each one? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select allergytype , count ( * ) from allergy_type group by allergytype
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which allergy type has most number of allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) desc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which allergy type is most common? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) desc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which allergy type has least number of allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ group by _ order by count ( _ ) asc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) asc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which allergy type is the least common? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ group by _ order by count ( _ ) asc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) asc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ | select count ( * ) from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total number of students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ | select count ( * ) from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show first name and last name for all students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ | select fname , lname from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the full names of all students | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ | select fname , lname from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different advisors are listed? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( distinct _ ) from _ | select count ( distinct advisor ) from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many advisors are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( distinct _ ) from _ | select count ( distinct advisor ) from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all majors. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ | select distinct major from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different majors? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ | select distinct major from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all cities where students live. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ | select distinct city_code from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What cities do students live in? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select distinct _ from _ | select distinct city_code from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show first name, last name, age for all female students. Their sex is F. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select fname , lname , age from student where sex = 'F'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the full names and ages for all female students whose sex is F? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select fname , lname , age from student where sex = 'F'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show student ids for all male students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select stuid from student where sex = 'M'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the student ids for all male students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select stuid from student where sex = 'M'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students are age 18? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ where _ | select count ( * ) from student where age = 18
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students are 18 years old? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ where _ | select count ( * ) from student where age = 18
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all student ids who are older than 20. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select stuid from student where age > 20
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the student ids for students over 20 years old? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select stuid from student where age > 20
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which city does the student whose last name is "Kim" live in? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select city_code from student where lname = 'Kim'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the city that the student whose family name is Kim lives in. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select city_code from student where lname = 'Kim'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who is the advisor of student with ID 1004? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select advisor from student where stuid = 1004
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who advises student 1004? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ | select advisor from student where stuid = 1004
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students live in HKG or CHI? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ where _ | select count ( * ) from student where city_code = 'HKG' or city_code = 'CHI'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the number of students living in either HKG or CHI. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select count ( _ ) from _ where _ | select count ( * ) from student where city_code = 'HKG' or city_code = 'CHI'
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the minimum, average, and maximum age of all students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( age ) , avg ( age ) , max ( age ) from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the minimum, mean, and maximum age across all students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( age ) , avg ( age ) , max ( age ) from student
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the last name of the youngest student? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ = ( select min ( _ ) from _ ) | select lname from student where age = ( select min ( age ) from student )
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Provide the last name of the youngest student. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ = ( select min ( _ ) from _ ) | select lname from student where age = ( select min ( age ) from student )
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the student id of the oldest student. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ = ( select max ( _ ) from _ ) | select stuid from student where age = ( select max ( age ) from student )
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What student id corresponds to the oldest student? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ where _ = ( select max ( _ ) from _ ) | select stuid from student where age = ( select max ( age ) from student )
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all majors and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select major , count ( * ) from student group by major
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students are there for each major? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select major , count ( * ) from student group by major
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which major has most number of students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select major from student group by major order by count ( * ) desc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the largest major? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select major from student group by major order by count ( * ) desc limit 1
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all ages and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select age , count ( * ) from student group by age
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How old is each student and how many students are each age? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select age , count ( * ) from student group by age
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the average age for male and female students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select avg ( _ ) , _ from _ group by _ | select avg ( age ) , sex from student group by sex
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the average ages for male and female students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select avg ( _ ) , _ from _ group by _ | select avg ( age ) , sex from student group by sex
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all cities and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select city_code , count ( * ) from student group by city_code
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students live in each city? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select city_code , count ( * ) from student group by city_code
allergy_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all advisors and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | ### Response: select _ , count ( _ ) from _ group by _ | select advisor , count ( * ) from student group by advisor