question
stringlengths 24
325
| sql
stringlengths 30
804
| db_id
stringclasses 63
values | prompt
stringlengths 308
18.9k
| question_id
int64 167
9.43k
| difficulty
stringclasses 1
value |
---|---|---|---|---|---|
What is the gender of the user who has posted the tweet that is seen by the most number of unique users? | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Reach DESC LIMIT 1 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the gender of the user who has posted the tweet that is seen by the most number of unique users? | 791 | |
How many tweets are posted by male users in Argentina? | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T1.UserID = T3.UserID WHERE T3.Gender = 'Male' AND T2.Country = 'Argentina' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many tweets are posted by male users in Argentina? | 792 | |
Please list the texts of all the tweets posted by male users from Buenos Aires. | SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T2 ON T2.UserID = T1.UserID INNER JOIN user AS T3 ON T1.UserID = T3.UserID WHERE T2.City = 'Buenos Aires' AND T3.Gender = 'Male' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please list the texts of all the tweets posted by male users from Buenos Aires. | 793 | |
What is the average number of tweets posted by the users in a city in Argentina? | SELECT SUM(CASE WHEN T2.City = 'Buenos Aires' THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS avg FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country = 'Argentina' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the average number of tweets posted by the users in a city in Argentina? | 794 | |
Among all the tweets with a positive sentiment, what is the percentage of those posted by a male user? | SELECT SUM(CASE WHEN T2.Gender = 'Male' THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS per FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Sentiment > 0 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Among all the tweets with a positive sentiment, what is the percentage of those posted by a male user? | 795 | |
Give the number of users who do not show their genders. | SELECT COUNT(UserID) AS user_number FROM user WHERE Gender = 'Unknown' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Give the number of users who do not show their genders. | 796 | |
State the number of states in the United Kingdom. | SELECT COUNT(State) AS State_number FROM location WHERE Country = 'United Kingdom' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
State the number of states in the United Kingdom. | 797 | |
What is the code of Gwynedd State? | SELECT DISTINCT StateCode FROM location WHERE State = 'Gwynedd' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the code of Gwynedd State? | 798 | |
Give the location id of West Sussex State. | SELECT DISTINCT LocationID FROM location WHERE State = 'West Sussex' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Give the location id of West Sussex State. | 799 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many reshared tweets are there in Texas? | 800 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
For the tweet which got a reach number of 547851, which country did it come from? | 801 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
State the number of positive tweets from Ha Noi. | 802 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Show the text of the tweet with the highest klout from Connecticut. | 803 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many female Twitter users are there from Wisconsin? | 804 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the gender of the user who tweeted `tw-715909161071091712`? | 805 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
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`. | 806 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the gender of the user whose tweet got 535 retweets? | 807 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Give the gender of the user who made the highest klout tweet on Wednesdays. | 808 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
For the tweet which got the most likes, state the gender of the user who tweeted it. | 809 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
State the number of tweets from Michigan on Thursdays. | 810 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Which state was the tweet `tw-685681052912873473` from? Give the state code. | 811 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the percentage of male Twitter users from Florida? | 812 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the percentage of the tweets from California are positive? | 813 | |
What is the day of the week that tweet with ID tw-682712873332805633 was posted? | SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the day of the week that tweet with ID tw-682712873332805633 was posted? | 814 | |
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!' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many unique users have seen tweet with text `Happy New Year to all those AWS instances of ours!`? | 815 | |
Count the total number of tweet IDs in `en`. | SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Count the total number of tweet IDs in `en`. | 816 | |
Is 3751 the location ID for tweet with ID tw-682714048199311366? | SELECT LocationID FROM twitter WHERE TweetID = 'tw-682714048199311366' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Is 3751 the location ID for tweet with ID tw-682714048199311366? | 817 | |
How many tweets have been posted on Wednesday? | SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many tweets have been posted on Wednesday? | 818 | |
List down all of the texts posted on Twitter on Thursday. | SELECT text FROM twitter WHERE Weekday = 'Thursday' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
List down all of the texts posted on Twitter on Thursday. | 819 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the gender of the user who posted a tweet with ID tw-682714583044243456? | 820 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
List down the text of tweets posted by unknown gender users. | 821 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Calculate the total number of male tweet IDs. | 822 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What gender of users posted the most tweets in `en`? | 823 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What gender of users retweet more than 30 times? | 824 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many female users reshared their tweets? | 825 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Which country's tweets collected the most likes? | 826 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Tweet with ID tw-682723090279841798 was posted from which country? | 827 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
List down all the tweet text posted from Australia. | 828 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Write down the tweet text posted from Rawang, Selangor, Malaysia. | 829 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Tweets that were posted from Brazil are in what languague? | 830 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
State the country where the most positive sentiment tweets were posted. | 831 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Calculate the total likes collected by tweets in `ru` posted by male users. | 832 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Calculate the average number of male users who posted tweets in a week. | 833 | |
How many tweets have a klout of over 50? | SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Klout > 50 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many tweets have a klout of over 50? | 834 | |
Please list the texts of all the tweets that are not in English. | SELECT text FROM twitter WHERE Lang != 'en' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please list the texts of all the tweets that are not in English. | 835 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please give the user ID of the user who has posted the most tweets. | 836 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Among all the tweets posted on Mondays, how many of them are reshared? | 837 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please list the texts of the top 3 tweets with the most number of unique users seeing the tweet. | 838 | |
How many reshared tweets have over 100 likes? | SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE IsReshare = 'TRUE' AND Likes > 100 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many reshared tweets have over 100 likes? | 839 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the total number of tweets sent by male users on Mondays? | 840 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the gender of the user who has posted the tweet that got the most likes? | 841 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please list the texts of all the tweets in French posted by male users. | 842 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many tweets in French were posted from Australia? | 843 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Among all the tweets with a positive sentiment, how many of them were posted by male users in Australia? | 844 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
How many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users? | 845 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
From which city was the tweet with the most number of retweets posted? | 846 | |
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') | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
From which city were more tweets posted, Bangkok or Chiang Mai? | 847 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Among the tweets posted from Santa Fe state in Argentina, how many of them were posted on 31st? | 848 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please list the top 3 cities with the most number of tweets posted in Canada. | 849 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Please list all the cities from where tweets with neutral sentiments were posted. | 850 | |
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 | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Among all the tweets sent by male users in Argentina, what is the text of the one with the most number of likes? | 851 | |
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' | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
What is the average number of likes for a tweet posted by a male user on Mondays? | 852 | |
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.LocationID = T2.LocationID WHERE T2.City IN ('Bangkok', 'Chiang Mai') | social_media | Database Schema:
location (LocationID integer, Country text, State text, StateCode text, City text, , PRIMARY KEY(LocationID), )
#twitter (TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text, , PRIMARY KEY(TweetID), FOREIGN KEY(LocationID) REFERENCES location(LocationID), FOREIGN KEY(UserID) REFERENCES user(UserID))
#user (UserID text, Gender text, , PRIMARY KEY(UserID), )
#
Tweets posted from which city has a higher number of average likes, Bangkok or Chiang Mai? | 853 | |
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 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which course is more difficult, Intro to BlockChain or Computer Network? | 854 | |
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' ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Please list the names of the courses that are less important than Machine Learning Theory. | 855 | |
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' ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many professors are more popular than Zhou Zhihua? | 856 | |
What is the phone number of Kerry Pryor? | SELECT phone_number FROM student WHERE l_name = 'Pryor' AND f_name = 'Kerry' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
What is the phone number of Kerry Pryor? | 857 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which professor advised Faina Mallinar to become a research assistant? Please give his or her full name. | 858 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many research assistants does Sauveur Skyme have? | 859 | |
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 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Please list the full names of all the students who are research assistants with the highest research capability. | 860 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many research assistants of Ogdon Zywicki have an average salary? | 861 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Please list the full names of all the students who took the course Machine Learning Theory. | 862 | |
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' ) ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Among the students who got a B in the course Machine Learning Theory, how many of them have a gpa of over 3? | 863 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Please list the names of the courses taken by Laughton Antonio. | 864 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which student failed the course Intro to Database 2? Please give his or her full name. | 865 | |
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 BY T2.sat DESC LIMIT 1 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which student is more satisfied with the course Machine Learning Theory, Willie Rechert or Laughton Antonio? | 866 | |
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 ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Among the professors who have more than 3 research assistants, how many of them are male? | 867 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Among the students who took the course Machine Learning Theory, how many of them are undergraduates? | 868 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which professor advised Willie Rechert to work as a research assistant? Please give his or her full name. | 869 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
What is the average gpa of Ogdon Zywicki's research assistants? | 870 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
What is the average satisfying degree of the course Machine Learning Theory? | 871 | |
Give the number of research postgraduate students. | SELECT COUNT(student_id) FROM student WHERE type = 'RPG' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Give the number of research postgraduate students. | 872 | |
Which student has the highest gpa? Give the full name. | SELECT f_name, l_name FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which student has the highest gpa? Give the full name. | 873 | |
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 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
For the 3-credit course with the easiest difficulty, how many students get an "A" in that course? | 874 | |
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 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many students took the hardest course? | 875 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Which professor is Oliy Spratling working with? Give the full name. | 876 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
For the professor who is working with Harrietta Lydford, how is his popularity? | 877 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many research assistants does the female professor with the lowest teaching ability have? | 878 | |
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 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
For the professors who advise more than 2 students, which professor has a higher teaching ability? Give the full name. | 879 | |
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' ) ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Give the grade score for Rik Unsworth in "Computer Network". | 880 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many courses does Alvera McQuillin take? | 881 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
State the name of research postgraduate student among Professor Zhihua Zhou's research assistants. | 882 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Provide the number of students enrolled in the "Statistical Learning" course. | 883 | |
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 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Who were the students who failed the course "Applied Deep Learning"? Give the full name. | 884 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Give the phone number of the only student who obtained "A" in the course "Intro to BlockChain". | 885 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
What is the percentage of Professor Ogdon Zywicki's research assistants are taught postgraduate students? | 886 | |
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' | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
What is the percentage of students who get a "B" in the course "Computer Network"? | 887 | |
How many courses have the highest difficulty? | SELECT COUNT(course_id) FROM course WHERE diff = 5 | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
How many courses have the highest difficulty? | 888 | |
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' ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
What is the full name of the professor who graduated from an Ivy League School? | 889 | |
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 ) | cs_semester | Database Schema:
RA (student_id integer, capability integer, prof_id integer, salary text, , PRIMARY KEY(student_id), PRIMARY KEY(prof_id), FOREIGN KEY(student_id) REFERENCES student(student_id), FOREIGN KEY(prof_id) REFERENCES prof(prof_id))
#course (course_id integer, name text, credit integer, diff integer, , PRIMARY KEY(course_id), )
#prof (prof_id integer, gender text, first_name text, last_name text, email text, popularity integer, teachingability integer, graduate_from text, , PRIMARY KEY(prof_id), )
#registration (course_id integer, student_id integer, grade text, sat integer, , PRIMARY KEY(course_id), PRIMARY KEY(student_id), FOREIGN KEY(course_id) REFERENCES course(course_id), FOREIGN KEY(student_id) REFERENCES student(student_id))
#student (student_id integer, f_name text, l_name text, phone_number text, email text, intelligence integer, gpa real, type text, , PRIMARY KEY(student_id), )
#
Among the most important courses, what is the name of the most difficult course? | 890 |