aherntech/sparc huggingface dataset:
Database: college_1
Question sequence:
Which courses have a description including the word "Statistics"?
What is the name of the departments those courses are in?
SQL query sequence:
SELECT * FROM course WHERE crs_description LIKE '%Statistics%'
SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'
Final question: What is the name of the department that offers a course that has a description including the word "Statistics"?
Final SQL: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'
Database: college_1
Question sequence:
What information is on students whose name starts with 'S'?
Which of them took course ACCT-211?
What are their first names?
SQL query sequence:
SELECT * FROM student WHERE stu_lname LIKE 'S%'
SELECT * FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211' AND T1.stu_lname LIKE 'S%'
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211' AND T1.stu_lname LIKE 'S%'
Final question: What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?
Final SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211' AND T1.stu_lname LIKE 'S%'
Database: inn_1
Question sequence:
Find all the modern rooms.
Of those, which have a base price lower than $160 and two beds? Return the room names.
SQL query sequence:
SELECT * FROM Rooms WHERE decor  =  'modern'
SELECT roomName FROM Rooms WHERE basePrice  <  160 AND beds =  2 AND decor  =  'modern';
Final question: What are the names of modern rooms that have a base price lower than $160 and two beds.
Final SQL: SELECT roomName FROM Rooms WHERE basePrice  <  160 AND beds =  2 AND decor  =  'modern';
Database: inn_1
Question sequence:
Find all the rooms whose price is above 160.
Of those, which rooms can accommodate more than two people?
Give me the name and id of those rooms.
SQL query sequence:
SELECT * FROM Rooms WHERE basePrice  >  160
SELECT * FROM Rooms WHERE basePrice  >  160 AND maxOccupancy  >  2;
SELECT roomName ,  RoomId FROM Rooms WHERE basePrice  >  160 AND maxOccupancy  >  2;
Final question: What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.
Final SQL: SELECT roomName ,  RoomId FROM Rooms WHERE basePrice  >  160 AND maxOccupancy  >  2;
Database: inn_1
Question sequence:
How many reservations were made for each room?
Which room has the largest number of reservations?
Tell me the name of that room.
SQL query sequence:
SELECT count(*) FROM Reservations GROUP BY Room
SELECT * FROM Reservations GROUP BY Room ORDER BY count(*) DESC LIMIT 1
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room ORDER BY count(*) DESC LIMIT 1;
Final question: Which room has the largest number of reservations?
Final SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room ORDER BY count(*) DESC LIMIT 1;
Database: inn_1
Question sequence:
Find the reservations made by a person called ROY SWEAZ
How many kids stay in the rooms reserved by this person?
SQL query sequence:
SELECT * FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";
SELECT kids FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";
Final question: Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.
Final SQL: SELECT kids FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";
Database: inn_1
Question sequence:
Find the reservations made by a person called ROY SWEAZ
Count the number of times ROY SWEAZY has made reservations.
SQL query sequence:
SELECT * FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";
SELECT count(*) FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";
Final question: Find the number of times ROY SWEAZY has reserved a room.
Final SQL: SELECT count(*) FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";
Database: inn_1
Question sequence:
Find the room with the highest rate.
What are the name, rate, check in and check out date of this room?
SQL query sequence:
SELECT * FROM Reservations GROUP BY Room ORDER BY Rate DESC LIMIT 1;
SELECT T2.roomName ,  T1.Rate ,  T1.CheckIn ,  T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;
Final question: Return the name, rate, check in and check out date for the room with the highest rate.
Final SQL: SELECT T2.roomName ,  T1.Rate ,  T1.CheckIn ,  T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;
Database: inn_1
Question sequence:
Which reservations were made by CONRAD SELBIG?
Which one has check in date Oct 23, 2010?
Find the number of adults for this reservation.
SQL query sequence:
SELECT * FROM Reservations WHERE FirstName  =  "CONRAD" AND LastName  =  "SELBIG";
SELECT * FROM Reservations WHERE CheckIn  =  "2010-10-23" AND FirstName  =  "CONRAD" AND LastName  =  "SELBIG";
SELECT Adults FROM Reservations WHERE CheckIn  =  "2010-10-23" AND FirstName  =  "CONRAD" AND LastName  =  "SELBIG";
Final question: Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.
Final SQL: SELECT Adults FROM Reservations WHERE CheckIn  =  "2010-10-23" AND FirstName  =  "CONRAD" AND LastName  =  "SELBIG";
Database: inn_1
Question sequence:
Which reservations were made by DAMIEN TRACHSEL?
Which one has check in date Sep 21, 2010?
Find the number of kids for this reservation.
SQL query sequence:
SELECT * FROM Reservations WHERE FirstName  =  "DAMIEN" AND LastName  =  "TRACHSEL";
SELECT * FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "DAMIEN" AND LastName  =  "TRACHSEL";
SELECT Kids FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "DAMIEN" AND LastName  =  "TRACHSEL";
Final question: Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on  Sep 21, 2010.
Final SQL: SELECT Kids FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "DAMIEN" AND LastName  =  "TRACHSEL";
Database: inn_1
Question sequence:
Return all the rooms with king beds.
What is the total number of king beds?
SQL query sequence:
SELECT * FROM Rooms WHERE bedtype  =  'King';
SELECT sum(beds) FROM Rooms WHERE bedtype  =  'King';
Final question: Find the total number of king beds available.
Final SQL: SELECT sum(beds) FROM Rooms WHERE bedtype  =  'King';
Database: inn_1
Question sequence:
Return all the rooms with king beds.
What are the names and decor of these rooms?
Sort the list by the room base price.
SQL query sequence:
SELECT * FROM Rooms WHERE bedtype  =  'King'
SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  'King'
SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  'King' ORDER BY basePrice;
Final question: What are the names and decor of rooms with a king bed? Sort them by their price
Final SQL: SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  'King' ORDER BY basePrice;
Database: inn_1
Question sequence:
What is the base price of each room?
Order the rooms by their base price.
Report the room name and base price of the cheapest room.
SQL query sequence:
SELECT basePrice FROM Rooms
SELECT * FROM Rooms ORDER BY basePrice ASC
SELECT roomName ,  basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;
Final question: What are the room name and base price of the room with the lowest base price?
Final SQL: SELECT roomName ,  basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;
Database: inn_1
Question sequence:
Find the room with name "Recluse and defiance".
What is its decor?
SQL query sequence:
SELECT * FROM Rooms WHERE roomName  =  "Recluse and defiance";
SELECT decor FROM Rooms WHERE roomName  =  "Recluse and defiance";
Final question: Return the decor of the room named "Recluse and defiance".
Final SQL: SELECT decor FROM Rooms WHERE roomName  =  "Recluse and defiance";
Database: inn_1
Question sequence:
Group all the rooms by the bed type.
For each bed type, find the average base price of different bed type.
SQL query sequence:
SELECT * FROM Rooms GROUP BY bedType;
SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
Final question: For each bed type, find the average base price of different bed type.
Final SQL: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
Database: inn_1
Question sequence:
For each modern room, find the maximum number of people who can stay in.
What is the total number of people who can stay in the modern rooms of this inn?
SQL query sequence:
SELECT maxOccupancy FROM Rooms WHERE decor  =  'modern';
SELECT sum(maxOccupancy) FROM Rooms WHERE decor  =  'modern';
Final question: How many people in total can stay in the modern rooms of this inn?
Final SQL: SELECT sum(maxOccupancy) FROM Rooms WHERE decor  =  'modern';
Database: inn_1
Question sequence:
Find the decor of each room
For each type of decor, how many reservations were made?
Which decor is the least popular?
SQL query sequence:
SELECT decor FROM Rooms
SELECT count(T2.decor) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T2.decor
SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;
Final question: What is the least popular kind of decor?
Final SQL: SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;
Database: inn_1
Question sequence:
What is the maximum capacity of each room?
What is the number of people who actually stayed for each room reservation? The number of people include adults and kids.
How many times the number reached the maximum capacity?
SQL query sequence:
SELECT maxOccupancy FROM Rooms
SELECT T1.Adults + T1.Kids FROM Reservations AS T1
SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T2.maxOccupancy  =  T1.Adults + T1.Kids;
Final question: How many times the number of adults and kids staying in a room reached the maximum capacity of the room?
Final SQL: SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T2.maxOccupancy  =  T1.Adults + T1.Kids;
Database: inn_1
Question sequence:
For each reservation, find the base price and the actual rate payed.
How many times did the actual price exceeded the base price?
What are the first and last names of people who payed more than the rooms' base prices?
SQL query sequence:
SELECT T1.Rate ,  T2.basePrice FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId
SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
Final question: What are the first and last names of people who payed more than the rooms' base prices?
Final SQL: SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
Database: inn_1
Question sequence:
List all the rooms.
Count the number of rooms.
SQL query sequence:
SELECT * FROM Rooms;
SELECT count(*) FROM Rooms;
Final question: What is the total number of rooms available in this inn?
Final SQL: SELECT count(*) FROM Rooms;
Database: inn_1
Question sequence:
Return all the rooms with king beds.
What is the total number such rooms?
SQL query sequence:
SELECT * FROM Rooms WHERE bedtype  =  'King';
SELECT count(*) FROM Rooms WHERE bedtype  =  'King';
Final question: How many rooms have a king bed?
Final SQL: SELECT count(*) FROM Rooms WHERE bedType  =  "King";
Database: inn_1
Question sequence:
Group all the rooms by the bed type
For each bed type, count the number of rooms.
SQL query sequence:
SELECT * FROM Rooms GROUP BY bedType;
SELECT bedType ,  count(*) FROM Rooms GROUP BY bedType;
Final question: What are the number of rooms for each bed type?
Final SQL: SELECT bedType ,  count(*) FROM Rooms GROUP BY bedType;
Database: inn_1
Question sequence:
Sort all the rooms by the maximum occupancy.
Which room has the largest capacity?
Tell me the name of that room.
SQL query sequence:
SELECT * FROM Rooms ORDER BY maxOccupancy DESC
SELECT * FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
Final question: What is the name of the room that can accommodate the most people?
Final SQL: SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
Database: inn_1
Question sequence:
List all the rooms in the descending order of the base price.
Which room has the highest base price?
Give me the id and name of this room.
SQL query sequence:
SELECT * FROM Rooms ORDER BY basePrice DESC
SELECT * FROM Rooms ORDER BY basePrice DESC LIMIT 1;
SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;
Final question: Which room has the highest base price?
Final SQL: SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;
Database: inn_1
Question sequence:
Which rooms have traditional decor?
What are the name and bed type of those rooms?
SQL query sequence:
SELECT * FROM Rooms WHERE decor = "traditional";
SELECT roomName ,  bedType FROM Rooms WHERE decor = "traditional";
Final question: What are the bed type and name of all the rooms with traditional decor?
Final SQL: SELECT roomName ,  bedType FROM Rooms WHERE decor = "traditional";
Database: inn_1
Question sequence:
Which rooms have king beds?
Group all the rooms with king beds according to the decor type.
Count the number of rooms for each decor type.
SQL query sequence:
SELECT * FROM Rooms WHERE bedType = "King"
SELECT * FROM Rooms WHERE bedType = "King" GROUP BY decor;
SELECT decor ,  count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;
Final question: How many rooms have king beds? Report the number for each decor type.
Final SQL: SELECT decor ,  count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;
Database: inn_1
Question sequence:
What is the average price of all the rooms?
What about the minimum price?
Tell me the average and minimum price of the rooms for each different decor.
SQL query sequence:
SELECT avg(basePrice) FROM Rooms
SELECT min(basePrice) FROM Rooms
SELECT decor , avg(basePrice) ,  min(basePrice) FROM Rooms GROUP BY decor;
Final question: What is the average minimum and price of the rooms for each different decor.
Final SQL: SELECT decor , avg(basePrice) ,  min(basePrice) FROM Rooms GROUP BY decor;
Database: inn_1
Question sequence:
Sort all the rooms according to the price
Just show the room names
SQL query sequence:
SELECT * FROM Rooms ORDER BY basePrice;
SELECT roomName FROM Rooms ORDER BY basePrice;
Final question: Sort all the rooms according to the price. Just report the room names.
Final SQL: SELECT roomName FROM Rooms ORDER BY basePrice;
Database: inn_1
Question sequence:
Show me all the rooms that cost more than 120.
How many rooms?
Tell me how many rooms cost more than 120, for each different decor.
SQL query sequence:
SELECT * FROM Rooms WHERE basePrice  >  120
SELECT count(*) FROM Rooms WHERE basePrice  >  120
SELECT decor , count(*) FROM Rooms WHERE basePrice  >  120 GROUP BY decor;
Final question: How many rooms cost more than 120, for each different decor?
Final SQL: SELECT decor , count(*) FROM Rooms WHERE basePrice  >  120 GROUP BY decor;
Database: inn_1
Question sequence:
Tell me the average price of rooms.
Report the average room price for each bed type.
SQL query sequence:
SELECT avg(basePrice) FROM Rooms
SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
Final question: What is the average base price of rooms, for each bed type?
Final SQL: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
Database: inn_1
Question sequence:
Find all the rooms with a king bed.
How about queen bed?
Return the names of rooms that have either of them.
SQL query sequence:
SELECT * FROM Rooms WHERE bedType  =  "King"
SELECT * FROM Rooms WHERE bedType  =  "Queen";
SELECT roomName FROM Rooms WHERE bedType  =  "King" OR bedType  =  "Queen";
Final question: What are the names of rooms that have either king or queen bed?
Final SQL: SELECT roomName FROM Rooms WHERE bedType  =  "King" OR bedType  =  "Queen";
Database: inn_1
Question sequence:
Tell me the bed type for each room.
How many distinct types of beds are there?
SQL query sequence:
SELECT bedType FROM Rooms;
SELECT count(DISTINCT bedType) FROM Rooms;
Final question: Find the number of distinct bed types available in this inn.
Final SQL: SELECT count(DISTINCT bedType) FROM Rooms;
Database: inn_1
Question sequence:
Return a list of all the rooms sorted in the descending order of base prices.
Return the top three.
Just tell me the room id and name for these rooms.
SQL query sequence:
SELECT * FROM Rooms ORDER BY basePrice DESC
SELECT * FROM Rooms ORDER BY basePrice DESC LIMIT 3;
SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
Final question: What are the name and id of the three highest priced rooms?
Final SQL: SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
Database: inn_1
Question sequence:
What is the average room price in this inn?
Find all the rooms that cost more than that.
What are their room names?
SQL query sequence:
SELECT avg(basePrice) FROM Rooms
SELECT * FROM Rooms WHERE basePrice  >  ( SELECT avg(basePrice) FROM Rooms );
SELECT roomName FROM Rooms WHERE basePrice  >  ( SELECT avg(basePrice) FROM Rooms );
Final question: What are the name of rooms that cost more than the average.
Final SQL: SELECT roomName FROM Rooms WHERE basePrice  >  ( SELECT avg(basePrice) FROM Rooms );
Database: inn_1
Question sequence:
Find the ids of all the rooms that have been reserved before.
Which rooms have not had any reservation yet?
How many are there?
SQL query sequence:
SELECT DISTINCT room FROM reservations
SELECT * FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
Final question: How many rooms have not had any reservation yet?
Final SQL: SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
Database: inn_1
Question sequence:
Group all the reservation record by the rooms.
For each room, count how many times it was booked.
Also report the name of each room.
SQL query sequence:
SELECT * FROM Reservations GROUP BY Room
SELECT count(*) FROM Reservations GROUP BY Room
SELECT T2.roomName ,  count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room
Final question: For each room, find its name and the number of times reservations were made for it.
Final SQL: SELECT T2.roomName ,  count(*) ,  T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room
Database: inn_1
Question sequence:
For each room, count how many times it was booked.
Which rooms have been booked more than 60 times?
Give me the names of the rooms.
SQL query sequence:
SELECT count(*) FROM Reservations GROUP BY Room
SELECT * FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
Final question: What are the names of rooms whose reservation frequency exceeds 60 times?
Final SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
Database: inn_1
Question sequence:
Which rooms' base prices are between 120 and 150?
Give me the names of these rooms.
SQL query sequence:
SELECT * FROM rooms WHERE baseprice BETWEEN 120 AND 150
SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
Final question: Which rooms cost between 120 and 150? Give me the room names.
Final SQL: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
Database: inn_1
Question sequence:
Find the reservations made by customers whose first name has "ROY" in part.
What rooms were booked by these customers?
What are the names of these rooms?
SQL query sequence:
SELECT * FROM Reservations WHERE firstname LIKE '%ROY%'
SELECT * FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '%ROY%'
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '%ROY%'
Final question: What are the name of rooms booked by customers whose first name has "ROY" in part?
Final SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '%ROY%'
Database: allergy_1
Question sequence:
What are the different allergies?
How many are there?
SQL query sequence:
SELECT DISTINCT allergy FROM Allergy_type
SELECT count(DISTINCT allergy) FROM Allergy_type
Final question: How many allergy entries are there?
Final SQL: SELECT count(DISTINCT allergy) FROM Allergy_type
Database: allergy_1
Question sequence:
What are the different types of allergies?
How many are there?
SQL query sequence:
SELECT DISTINCT allergytype FROM Allergy_type
SELECT count(DISTINCT allergytype) FROM Allergy_type
Final question: How many distinct allergies are there?
Final SQL: SELECT count(DISTINCT allergytype) FROM Allergy_type
Database: allergy_1
Question sequence:
Show all allergy information.
What are the different allergy types?
SQL query sequence:
SELECT * FROM Allergy_type
SELECT DISTINCT allergytype FROM Allergy_type
Final question: What are the different allergy types?
Final SQL: SELECT DISTINCT allergytype FROM Allergy_type
Database: allergy_1
Question sequence:
What are the allergies?
What type is each one?
SQL query sequence:
SELECT allergy FROM Allergy_type
SELECT allergy ,  allergytype FROM Allergy_type
Final question: What are the allergies and their types?
Final SQL: SELECT allergy ,  allergytype FROM Allergy_type
Database: allergy_1
Question sequence:
What are all the different allergy names?
Which of those are food-related?
SQL query sequence:
SELECT DISTINCT allergy FROM Allergy_type
SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype  =  "food"
Final question: What are all the different food allergies?
Final SQL: SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype  =  "food"
Database: allergy_1
Question sequence:
What are the different types of allergies?
Which one is a cat allergy?
SQL query sequence:
SELECT DISTINCT allergytype FROM Allergy_type
SELECT allergytype FROM Allergy_type WHERE allergy  =  "Cat"
Final question: What is allergy type of a cat allergy?
Final SQL: SELECT allergytype FROM Allergy_type WHERE allergy  =  "Cat"
Database: allergy_1
Question sequence:
What are all the allergies?
Which allergies are categorized as type animal?
How many are there in that category?
SQL query sequence:
SELECT allergy FROM Allergy_type
SELECT allergy FROM Allergy_type WHERE allergytype  =  "animal"
SELECT count(*) FROM Allergy_type WHERE allergytype  =  "animal"
Final question: How many animal type allergies exist?
Final SQL: SELECT count(*) FROM Allergy_type WHERE allergytype  =  "animal"
Database: allergy_1
Question sequence:
What are the different allergy types?
How many are in each category?
SQL query sequence:
SELECT DISTINCT allergytype FROM Allergy_type
SELECT allergytype ,  count(*) FROM Allergy_type GROUP BY allergytype
Final question: What are the allergy types and how many allergies correspond to each one?
Final SQL: SELECT allergytype ,  count(*) FROM Allergy_type GROUP BY allergytype