aherntech/sparc huggingface dataset:
Database: e_learning
Question sequence:
Tell me the personal name of the course author that teaches the course with name "operating system".
How about his address?
Tel me the addresses of the course authors who teach the course with name "operating system" or "data structure"
SQL query sequence:
SELECT T1.personal_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "operating system"
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "operating system"
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "operating system" OR T2.course_name  =  "data structure"
Final question: Find the addresses of the course authors who teach the course with name "operating system" or "data structure".
Final SQL: SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "operating system" OR T2.course_name  =  "data structure"
Database: e_learning
Question sequence:
Tell me the personal name, family name, and author ID of the course author that teaches English.
How about that of course French.
Tell me the personal name, family name, and author ID of the course author that teaches the most courses.
SQL query sequence:
SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name = "English"
SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name = "French"
SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
Final question: Find the personal name, family name, and author ID of the course author that teaches the most courses.
Final SQL: SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
Database: e_learning
Question sequence:
Tell me Julio's address
Tell me the number of courses that he teaches.
Tell me the addresses and author IDs of the course authors that teach at least two courses.
SQL query sequence:
SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Julio"
SELECT COUNT(*) FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE personal_name = "Julio"
SELECT T1.address_line_1 ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id HAVING Count(*)  >=  2
Final question: Find the addresses and author IDs of the course authors that teach at least two courses.
Final SQL: SELECT T1.address_line_1 ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id HAVING Count(*)  >=  2
Database: e_learning
Question sequence:
Tell me Julio's address.
Tell me the number of courses that he teaches.
What are they?
SQL query sequence:
SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Julio"
SELECT COUNT(T2.course_name) FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T1.personal_name  =  "Julio"
SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T1.personal_name  =  "Julio"
Final question: Find the names of courses taught by the tutor who has personal name "Julio".
Final SQL: SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T1.personal_name  =  "Julio"
Database: e_learning
Question sequence:
Tell me the names and descriptions of courses that belong to the subject named "Arts".
Tell me the names and descriptions of courses that belong to the subject named "Language".
Tell me the names and descriptions of courses that belong to the subject named "Computer Science".
SQL query sequence:
SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Arts"
SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Language"
SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Computer Science"
Final question: Find the names and descriptions of courses that belong to the subject named "Computer Science".
Final SQL: SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Computer Science"
Database: e_learning
Question sequence:
Tell me the courses that belong to the subject named "Computer Science".
Tell me the courses that belong to the subject named "Arts".
Tell me the subject ID, subject name, and the corresponding number of available courses for each subject.
SQL query sequence:
SELECT T1.course_name FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Computer Science"
SELECT T1.course_name FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Arts"
SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id
Final question: Find the subject ID, subject name, and the corresponding number of available courses for each subject.
Final SQL: SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id
Database: e_learning
Question sequence:
Tell me the number of courses that belong to "Language".
What are they?
Tell me the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.
SQL query sequence:
SELECT COUNT(T1.course_name) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Language"
SELECT T1.course_name FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Language"
SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
Final question: Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.
Final SQL: SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
Database: e_learning
Question sequence:
What is the date of completion of the course named "machine learning"?
What is the date of enrollment of that course?
So what is the date of enrollment of the course named "Spanish"?
SQL query sequence:
SELECT T2.date_of_completion FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "machine learning"
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "machine learning"
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "Spanish"
Final question: What is the date of enrollment of the course named "Spanish"?
Final SQL: SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "Spanish"
Database: e_learning
Question sequence:
How many students are enrolled in "English"?
So what is the name of the course that has the least student enrollment?
How about the course that has the most student enrollment?
SQL query sequence:
SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name = "English"
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) ASC LIMIT 1
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
Final question: What is the name of the course that has the most student enrollment?
Final SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
Database: e_learning
Question sequence:
How many students are enrolled in "French"?
Okay, how many students are enrolled in "AI"?
So what are the names of the courses that have exactly 1 student enrollment?
SQL query sequence:
SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name = "French"
SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name = "AI"
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  =  1
Final question: What are the names of the courses that have exactly 1 student enrollment?
Final SQL: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  =  1
Database: e_learning
Question sequence:
How many students are enrolled in "AI"?
Okay. Tell me the names of the courses that have student enrollment bigger than 5?
What are the descriptions and names of the courses that have student enrollment bigger than 2?
SQL query sequence:
SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name = "AI"
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  5
SELECT T1.course_description ,  T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2
Final question: What are the descriptions and names of the courses that have student enrollment bigger than 2?
Final SQL: SELECT T1.course_description ,  T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2
Database: e_learning
Question sequence:
How many students are there?
How many courses are there?
What is the name of each course and the corresponding number of student enrollment?
SQL query sequence:
SELECT COUNT(*) FROM Students
SELECT COUNT(*) FROM Courses
SELECT T1.course_name ,  COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name
Final question: What is the name of each course and the corresponding number of student enrollment?
Final SQL: SELECT T1.course_name ,  COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name
Database: e_learning
Question sequence:
What are the dates of all the tests that have the result "Fail"?
How about that of all the tests that have the result "Pass"?
So what are the enrollment dates of all the tests that have the result "Pass"?
SQL query sequence:
SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "Fail"
SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "Pass"
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "Pass"
Final question: What are the enrollment dates of all the tests that have result "Pass"?
Final SQL: SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "Pass"
Database: e_learning
Question sequence:
How many tests have result "Fail"?
What are the dates of those tests?
What are the completion dates of all the tests that have result "Fail"?
SQL query sequence:
SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result  =  "Fail"
SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "Fail"
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "Fail"
Final question: What are the completion dates of all the tests that have result "Fail"?
Final SQL: SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "Fail"
Database: e_learning
Question sequence:
Tell me Karson's registration date.
When is his enrollment?
When is his completion?
SQL query sequence:
SELECT date_of_registration FROM Students WHERE personal_name = "Karson"
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "Karson"
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "Karson"
Final question: List the dates of enrollment and completion of the student with personal name "Karson".
Final SQL: SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "Karson"
Database: e_learning
Question sequence:
Tell me Krystel's date of registration.
How about her dates of enrollment and completion?
How about the dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie"?
SQL query sequence:
SELECT date_of_registration FROM Students WHERE personal_name = "Krystel"
SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "Krystel"
SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.family_name  =  "Zieme" AND T2.personal_name  =  "Bernie"
Final question: List the dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie".
Final SQL: SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.family_name  =  "Zieme" AND T2.personal_name  =  "Bernie"
Database: e_learning
Question sequence:
Tell me how many course enrollments there are?
Tell me how many there are for the student named Jewel?
Tell me the student ID and login name of the student with the most course enrollments.
SQL query sequence:
SELECT COUNT(*) FROM Student_Course_Enrolment
SELECT COUNT(*) FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name = "Jewel"
SELECT T1.student_id ,  T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
Final question: Find the student ID and login name of the student with the most course enrollments
Final SQL: SELECT T1.student_id ,  T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
Database: e_learning
Question sequence:
How many students are enrolled in "AI"?
Tell me the names of the courses that have student enrollment bigger than 5.
What are the student ID and personal name of the student with at least two enrollments?
SQL query sequence:
SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name = "AI"
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2
SELECT T1.student_id ,  T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  >=  2
Final question: Find the student ID and personal name of the student with at least two enrollments.
Final SQL: SELECT T1.student_id ,  T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  >=  2
Database: e_learning
Question sequence:
Tell me all the enrollment information for the student with personal name "Else".
How about that for the personal name "Wilson"?
Tell me the student ID and middle name for all the students with at most two enrollments.
SQL query sequence:
SELECT * FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name = "Else"
SELECT * FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name = "Wilson"
SELECT T1.student_id ,  T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  <=  2
Final question: Find the student ID and middle name for all the students with at most two enrollments.
Final SQL: SELECT T1.student_id ,  T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  <=  2
Database: e_learning
Question sequence:
Tell me the course description of the course named "database".
Tell me the number of students enrolled in this course.
Tell me the personal names of students that not enrolled in any course.
SQL query sequence:
SELECT course_description FROM Courses WHERE course_name = "database"
SELECT T1.course_name ,  COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name WHERE T1.course_name = "database"
SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id  =  T2.student_id
Final question: Find the personal names of students not enrolled in any course.
Final SQL: SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id  =  T2.student_id
Database: e_learning
Question sequence:
Tell me the course description of the course named art history.
Tell me the number of students enrolling this course.
How many students did not have any course enrollment?
SQL query sequence:
SELECT course_description FROM Courses WHERE course_name = "Art history"
SELECT T1.course_name ,  COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name WHERE T1.course_name = "Art history"
SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
Final question: How many students did not have any course enrollment?
Final SQL: SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
Database: e_learning
Question sequence:
Tell me Cary's login name.
How about Autumn's login name.
Tell me the common login name of course authors and students.
SQL query sequence:
SELECT login_name FROM Students WHERE personal_name = "Cary"
SELECT login_name FROM Students WHERE personal_name = "Autumn"
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
Final question: Find the common login name of course authors and students.
Final SQL: SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
Database: sports_competition
Question sequence:
List all the information about the club ranks.
What is the average number of gold medals?
What about silver medals?
What about the maximum and minimum number of silver medals?
SQL query sequence:
SELECT * FROM club_rank
SELECT avg(Gold) FROM club_rank
SELECT avg(Silver) FROM club_rank
SELECT max(Silver) ,  min(Silver) FROM club_rank
Final question: What are the maximum and minimum number of silver medals for clubs.
Final SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
Database: sports_competition
Question sequence:
What are the club names for each player?
How many players are there in each club?
Which clubs have players who are the position of "Right Wing".
SQL query sequence:
SELECT T1.name, T2.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
SELECT T1.name, count(*) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID group by T1.name
SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"
Final question: Show the names of clubs that have players with position "Right Wing".
Final SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"
Database: sports_competition
Question sequence:
What are the club names and points for each player?
What is the average points for all of them?
What about that of the club 'BK Slide'?
What about club 'AIB'?
SQL query sequence:
SELECT T1.name,T2.Points,T2.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "BK Slide"
SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"
Final question: What is the average points of players from club with name "AIB".
Final SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"
Database: sports_competition
Question sequence:
Show all the positions of the players.
How many unique positions are there?
How many players are there for each of them?
What is the average points of all players?
What are the positions of the players with average number of points scored by players of that position bigger than 20?
SQL query sequence:
SELECT POSITION FROM player
SELECT count (distinct POSITION) FROM player
SELECT POSITION, count (*) FROM player GROUP BY POSITION
SELECT avg(Points) FROM player
SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
Final question: List the position of players with average number of points scored by players of that position bigger than 20.
Final SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
Database: sports_competition
Question sequence:
How many unique competition types are there?
How many competitions are there for each type?
Among those results, which one is the most common one?
SQL query sequence:
SELECT count (distinct Competition_type) FROM competition
SELECT Competition_type, count(*) FROM competition GROUP BY Competition_type
SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
Final question: List the most common type of competition.
Final SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1