1sf/bird-sql-train-with-schema huggingface dataset:
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Among all the tweets with a positive sentiment, how many of them were posted by male users in Australia?
Evidence: tweet with positive sentiment refers to Sentiment > 0; male user refers to Gender = 'Male'; 'Australia' is the Country
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.Country = 'Australia' AND T3.Gender = 'Male' AND T1.Sentiment > 0
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users?
Evidence: positive sentiment tweet refers to Sentiment > 0; neutral sentiment refers to Sentiment = 0; male user refers to Gender = 'Male'; difference = Subtract (Count (TweetID where Sentiment > 0), Count (TweetID where Sentiment = 0))
SQL: SELECT SUM(CASE WHEN T1.Sentiment > 0 THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.Sentiment = 0 THEN 1 ELSE 0 END) AS diff FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: From which city was the tweet with the most number of retweets posted?
Evidence: tweet with most number of retweet post refers to Max(RetweetCount)
SQL: SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID ORDER BY T1.RetweetCount DESC LIMIT 1
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: From which city were more tweets posted, Bangkok or Chiang Mai?
Evidence: "Bangkok" and "Chiang Mai" are both City
SQL: SELECT SUM(CASE WHEN T2.City = 'Bangkok' THEN 1 ELSE 0 END) AS bNum , SUM(CASE WHEN T2.City = 'Chiang Mai' THEN 1 ELSE 0 END) AS cNum FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City IN ('Bangkok', 'Chiang Mai')
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Among the tweets posted from Santa Fe state in Argentina, how many of them were posted on 31st?
Evidence: "Sante Fe" is the State; "Argentina" is the Country; posted on 31st refers to Day = 31
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.Day = 31 AND T2.State = 'Santa' AND T2.Country = 'Argentina'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Please list the top 3 cities with the most number of tweets posted in Canada.
Evidence: "Canada" is the Country; city with most number of tweets refers to City where Max(Count(TweetID))
SQL: SELECT T.City FROM ( SELECT T2.City, COUNT(T1.TweetID) AS num FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Canada' GROUP BY T2.City ) T ORDER BY T.num DESC LIMIT 3
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Please list all the cities from where tweets with neutral sentiments were posted.
Evidence: neutral sentiment refers to Sentiment = 0
SQL: SELECT DISTINCT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE Sentiment = 0
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Among all the tweets sent by male users in Argentina, what is the text of the one with the most number of likes?
Evidence: male user refers to Gender = 'Male'; 'Argentina' is the Country; most number of likes refers to Max(Likes)
SQL: SELECT T2.text FROM user AS T1 INNER JOIN twitter AS T2 ON T1.UserID = T2.UserID INNER JOIN location AS T3 ON T2.LocationID = T3.LocationID WHERE T3.Country = 'Argentina' AND T1.Gender = 'Male' ORDER BY T2.Likes DESC LIMIT 1
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the average number of likes for a tweet posted by a male user on Mondays?
Evidence: male user refers to Gender = 'Male'; 'Monday' is the Weekday; average number of likes = Divide (Sum(Likes), Count(TweetID))
SQL: SELECT SUM(T1.Likes) / COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Weekday = 'Monday'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Tweets posted from which city has a higher number of average likes, Bangkok or Chiang Mai?
Evidence: "Bangkok" and "Chiang Mai" are both City; average number of like = Divide (Sum(Likes), Count(TweetID))
SQL: SELECT SUM(CASE WHEN T2.City = 'Bangkok' THEN Likes ELSE NULL END) / COUNT(CASE WHEN T2.City = 'Bangkok' THEN 1 ELSE 0 END) AS bNum , SUM(CASE WHEN City = 'Chiang Mai' THEN Likes ELSE NULL END) / COUNT(CASE WHEN City = 'Chiang Mai' THEN TweetID ELSE NULL END) AS cNum FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City IN ('Bangkok', 'Chiang Mai')
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Which course is more difficult, Intro to BlockChain or Computer Network?
Evidence: diff refers to difficulty; diff is higher means the course is more difficult;
SQL: SELECT name FROM course WHERE name = 'Intro to BlockChain' OR name = 'Computer Network' ORDER BY diff DESC LIMIT 1
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Please list the names of the courses that are less important than Machine Learning Theory.
Evidence: lower credit means less important;
SQL: SELECT name FROM course WHERE credit < ( SELECT credit FROM course WHERE name = 'Machine Learning Theory' )
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: How many professors are more popular than Zhou Zhihua?
Evidence: higher popularity means the professor is more popular;
SQL: SELECT COUNT(prof_id) FROM prof WHERE popularity > ( SELECT popularity FROM prof WHERE first_name = 'Zhihua' AND last_name = 'Zhou' )
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: What is the phone number of Kerry Pryor?
SQL: SELECT phone_number FROM student WHERE l_name = 'Pryor' AND f_name = 'Kerry'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Which professor advised Faina Mallinar to become a research assistant? Please give his or her full name.
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; full name refers to f_name and l_name;
SQL: SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Faina' AND T3.l_name = 'Mallinar'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: How many research assistants does Sauveur Skyme have?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA;
SQL: SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.first_name = 'Sauveur' AND T2.last_name = 'Skyme'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Please list the full names of all the students who are research assistants with the highest research capability.
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; the highest research capability refers to capability = 5; full name refers to f_name and l_name;
SQL: SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN RA AS T2 ON T1.student_id = T2.student_id WHERE T2.capability = 5
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: How many research assistants of Ogdon Zywicki have an average salary?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; average salary refers to salary = 'med';
SQL: SELECT COUNT(T1.prof_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.first_name = 'Ogdon' AND T1.salary = 'med' AND T2.last_name = 'Zywicki'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Please list the full names of all the students who took the course Machine Learning Theory.
Evidence: full name refers to f_name and l_name;
SQL: SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Machine Learning Theory'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Among the students who got a B in the course Machine Learning Theory, how many of them have a gpa of over 3?
Evidence: B refers to grade; GPA is an abbreviated name of Grade Point Average where over 3 refers to gpa > 3;
SQL: SELECT COUNT(student_id) FROM registration WHERE grade = 'B' AND student_id IN ( SELECT student_id FROM student WHERE gpa > 3 AND course_id IN ( SELECT course_id FROM course WHERE name = 'Machine Learning Theory' ) )
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Please list the names of the courses taken by Laughton Antonio.
SQL: SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.f_name = 'Laughton' AND T1.l_name = 'Antonio'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Which student failed the course Intro to Database 2? Please give his or her full name.
Evidence: If grade is NULL, it means that this student fails to pass the course; full name refers to f_name and l_name;
SQL: SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.grade IS NULL AND T3.name = 'Intro to Database 2'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Which student is more satisfied with the course Machine Learning Theory, Willie Rechert or Laughton Antonio?
Evidence: sat refers to student's satisfaction degree with the course; more satisfied refers to MAX(sat);
SQL: SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE (T1.f_name = 'Laughton' OR T1.f_name = 'Willie') AND (T1.l_name = 'Antonio' OR T1.l_name = 'Rechert') AND T3.name = 'Machine Learning Theory' ORDER BY T2.sat DESC LIMIT 1
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Among the professors who have more than 3 research assistants, how many of them are male?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; more than 3 research assistant refers to COUNT(student_id) > 3;
SQL: SELECT COUNT(*) FROM ( SELECT T2.prof_id FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.gender = 'Male' GROUP BY T1.prof_id HAVING COUNT(T1.student_id) > 3 )
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Among the students who took the course Machine Learning Theory, how many of them are undergraduates?
Evidence: UG is an abbreviated name of undergraduate student in which type = 'UG';
SQL: SELECT COUNT(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Machine Learning Theory' AND T1.type = 'UG'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Which professor advised Willie Rechert to work as a research assistant? Please give his or her full name.
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; prof_id refers to professor’s ID; full name refers to f_name and l_name;
SQL: SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Willie' AND T3.l_name = 'Rechert'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: What is the average gpa of Ogdon Zywicki's research assistants?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; prof_id refers to professor’s ID; GPA is an abbreviated name of Grade Point Average where average = AVG(gpa);
SQL: SELECT SUM(T3.gpa) / COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T1.student_id = T3.student_id WHERE T2.first_name = 'Ogdon' AND T2.last_name = 'Zywicki'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: What is the average satisfying degree of the course Machine Learning Theory?
Evidence: sat refers to student's satisfaction degree with the course;
SQL: SELECT CAST(SUM(T1.sat) AS REAL) / COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.name = 'Machine Learning Theory'
Database: cs_semester
Tables: course, prof, RA, registration, student
Columns (table index, column name): -1, *, 0, course_id, 0, name, 0, credit, 0, diff, 1, prof_id, 1, gender, 1, first_name, 1, last_name, 1, email, 1, popularity, 1, teachingability, 1, graduate_from, 2, student_id, 2, capability, 2, prof_id, 2, salary, 3, course_id, 3, student_id, 3, grade, 3, sat, 4, student_id, 4, f_name, 4, l_name, 4, phone_number, 4, email, 4, intelligence, 4, gpa, 4, type
Question: Give the number of research postgraduate students.
Evidence: RPG is an abbreviated name of research postgraduate student in which type = 'RPG';
SQL: SELECT COUNT(student_id) FROM student WHERE type = 'RPG'