db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
0
673
SQL
stringlengths
23
804
question_id
int64
0
9.43k
difficulty
stringclasses
1 value
social_media
How many reshared tweets are there in Texas?
reshared tweet refers to IsReshare = 'TRUE'; 'Texas' is the State
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.State = 'Texas' AND T1.IsReshare = 'TRUE'
800
social_media
For the tweet which got a reach number of 547851, which country did it come from?
reach number of 547851 refers to Reach = 547851
SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Reach = 547851
801
social_media
State the number of positive tweets from Ha Noi.
positive tweet refers to Sentiment > 0; 'Ha Noi' is the State
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Sentiment > 0 AND T2.State = 'Ha Noi'
802
social_media
Show the text of the tweet with the highest klout from Connecticut.
highest klout refers to Max(Klout); 'Connecticut' is the State
SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.State = 'Connecticut' ORDER BY T1.Klout DESC LIMIT 1
803
social_media
How many female Twitter users are there from Wisconsin?
female users refers to Gender = 'Female'; 'Wisconsin' is the State
SELECT COUNT(T1.Likes) 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.State = 'Wisconsin' AND T3.Gender = 'Female'
804
social_media
What is the gender of the user who tweeted `tw-715909161071091712`?
"tw-715909161071091712" is the TweetID
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.TweetID = 'tw-715909161071091712'
805
social_media
Give the name of the city of the user who tweeted `One of our favorite stories is @FINRA_News's move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a`.
"One of our favorite stories is @FINRA_News's move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a" is the text
SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.text = 'One of our favorite stories is @FINRA_News''s move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a'
806
social_media
What is the gender of the user whose tweet got 535 retweets?
tweet got 535 retweets refers to RetweetCount = 535
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount = 535
807
social_media
Give the gender of the user who made the highest klout tweet on Wednesdays.
highest klout refers to Max(Klout); 'Wednesday' is the Weekday
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Weekday = 'Wednesday' ORDER BY T1.Klout DESC LIMIT 1
808
social_media
For the tweet which got the most likes, state the gender of the user who tweeted it.
most likes refers to Max(Likes)
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Likes DESC LIMIT 1
809
social_media
State the number of tweets from Michigan on Thursdays.
"Michigan" is the State; 'Thursday' is the Weekday; number of tweets refers to Count(TweetID)
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Weekday = 'Thursday' AND T2.State = 'Michigan'
810
social_media
Which state was the tweet `tw-685681052912873473` from? Give the state code.
tw-685681052912873473' is the TweetID
SELECT T2.StateCode FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.TweetID = 'tw-685681052912873473'
811
social_media
What is the percentage of male Twitter users from Florida?
"Florida" is the State; male user refers to Gender = 'Male'; percentage = Divide (Count(UserID where Gender = 'Male'), Count (UserID)) * 100
SELECT SUM(CASE WHEN T3.Gender = 'Male' THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS percentage 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.State = 'Florida'
812
social_media
What is the percentage of the tweets from California are positive?
"California" is the State; positive tweet refers to Sentiment > 0; percentage = Divide (Count(TweetID where Sentiment > 0), Count (TweetID)) * 100
SELECT SUM(CASE WHEN T1.Sentiment > 0 THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS percentage FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE State = 'California'
813
social_media
What is the day of the week that tweet with ID tw-682712873332805633 was posted?
"tw-682712873332805633" is the TweetID; day of the week refers to Weekday
SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633'
814
social_media
How many unique users have seen tweet with text `Happy New Year to all those AWS instances of ours!`?
"Happy New Year to all those AWS instances of ours!" is the text; seen unique users refers to Reach
SELECT Reach FROM twitter WHERE text = 'Happy New Year to all those AWS instances of ours!'
815
social_media
Count the total number of tweet IDs in `en`.
"en" is the language and refers to Lang = 'en'
SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en'
816
social_media
Is 3751 the location ID for tweet with ID tw-682714048199311366?
"tw-682714048199311366" is the TweetID
SELECT LocationID FROM twitter WHERE TweetID = 'tw-682714048199311366'
817
social_media
How many tweets have been posted on Wednesday?
"Wednesday" is the Weekday
SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday'
818
social_media
List down all of the texts posted on Twitter on Thursday.
"Thursday" is the Weekday
SELECT text FROM twitter WHERE Weekday = 'Thursday'
819
social_media
What is the gender of the user who posted a tweet with ID tw-682714583044243456?
"tw-682714583044243456" is the TweetID
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.TweetID = 'tw-682714583044243456'
820
social_media
List down the text of tweets posted by unknown gender users.
unknown gender user refers to Gender = 'Unknown'
SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Unknown'
821
social_media
Calculate the total number of male tweet IDs.
"Male" is the Gender
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'
822
social_media
What gender of users posted the most tweets in `en`?
"en" is the language and refers to Lang = 'en'; most tweet in 'en' refers to Max(Count(text where Lang = 'en'))
SELECT T.Gender FROM ( SELECT T2.Gender, COUNT( text) AS num FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Lang = 'en' GROUP BY T2.Gender ) T ORDER BY T.num DESC LIMIT 1
823
social_media
What gender of users retweet more than 30 times?
retweet more than 30 times refers to RetweetCount > 30
SELECT DISTINCT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount > 30
824
social_media
How many female users reshared their tweets?
female users refers to Gender = 'Female'; reshare refers to IsReshare = 'TRUE'
SELECT COUNT(T1.UserID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Female' AND T1.IsReshare = 'TRUE'
825
social_media
Which country's tweets collected the most likes?
country collected the most likes refers to Country where Max(Sum(Likes))
SELECT T.Country FROM ( SELECT T2.Country, SUM(T1.Likes) AS num FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID GROUP BY T2.Country ) T ORDER BY T.num DESC LIMIT 1
826
social_media
Tweet with ID tw-682723090279841798 was posted from which country?
"tw-682723090279841798" is the TweetID
SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TweetID = 'tw-682723090279841798'
827
social_media
List down all the tweet text posted from Australia.
"Australia" is the Country
SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Australia'
828
social_media
Write down the tweet text posted from Rawang, Selangor, Malaysia.
"Rawang" is the City; "Selangor" is the State; "Malaysia" is the Country
SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City = 'Rawang' AND T2.State = 'Selangor' AND T2.Country = 'Malaysia'
829
social_media
Tweets that were posted from Brazil are in what languague?
"Brazil" is the Country; language refers to Lang
SELECT DISTINCT T1.Lang FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Brazil'
830
social_media
State the country where the most positive sentiment tweets were posted.
country with the most positive sentiment tweet refers to Country where Max(Count(Sentiment > 0))
SELECT T.Country FROM ( SELECT T2.Country, SUM(T1.Sentiment) AS num FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.Sentiment > 0 GROUP BY T2.Country ) T ORDER BY T.num DESC LIMIT 1
831
social_media
Calculate the total likes collected by tweets in `ru` posted by male users.
'ru' refers to Lang = 'ru'; male user refers to Gender = 'Male'
SELECT SUM(T1.Likes) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Lang = 'ru' AND T2.Gender = 'Male'
832
social_media
Calculate the average number of male users who posted tweets in a week.
male user refers to Gender = 'Male'; average tweet in a week per user refers to Divide ( Divide(Count(TweetID), Count (UserID)), Divide(31, 7))
SELECT COUNT(DISTINCT T1.TweetID) / COUNT(DISTINCT T1.UserID) / 7 AS avg FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Day BETWEEN 1 AND 31
833
social_media
How many tweets have a klout of over 50?
klout of over 50 refers to Klout > 50
SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Klout > 50
834
social_media
Please list the texts of all the tweets that are not in English.
not in English refers to Lang <> en'
SELECT text FROM twitter WHERE Lang != 'en'
835
social_media
Please give the user ID of the user who has posted the most tweets.
users with the most tweet refers to UserID where Max(Count (TweetID))
SELECT UserID FROM twitter GROUP BY UserID ORDER BY COUNT(DISTINCT TweetID) DESC LIMIT 1
836
social_media
Among all the tweets posted on Mondays, how many of them are reshared?
"Monday" is the Weekday; reshare refers to IsReshare = 'TRUE'
SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Weekday = 'Monday' AND IsReshare = 'TRUE'
837
social_media
Please list the texts of the top 3 tweets with the most number of unique users seeing the tweet.
the most number of unique users seeing refers to Max(Reach)
SELECT text FROM twitter ORDER BY Reach DESC LIMIT 3
838
social_media
How many reshared tweets have over 100 likes?
over 100 likes refers to Likes > 100; reshare tweet refers to IsReshare = 'TRUE'
SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE IsReshare = 'TRUE' AND Likes > 100
839
social_media
What is the total number of tweets sent by male users on Mondays?
male user refers to Gender = 'Male; 'Monday' is the Weekday; total number of tweet refers to Count (TweetID)
SELECT COUNT(DISTINCT T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Weekday = 'Monday'
840
social_media
What is the gender of the user who has posted the tweet that got the most likes?
tweet got the most likes refers to Max(Likes)
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Likes DESC LIMIT 1
841
social_media
Please list the texts of all the tweets in French posted by male users.
"French" is the language and refers to Lang = 'fr'; male user refers to Gender = 'Male'
SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Lang = 'fr'
842
social_media
How many tweets in French were posted from Australia?
"French" is the language and refers to Lang = 'fr'; 'Australia' is the Country
SELECT COUNT(DISTINCT T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.Lang = 'fr' AND T2.Country = 'Australia'
843
social_media
Among all the tweets with a positive sentiment, how many of them were posted by male users in Australia?
tweet with positive sentiment refers to Sentiment > 0; male user refers to Gender = 'Male'; 'Australia' is the Country
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
844
social_media
How many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users?
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))
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'
845
social_media
From which city was the tweet with the most number of retweets posted?
tweet with most number of retweet post refers to Max(RetweetCount)
SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID ORDER BY T1.RetweetCount DESC LIMIT 1
846
social_media
From which city were more tweets posted, Bangkok or Chiang Mai?
"Bangkok" and "Chiang Mai" are both City
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')
847
social_media
Among the tweets posted from Santa Fe state in Argentina, how many of them were posted on 31st?
"Sante Fe" is the State; "Argentina" is the Country; posted on 31st refers to Day = 31
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'
848
social_media
Please list the top 3 cities with the most number of tweets posted in Canada.
"Canada" is the Country; city with most number of tweets refers to City where Max(Count(TweetID))
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
849
social_media
Please list all the cities from where tweets with neutral sentiments were posted.
neutral sentiment refers to Sentiment = 0
SELECT DISTINCT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE Sentiment = 0
850
social_media
Among all the tweets sent by male users in Argentina, what is the text of the one with the most number of likes?
male user refers to Gender = 'Male'; 'Argentina' is the Country; most number of likes refers to Max(Likes)
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
851
social_media
What is the average number of likes for a tweet posted by a male user on Mondays?
male user refers to Gender = 'Male'; 'Monday' is the Weekday; average number of likes = Divide (Sum(Likes), Count(TweetID))
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'
852
social_media
Tweets posted from which city has a higher number of average likes, Bangkok or Chiang Mai?
"Bangkok" and "Chiang Mai" are both City; average number of like = Divide (Sum(Likes), Count(TweetID))
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')
853
cs_semester
Which course is more difficult, Intro to BlockChain or Computer Network?
diff refers to difficulty; diff is higher means the course is more difficult;
SELECT name FROM course WHERE name = 'Intro to BlockChain' OR name = 'Computer Network' ORDER BY diff DESC LIMIT 1
854
cs_semester
Please list the names of the courses that are less important than Machine Learning Theory.
lower credit means less important;
SELECT name FROM course WHERE credit < ( SELECT credit FROM course WHERE name = 'Machine Learning Theory' )
855
cs_semester
How many professors are more popular than Zhou Zhihua?
higher popularity means the professor is more popular;
SELECT COUNT(prof_id) FROM prof WHERE popularity > ( SELECT popularity FROM prof WHERE first_name = 'Zhihua' AND last_name = 'Zhou' )
856
cs_semester
What is the phone number of Kerry Pryor?
SELECT phone_number FROM student WHERE l_name = 'Pryor' AND f_name = 'Kerry'
857
cs_semester
Which professor advised Faina Mallinar to become a research assistant? Please give his or her full name.
research assistant refers to the student who serves for research where the abbreviation is RA; full name refers to f_name and l_name;
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'
858
cs_semester
How many research assistants does Sauveur Skyme have?
research assistant refers to the student who serves for research where the abbreviation is RA;
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'
859
cs_semester
Please list the full names of all the students who are research assistants with the highest research capability.
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;
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
860
cs_semester
How many research assistants of Ogdon Zywicki have an average salary?
research assistant refers to the student who serves for research where the abbreviation is RA; average salary refers to salary = 'med';
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'
861
cs_semester
Please list the full names of all the students who took the course Machine Learning Theory.
full name refers to f_name and l_name;
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'
862
cs_semester
Among the students who got a B in the course Machine Learning Theory, how many of them have a gpa of over 3?
B refers to grade; GPA is an abbreviated name of Grade Point Average where over 3 refers to gpa > 3;
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' ) )
863
cs_semester
Please list the names of the courses taken by Laughton Antonio.
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'
864
cs_semester
Which student failed the course Intro to Database 2? Please give his or her full name.
If grade is NULL, it means that this student fails to pass the course; full name refers to f_name and l_name;
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'
865
cs_semester
Which student is more satisfied with the course Machine Learning Theory, Willie Rechert or Laughton Antonio?
sat refers to student's satisfaction degree with the course; more satisfied refers to MAX(sat);
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
866
cs_semester
Among the professors who have more than 3 research assistants, how many of them are male?
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;
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 )
867
cs_semester
Among the students who took the course Machine Learning Theory, how many of them are undergraduates?
UG is an abbreviated name of undergraduate student in which type = 'UG';
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'
868
cs_semester
Which professor advised Willie Rechert to work as a research assistant? Please give his or her full name.
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;
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'
869
cs_semester
What is the average gpa of Ogdon Zywicki's research assistants?
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);
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'
870
cs_semester
What is the average satisfying degree of the course Machine Learning Theory?
sat refers to student's satisfaction degree with the course;
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'
871
cs_semester
Give the number of research postgraduate students.
RPG is an abbreviated name of research postgraduate student in which type = 'RPG';
SELECT COUNT(student_id) FROM student WHERE type = 'RPG'
872
cs_semester
Which student has the highest gpa? Give the full name.
GPA is an abbreviated name of Grade Point Average where highest GPA = MAX(gpa); full name refers to f_name and l_name;
SELECT f_name, l_name FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student )
873
cs_semester
For the 3-credit course with the easiest difficulty, how many students get an "A" in that course?
diff refers to difficulty; diff is higher means the course is more difficult in which easiest difficulty refers to diff = 1; 3-credit course refers to credit = '3'; get an "A" refers to grade = 'A' for the course;
SELECT COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.credit = '3' AND T2.diff = 1
874
cs_semester
How many students took the hardest course?
diff refers to difficulty; diff is higher means the course is more difficult in which hardest difficulty is expressed as diff = 5;
SELECT COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.diff = 5
875
cs_semester
Which professor is Oliy Spratling working with? Give the full name.
research assistant refers to the student who serves for research where the abbreviation is RA; full name refers to f_name and l_name;
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 = 'Oliy' AND T3.l_name = 'Spratling'
876
cs_semester
For the professor who is working with Harrietta Lydford, how is his popularity?
research assistant refers to the student who serves for research where the abbreviation is RA; higher popularity means more popular; prof_id refers to professor’s ID;
SELECT T1.popularity 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 = 'Harrietta' AND T3.l_name = 'Lydford'
877
cs_semester
How many research assistants does the female professor with the lowest teaching ability have?
research assistant refers to the student who serves for research where the abbreviation is RA; professor with the lowest teaching ability refers to prof_id where teachability = '1';
SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability = '1' AND T2.gender = 'Female'
878
cs_semester
For the professors who advise more than 2 students, which professor has a higher teaching ability? Give the full name.
professor advising more than 2 students refers to COUNT(student_id) > 2; higher teachability refers to MAX(teachingability); full name refers to f_name and l_name;
SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, T2.teachingability FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id GROUP BY T1.prof_id HAVING COUNT(student_id) > 2 ) T ORDER BY T.teachingability DESC LIMIT 1
879
cs_semester
Give the grade score for Rik Unsworth in "Computer Network".
Academic grades awarded for participation in a course are A, B, C, D and F where Grade 'A' means excellent, Grade 'B' means good, Grade 'C' means fair, Grade 'D' means poorly pass, if grade is null or empty, it means that this student fails to pass this course in which grade = NULL;
SELECT CASE grade WHEN 'A' THEN 4 WHEN 'B' THEN 3 WHEN 'C' THEN 2 ELSE 1 END AS result FROM registration WHERE student_id IN ( SELECT student_id FROM student WHERE f_name = 'Rik' AND l_name = 'Unsworth' AND course_id IN ( SELECT course_id FROM course WHERE name = 'Computer Network' ) )
880
cs_semester
How many courses does Alvera McQuillin take?
SELECT COUNT(T1.course_id) FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.f_name = 'Alvera' AND T2.l_name = 'McQuillin'
881
cs_semester
State the name of research postgraduate student among Professor Zhihua Zhou's research assistants.
research postgraduate student refers to type = 'RPG'; research assistant refers to the student who serves for research where the abbreviation is RA;
SELECT T3.f_name, T3.l_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 T1.first_name = 'Zhihua' AND T3.type = 'RPG' AND T1.last_name = 'Zhou'
882
cs_semester
Provide the number of students enrolled in the "Statistical Learning" course.
SELECT COUNT(T2.student_id) FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T1.name = 'Statistical learning'
883
cs_semester
Who were the students who failed the course "Applied Deep Learning"? Give the full name.
If grade is null or empty, it means that this student fails to pass the course in which grade = NULL;
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 = 'Applied Deep Learning ' AND T2.grade IS NULL
884
cs_semester
Give the phone number of the only student who obtained "A" in the course "Intro to BlockChain".
A refers to an excellent grade in which grade = 'A' for the course;
SELECT T1.phone_number 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 = 'Intro to BlockChain' AND T2.grade = 'A'
885
cs_semester
What is the percentage of Professor Ogdon Zywicki's research assistants are taught postgraduate students?
research assistant refers to the student who serves for research where the abbreviation is RA; taught postgraduate student refers to type = 'TPG'; DIVIDE(COUNT(student_id where type = 'TPG' and first_name = 'Ogdon', last_name = 'Zywicki'), COUNT(first_name = 'Ogdon', last_name = 'Zywicki')) as percentage;
SELECT CAST(SUM(CASE WHEN T3.type = 'TPG' THEN 1 ELSE 0 END) AS REAL) * 100 / 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'
886
cs_semester
What is the percentage of students who get a "B" in the course "Computer Network"?
DIVIDE(COUNT(student_id(grade = 'B' and name = 'Computer Network')), COUNT(student_id where name = ' Computer Network')) as percentage;
SELECT CAST(SUM(CASE WHEN T1.grade = 'B' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.name = 'Computer Network'
887
cs_semester
How many courses have the highest difficulty?
diff refers to difficulty; diff is higher means the course is more difficult in which highest difficulty is expessed as diff = 5;
SELECT COUNT(course_id) FROM course WHERE diff = 5
888
cs_semester
What is the full name of the professor who graduated from an Ivy League School?
Ivy League school is assembled by 8 universities: Brown University, Columbia University, Cornell University, Dartmouth College, Harvard University, Princeton University, University of Pennsylvania and Yale University;
SELECT first_name, last_name FROM prof WHERE graduate_from IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' )
889
cs_semester
Among the most important courses, what is the name of the most difficult course?
Higher credit means more important in which most important refers to MAX(credit); diff refers to difficulty; the most difficult course refers to MAX(diff);
SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course )
890
cs_semester
How many students have the highest intelligence among those taking a bachelor's degree?
bachelor's degree is an undergraduate degree in which type = 'UG'; the highest intelligence refers to MAX(intelligence);
SELECT COUNT(student_id) FROM student WHERE type = 'UG' AND intelligence = ( SELECT MAX(intelligence) FROM student )
891
cs_semester
Among the most popular professors, how many are females?
the most popular professors refers to prof_id where MAX(popularity); female refers to gender;
SELECT COUNT(prof_id) FROM prof WHERE gender = 'Female' AND popularity = ( SELECT MAX(popularity) FROM prof )
892
cs_semester
How many research postgraduate students are there?
research postgraduate student refers to type = 'RPG';
SELECT COUNT(student_id) FROM student WHERE type = 'RPG'
893
cs_semester
How many students got an A in Applied Deep Learning?
A refers to an excellent grade in which grade = 'A' for the course;
SELECT COUNT(T2.student_id) FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T2.grade = 'A' AND T1.name = 'Applied Deep Learning '
894
cs_semester
What are the GPAs of the unpaid Research Assistants?
Unpaid Research Assistants undertake their work without payment in which salary = 'free';
SELECT T2.gpa FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'free'
895
cs_semester
Among the easiest courses, what is the name of the course where most students got an A?
diff refers to difficulty; the easiest courses refers to diff = 1; A refers to an excellent grade in which grade = 'A' for the course;
SELECT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.diff = 1 GROUP BY T2.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1
896
cs_semester
How many courses does the student with the highest GPA this semester take?
student with the highest GPA refers to student_id where MAX(gpa);
SELECT COUNT(course_id) FROM registration WHERE student_id IN ( SELECT student_id FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student ) )
897
cs_semester
How many students does Ogdon Zywicki advise?
Ogdon Zywicki is a professor;
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 = 'Ogdon' AND T2.last_name = 'Zywicki'
898
cs_semester
What is the name of the course with the highest satisfaction from students?
sat refers to student's satisfaction degree with the course where sat = 5 stands for the highest satisfaction;
SELECT DISTINCT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.sat = 5
899