aherntech/sparc huggingface dataset:
Database: network_1
Question sequence:
How many high schoolers are liked by someone else?
What are their names?
How many of them have friends?
Who are they?
SQL query sequence:
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id
SELECT count (*) FROM (SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id)
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id
Final question: Show name of all students who have some friends and also are liked by someone else.
Final SQL: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id
Database: network_1
Question sequence:
What are the names of the highschoolers who don't like anyone?
How about those who like others?
How many people do they each like?
SQL query sequence:
SELECT name FROM Highschooler where ID not in (SELECT student_id FROM Likes)
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id
SELECT T2.name ,  count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id
Final question: Show the names of high schoolers who have likes, and numbers of likes for each.
Final SQL: SELECT T2.name ,  count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id
Database: network_1
Question sequence:
How many high schoolers like somebody else?
What are their names?
what is the greatest number of likes anyone has?
who has the greatest number of likes?
SQL query sequence:
SELECT count(distinct student_id) FROM likes
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Final question: What is the name of the high schooler who has the greatest number of likes?
Final SQL: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Database: network_1
Question sequence:
Show me the names of all students?
How about those who like at least one other person!
How about those who like at least two other students!
SQL query sequence:
SELECT name FROM highschooler
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2
Final question: Show the names of students who have at least 2 likes.
Final SQL: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2
Database: network_1
Question sequence:
What are the names of the students who have some friends?
How about those have at least 2 friends?
What grades are they each in?
Show me the names of only those who are in a grade higher than 5!
SQL query sequence:
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2
SELECT T2.name, T2.grade FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.grade  >  5 GROUP BY T1.student_id HAVING count(*)  >=  2
Final question: Show the names of students who have a grade higher than 5 and have at least 2 friends.
Final SQL: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.grade  >  5 GROUP BY T1.student_id HAVING count(*)  >=  2
Database: network_1
Question sequence:
What grade is the student named Kyle in?
How many other students like him?
What are their names?
How many other students does he like?
SQL query sequence:
SELECT grade FROM highschooler where name = "Kyle"
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id WHERE T2.name  =  "Kyle"
SELECT T3.name  FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id JOIN Highschooler as T3 on T3.ID = T1.student_id WHERE T2.name  =  "Kyle"
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"
Final question: How many likes does Kyle have?
Final SQL: SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"
Database: network_1
Question sequence:
Show me the student_id and the grade for all students.
What is the average grade?
How about for students who have no friends?
How about for those who have some friends?
SQL query sequence:
SELECT id, grade FROM highschooler
SELECT avg(grade) FROM highschooler
SELECT avg(grade) FROM Highschooler WHERE id not IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)
SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)
Final question: Find the average grade of all students who have some friends.
Final SQL: SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)
Database: course_teach
Question sequence:
Show all the teachers.
How many are there?
SQL query sequence:
SELECT * FROM teacher
SELECT count(*) FROM teacher
Final question: How many teachers are there?
Final SQL: SELECT count(*) FROM teacher
Database: course_teach
Question sequence:
What is the name of each teacher?
Sort them in ascending order of age.
SQL query sequence:
SELECT Name FROM teacher
SELECT Name FROM teacher ORDER BY Age ASC
Final question: List the names of teachers in ascending order of age.
Final SQL: SELECT Name FROM teacher ORDER BY Age ASC
Database: course_teach
Question sequence:
What is the age of each teacher?
Also show the hometown for each.
SQL query sequence:
SELECT Hometown FROM teacher
SELECT Age ,  Hometown FROM teacher
Final question: What are the age and hometown of teachers?
Final SQL: SELECT Age ,  Hometown FROM teacher
Database: course_teach
Question sequence:
What is the hometown of each teacher?
Which teacher's hometown is not "Little Lever Urban District"?
Give me their names.
SQL query sequence:
SELECT Hometown FROM teacher
SELECT * FROM teacher WHERE Hometown != "Little Lever Urban Distric"
SELECT Name FROM teacher WHERE Hometown != "Little Lever Urban Distric"
Final question: List the name of teachers whose hometown is not "Little Lever Urban District".
Final SQL: SELECT Name FROM teacher WHERE Hometown != "Little Lever Urban Distric"
Database: course_teach
Question sequence:
What are the ages of all the teachers?
Which teachers are age 32?
Which teachers are age 32 or 33?
What are their names?
SQL query sequence:
SELECT Age FROM teacher
SELECT * FROM teacher WHERE Age  =  32
SELECT * FROM teacher WHERE Age  =  32 OR Age  =  33
SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33
Final question: Show the name of teachers aged either 32 or 33?
Final SQL: SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33
Database: course_teach
Question sequence:
Sort all the teachers by their age.
Which teacher is the youngest?
What is his or her hometown?
SQL query sequence:
SELECT * FROM teacher ORDER BY Age
SELECT * FROM teacher ORDER BY Age ASC LIMIT 1
SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1
Final question: What is the hometown of the youngest teacher?
Final SQL: SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1
Database: course_teach
Question sequence:
What is the hometown of each teacher?
Can you order teachers by their hometowns?
Show the number of teachers from each hometown.
SQL query sequence:
SELECT Hometown FROM teacher
SELECT * FROM teacher order BY Hometown
SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown
Final question: Show different hometown of teachers and the number of teachers from each hometown.
Final SQL: SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown
Database: course_teach
Question sequence:
How many teachers are there?
How many are there for each hometown?
Find the most common hometown of teachers.
SQL query sequence:
SELECT COUNT(*) FROM teacher
SELECT COUNT(*) FROM teacher GROUP BY Hometown
SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1
Final question: List the most common hometown of teachers.
Final SQL: SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1
Database: course_teach
Question sequence:
How many teachers are there?
How many teachers are there for each hometown?
Which hometowns are shared by at least two teachers?
SQL query sequence:
SELECT COUNT(*) FROM teacher
SELECT COUNT(*) FROM teacher GROUP BY Hometown
SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2
Final question: Show the hometowns shared by at least two teachers.
Final SQL: SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2
Database: course_teach
Question sequence:
Find all the course arrangements.
For each of the courses, show the teacher who teaches it.
SQL query sequence:
SELECT * FROM course_arrange
SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID
Final question: Show names of teachers and the courses they are arranged to teach.
Final SQL: SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID
Database: course_teach
Question sequence:
Find all the course arrangements.
Show names of teachers and the courses they are arranged to teach.
Sort the results by teacher's name
SQL query sequence:
SELECT * FROM course_arrange
SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID
SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID ORDER BY T3.Name
Final question: Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
Final SQL: SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID ORDER BY T3.Name
Database: course_teach
Question sequence:
Find all the course arrangements.
Show names of teachers and the courses they are arranged to teach.
Which teachers teach the math course? Give me their names.
SQL query sequence:
SELECT * FROM course_arrange
SELECT T3.Name ,  T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID
SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID WHERE T2.Course  =  "Math"
Final question: Show the name of the teacher for the math course.
Final SQL: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID  =  T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID  =  T3.Teacher_ID WHERE T2.Course  =  "Math"
Database: course_teach
Question sequence:
Show all the teacher names.
Show names of teachers and the number of courses they teach.
SQL query sequence:
SELECT Name FROM teacher
SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name
Final question: Show names of teachers and the number of courses they teach.
Final SQL: SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name
Database: course_teach
Question sequence:
Show all the teacher names.
Show names of teachers and the number of courses they teach.
Show the names of teachers who teach at least two courses.
SQL query sequence:
SELECT Name FROM teacher
SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
Final question: Show names of teachers that teach at least two courses.
Final SQL: SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
Database: real_estate_properties
Question sequence:
Show all the available features.
How many available features are there?
SQL query sequence:
SELECT * FROM Other_Available_Features
SELECT count(*) FROM Other_Available_Features
Final question: How many available features are there in total?
Final SQL: SELECT count(*) FROM Other_Available_Features
Database: real_estate_properties
Question sequence:
Find the available features with feature name "AirCon".
What is the feature type name?
SQL query sequence:
SELECT * FROM Other_Available_Features WHERE feature_name  =  "AirCon"
SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code  =  T2.feature_type_code WHERE T1.feature_name  =  "AirCon"
Final question: What is the feature type name of feature AirCon?
Final SQL: SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code  =  T2.feature_type_code WHERE T1.feature_name  =  "AirCon"
Database: real_estate_properties
Question sequence:
What is the property type description of each property?
Show the property type descriptions of properties for each property type code.
SQL query sequence:
SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code  =  T2.property_type_code
SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code  =  T2.property_type_code GROUP BY T1.property_type_code
Final question: Show the property type descriptions of properties belonging to that code.
Final SQL: SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code  =  T2.property_type_code GROUP BY T1.property_type_code
Database: voter_1
Question sequence:
Show all area codes and states.
How many are there?
SQL query sequence:
SELECT * FROM area_code_state
SELECT count(*) FROM area_code_state
Final question: How many states are there?
Final SQL: SELECT count(*) FROM area_code_state
Database: voter_1
Question sequence:
Show all info about contestants.
What are their names?
Can you also show contestant numbers?
Can you sort them ordered in descending order of contestant name?
SQL query sequence:
SELECT * FROM contestants
SELECT  contestant_name FROM contestants
SELECT contestant_number ,  contestant_name FROM contestants
SELECT contestant_number ,  contestant_name FROM contestants ORDER BY contestant_name DESC
Final question: List the contestant numbers and names, ordered by contestant name descending.
Final SQL: SELECT contestant_number ,  contestant_name FROM contestants ORDER BY contestant_name DESC
Database: voter_1
Question sequence:
Show all info about votes.
Also provide vote ids.
Also show phone numbers.
SQL query sequence:
SELECT state FROM votes
SELECT vote_id,  state FROM votes
SELECT vote_id ,  phone_number ,  state FROM votes
Final question: List the vote ids, phone numbers and states of all votes.
Final SQL: SELECT vote_id ,  phone_number ,  state FROM votes
Database: voter_1
Question sequence:
Show all area codes.
What is the largest one?
How about smallest one?
Give me both.
SQL query sequence:
SELECT area_code FROM area_code_state
SELECT max(area_code) FROM area_code_state
SELECT min(area_code) FROM area_code_state
SELECT max(area_code) ,  min(area_code) FROM area_code_state
Final question: What are the maximum and minimum values of area codes?
Final SQL: SELECT max(area_code) ,  min(area_code) FROM area_code_state
Database: voter_1
Question sequence:
Show all votes.
Which ones are from the state 'CA'?
Among those, can you give me the last date created?
SQL query sequence:
SELECT * FROM votes
SELECT * FROM votes WHERE state  =  'CA'
SELECT max(created) FROM votes WHERE state  =  'CA'
Final question: What is last date created of votes from the state 'CA'?
Final SQL: SELECT max(created) FROM votes WHERE state  =  'CA'
Database: voter_1
Question sequence:
Show all contestants.
What are their names?
Can you not include the name 'Jessie Alloway'?
SQL query sequence:
SELECT * FROM contestants
SELECT contestant_name FROM contestants
SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'
Final question: What are the names of the contestants whose names are not 'Jessie Alloway'
Final SQL: SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'
Database: voter_1
Question sequence:
Show all votes?
Among these, what is the list of states?
What are the distinct states and create time?
SQL query sequence:
SELECT * FROM votes
SELECT state FROM votes
SELECT DISTINCT state ,  created FROM votes
Final question: What are the distinct states and create time of all votes?
Final SQL: SELECT DISTINCT state ,  created FROM votes
Database: voter_1
Question sequence:
Show all the contestants.
Show all the votes.
Can you show contestants with at least two votes?
What are their contestant numbers and names?
SQL query sequence:
SELECT * FROM contestants
SELECT * FROM votes
SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number HAVING count(*)  >=  2
SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number HAVING count(*)  >=  2
Final question: What are the contestant numbers and names of the contestants who had at least two votes?
Final SQL: SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number HAVING count(*)  >=  2
Database: voter_1
Question sequence:
Show all the contestants.
Show all the votes.
Can you show the contestant with the least votes?
What is his or her contestant number and contestant name?
SQL query sequence:
SELECT * FROM contestants
SELECT * FROM votes
SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1
SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1
Final question: Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
Final SQL: SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1
Database: voter_1
Question sequence:
Show all votes.
What about those from state 'NY' or 'CA'?
Give me the count of these votes.
SQL query sequence:
SELECT * FROM votes
SELECT * FROM votes WHERE state  =  'NY' OR state  =  'CA'
SELECT count(*) FROM votes WHERE state  =  'NY' OR state  =  'CA'
Final question: What are the number of votes from state 'NY' or 'CA'?
Final SQL: SELECT count(*) FROM votes WHERE state  =  'NY' OR state  =  'CA'
Database: voter_1
Question sequence:
Show all contestants
Which contestants did not get any votes?
How many are there?
SQL query sequence:
SELECT * FROM contestants
SELECT * FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )
SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )
Final question: How many contestants did not get voted?
Final SQL: SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )
Database: voter_1
Question sequence:
Show all area codes and states.
Show all votes.
Get the count of votes for each area code.
What is the area code in which the most voters voted?
SQL query sequence:
SELECT * FROM area_code_state
SELECT * FROM votes
SELECT count(*) FROM AREA_CODE_STATE AS T1 JOIN votes AS T2 ON T1.state  =  T2.state GROUP BY T1.area_code
SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state  =  T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1
Final question: What is the area code in which the most voters voted?
Final SQL: SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state  =  T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1
Database: voter_1
Question sequence:
Show all votes.
Show those that were for the contestant named 'Tabatha Gehling'.
What are the create dates, states, and phone numbers of these votes?
SQL query sequence:
SELECT * FROM votes
SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number WHERE T1.contestant_name  =  'Tabatha Gehling'
SELECT T2.created ,  T2.state ,  T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number WHERE T1.contestant_name  =  'Tabatha Gehling'
Final question: What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?
Final SQL: SELECT T2.created ,  T2.state ,  T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number WHERE T1.contestant_name  =  'Tabatha Gehling'
Database: voter_1
Question sequence:
Show all area codes.
Can you tell me area codes in which voters voted for the contestant 'Tabatha Gehling'?
How about both the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'?
SQL query sequence:
SELECT * FROM area_code_state
SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Tabatha Gehling'
SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Kelly Clauss'
Final question: List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.
Final SQL: SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number  =  T2.contestant_number JOIN area_code_state AS T3 ON T2.state  =  T3.state WHERE T1.contestant_name  =  'Kelly Clauss'