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