db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
social_media
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'
Question: how many reshared tweets are there in texas? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitte...
how many reshared tweets are there in texas?
social_media
select t2.country from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t1.reach = 547851
Question: for the tweet which got a reach number of 547851, which country did it come from? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins:...
for the tweet which got a reach number of 547851, which country did it come from?
social_media
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'
Question: state the number of positive tweets from ha noi. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, tw...
state the number of positive tweets from ha noi.
social_media
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
Question: show the text of the tweet with the highest klout from connecticut. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserI...
show the text of the tweet with the highest klout from connecticut.
social_media
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'
Question: how many female twitter users are there from wisconsin? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.Use...
how many female twitter users are there from wisconsin?
social_media
select t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t1.tweetid = 'tw-715909161071091712'
Question: what is the gender of the user who tweeted `tw-715909161071091712`? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserI...
what is the gender of the user who tweeted `tw-715909161071091712`?
social_media
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'
Question: 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`. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> Tw...
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`.
social_media
select t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t1.retweetcount = 535
Question: what is the gender of the user whose tweet got 535 retweets? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = use...
what is the gender of the user whose tweet got 535 retweets?
social_media
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
Question: give the gender of the user who made the highest klout tweet on wednesdays. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitt...
give the gender of the user who made the highest klout tweet on wednesdays.
social_media
select t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid order by t1.likes desc limit 1
Question: for the tweet which got the most likes, state the gender of the user who tweeted it. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joi...
for the tweet which got the most likes, state the gender of the user who tweeted it.
social_media
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'
Question: state the number of tweets from michigan on thursdays. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.User...
state the number of tweets from michigan on thursdays.
social_media
select t2.statecode from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t1.tweetid = 'tw-685681052912873473'
Question: which state was the tweet `tw-685681052912873473` from? give the state code. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twit...
which state was the tweet `tw-685681052912873473` from? give the state code.
social_media
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'
Question: what is the percentage of male twitter users from florida? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user....
what is the percentage of male twitter users from florida?
social_media
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'
Question: what is the percentage of the tweets from california are positive? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID...
what is the percentage of the tweets from california are positive?
social_media
select weekday from twitter where tweetid = 'tw-682712873332805633'
Question: what is the day of the week that tweet with id tw-682712873332805633 was posted? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: ...
what is the day of the week that tweet with id tw-682712873332805633 was posted?
social_media
select reach from twitter where text = 'happy new year to all those aws instances of ours!'
Question: how many unique users have seen tweet with text `happy new year to all those aws instances of ours!`? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, Location...
how many unique users have seen tweet with text `happy new year to all those aws instances of ours!`?
social_media
select count(distinct tweetid) from twitter where lang = 'en'
Question: count the total number of tweet ids in `en`. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitte...
count the total number of tweet ids in `en`.
social_media
select locationid from twitter where tweetid = 'tw-682714048199311366'
Question: is 3751 the location id for tweet with id tw-682714048199311366? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID =...
is 3751 the location id for tweet with id tw-682714048199311366?
social_media
select count(tweetid) from twitter where weekday = 'wednesday'
Question: how many tweets have been posted on wednesday? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twit...
how many tweets have been posted on wednesday?
social_media
select text from twitter where weekday = 'thursday'
Question: list down all of the texts posted on twitter on thursday. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.U...
list down all of the texts posted on twitter on thursday.
social_media
select t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t1.tweetid = 'tw-682714583044243456'
Question: what is the gender of the user who posted a tweet with id tw-682714583044243456? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: ...
what is the gender of the user who posted a tweet with id tw-682714583044243456?
social_media
select t1.text from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t2.gender = 'unknown'
Question: list down the text of tweets posted by unknown gender users. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = use...
list down the text of tweets posted by unknown gender users.
social_media
select count(t1.tweetid) from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t2.gender = 'male'
Question: calculate the total number of male tweet ids. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitt...
calculate the total number of male tweet ids.
social_media
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
Question: what gender of users posted the most tweets in `en`? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID...
what gender of users posted the most tweets in `en`?
social_media
select distinct t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t1.retweetcount > 30
Question: what gender of users retweet more than 30 times? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, tw...
what gender of users retweet more than 30 times?
social_media
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'
Question: how many female users reshared their tweets? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitte...
how many female users reshared their tweets?
social_media
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
Question: which country's tweets collected the most likes? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, tw...
which country's tweets collected the most likes?
social_media
select t2.country from twitter as t1 inner join location as t2 on t1.locationid = t2.locationid where t1.tweetid = 'tw-682723090279841798'
Question: tweet with id tw-682723090279841798 was posted from which country? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID...
tweet with id tw-682723090279841798 was posted from which country?
social_media
select t1.text from twitter as t1 inner join location as t2 on t1.locationid = t2.locationid where t2.country = 'australia'
Question: list down all the tweet text posted from australia. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID,...
list down all the tweet text posted from australia.
social_media
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'
Question: write down the tweet text posted from rawang, selangor, malaysia. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID ...
write down the tweet text posted from rawang, selangor, malaysia.
social_media
select distinct t1.lang from twitter as t1 inner join location as t2 on t1.locationid = t2.locationid where t2.country = 'brazil'
Question: tweets that were posted from brazil are in what languague? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user....
tweets that were posted from brazil are in what languague?
social_media
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
Question: state the country where the most positive sentiment tweets were posted. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.U...
state the country where the most positive sentiment tweets were posted.
social_media
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'
Question: calculate the total likes collected by tweets in `ru` posted by male users. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitt...
calculate the total likes collected by tweets in `ru` posted by male users.
social_media
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
Question: calculate the average number of male users who posted tweets in a week. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.U...
calculate the average number of male users who posted tweets in a week.
social_media
select count(distinct tweetid) from twitter where klout > 50
Question: how many tweets have a klout of over 50? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitter.Lo...
how many tweets have a klout of over 50?
social_media
select text from twitter where lang != 'en'
Question: please list the texts of all the tweets that are not in english. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID =...
please list the texts of all the tweets that are not in english.
social_media
select userid from twitter group by userid order by count(distinct tweetid) desc limit 1
Question: please give the user id of the user who has posted the most tweets. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserI...
please give the user id of the user who has posted the most tweets.
social_media
select count(distinct tweetid) from twitter where weekday = 'monday' and isreshare = 'true'
Question: among all the tweets posted on mondays, how many of them are reshared? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.Us...
among all the tweets posted on mondays, how many of them are reshared?
social_media
select text from twitter order by reach desc limit 3
Question: please list the texts of the top 3 tweets with the most number of unique users seeing the tweet. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, U...
please list the texts of the top 3 tweets with the most number of unique users seeing the tweet.
social_media
select count(distinct tweetid) from twitter where isreshare = 'true' and likes > 100
Question: how many reshared tweets have over 100 likes? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitt...
how many reshared tweets have over 100 likes?
social_media
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'
Question: what is the total number of tweets sent by male users on mondays? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID ...
what is the total number of tweets sent by male users on mondays?
social_media
select t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid order by t1.likes desc limit 1
Question: what is the gender of the user who has posted the tweet that got the most likes? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: ...
what is the gender of the user who has posted the tweet that got the most likes?
social_media
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'
Question: please list the texts of all the tweets in french posted by male users. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.U...
please list the texts of all the tweets in french posted by male users.
social_media
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'
Question: how many tweets in french were posted from australia? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserI...
how many tweets in french were posted from australia?
social_media
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
Question: among all the tweets with a positive sentiment, how many of them were posted by male users in australia? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, Locat...
among all the tweets with a positive sentiment, how many of them were posted by male users in australia?
social_media
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'
Question: how many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, t...
how many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users?
social_media
select t2.city from twitter as t1 inner join location as t2 on t1.locationid = t2.locationid order by t1.retweetcount desc limit 1
Question: from which city was the tweet with the most number of retweets posted? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.Us...
from which city was the tweet with the most number of retweets posted?
social_media
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')
Question: from which city were more tweets posted, bangkok or chiang mai? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = ...
from which city were more tweets posted, bangkok or chiang mai?
social_media
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'
Question: among the tweets posted from santa fe state in argentina, how many of them were posted on 31st? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, Us...
among the tweets posted from santa fe state in argentina, how many of them were posted on 31st?
social_media
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
Question: please list the top 3 cities with the most number of tweets posted in canada. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twi...
please list the top 3 cities with the most number of tweets posted in canada.
social_media
select distinct t2.city from twitter as t1 inner join location as t2 on t1.locationid = t2.locationid where sentiment = 0
Question: please list all the cities from where tweets with neutral sentiments were posted. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins:...
please list all the cities from where tweets with neutral sentiments were posted.
social_media
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
Question: among all the tweets sent by male users in argentina, what is the text of the one with the most number of likes? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, tex...
among all the tweets sent by male users in argentina, what is the text of the one with the most number of likes?
social_media
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'
Question: what is the average number of likes for a tweet posted by a male user on mondays? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins:...
what is the average number of likes for a tweet posted by a male user on mondays?
social_media
select sum(case when t2.city = 'bangkok' then likes else null end) / count(case when t2.city = 'bangkok' then 1 else 0 end) as bnum , sum(case when city = 'chiang mai' then likes else null end) / count(case when city = 'chiang mai' then tweetid else null end) as cnum from twitter as t1 inner join location as t2 on t1.l...
Question: tweets posted from which city has a higher number of average likes, bangkok or chiang mai? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID....
tweets posted from which city has a higher number of average likes, bangkok or chiang mai?
cs_semester
select name from course where name = 'intro to blockchain' or name = 'computer network' order by diff desc limit 1
Question: which course is more difficult, intro to blockchain or computer network? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, g...
which course is more difficult, intro to blockchain or computer network?
cs_semester
select name from course where credit < ( select credit from course where name = 'machine learning theory' )
Question: please list the names of the courses that are less important than machine learning theory. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course...
please list the names of the courses that are less important than machine learning theory.
cs_semester
select count(prof_id) from prof where popularity > ( select popularity from prof where first_name = 'zhihua' and last_name = 'zhou' )
Question: how many professors are more popular than zhou zhihua? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student...
how many professors are more popular than zhou zhihua?
cs_semester
select phone_number from student where l_name = 'pryor' and f_name = 'kerry'
Question: what is the phone number of kerry pryor? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> student_id...
what is the phone number of kerry pryor?
cs_semester
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'
Question: which professor advised faina mallinar to become a research assistant? please give his or her full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registra...
which professor advised faina mallinar to become a research assistant? please give his or her full name.
cs_semester
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'
Question: how many research assistants does sauveur skyme have? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student ...
how many research assistants does sauveur skyme have?
cs_semester
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
Question: please list the full names of all the students who are research assistants with the highest research capability. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. ...
please list the full names of all the students who are research assistants with the highest research capability.
cs_semester
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'
Question: how many research assistants of ogdon zywicki have an average salary? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grad...
how many research assistants of ogdon zywicki have an average salary?
cs_semester
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'
Question: please list the full names of all the students who took the course machine learning theory. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> cours...
please list the full names of all the students who took the course machine learning theory.
cs_semester
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' ) )
Question: among the students who got a b in the course machine learning theory, how many of them have a gpa of over 3? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. regi...
among the students who got a b in the course machine learning theory, how many of them have a gpa of over 3?
cs_semester
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'
Question: please list the names of the courses taken by laughton antonio. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat...
please list the names of the courses taken by laughton antonio.
cs_semester
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'
Question: which student failed the course intro to database 2? please give his or her full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id,...
which student failed the course intro to database 2? please give his or her full name.
cs_semester
select t1.f_name, t1.l_name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where (t1.f_name = 'laughton' or t1.f_name = 'willie') and (t1.l_name = 'antonio' or t1.l_name = 'rechert') and t3.name = 'machine learning theory' order b...
Question: which student is more satisfied with the course machine learning theory, willie rechert or laughton antonio? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. regi...
which student is more satisfied with the course machine learning theory, willie rechert or laughton antonio?
cs_semester
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 )
Question: among the professors who have more than 3 research assistants, how many of them are male? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_...
among the professors who have more than 3 research assistants, how many of them are male?
cs_semester
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'
Question: among the students who took the course machine learning theory, how many of them are undergraduates? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration...
among the students who took the course machine learning theory, how many of them are undergraduates?
cs_semester
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'
Question: which professor advised willie rechert to work as a research assistant? please give his or her full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registr...
which professor advised willie rechert to work as a research assistant? please give his or her full name.
cs_semester
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'
Question: what is the average gpa of ogdon zywicki's research assistants? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat...
what is the average gpa of ogdon zywicki's research assistants?
cs_semester
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'
Question: what is the average satisfying degree of the course machine learning theory? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_i...
what is the average satisfying degree of the course machine learning theory?
cs_semester
select count(student_id) from student where type = 'rpg'
Question: give the number of research postgraduate students. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> ...
give the number of research postgraduate students.
cs_semester
select f_name, l_name from student where gpa = ( select max(gpa) from student )
Question: which student has the highest gpa? give the full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student...
which student has the highest gpa? give the full name.
cs_semester
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
Question: for the 3-credit course with the easiest difficulty, how many students get an 'a' in that course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration ->...
for the 3-credit course with the easiest difficulty, how many students get an 'a' in that course?
cs_semester
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
Question: how many students took the hardest course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> student_...
how many students took the hardest course?
cs_semester
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'
Question: which professor is oliy spratling working with? give the full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade,...
which professor is oliy spratling working with? give the full name.
cs_semester
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'
Question: for the professor who is working with harrietta lydford, how is his popularity? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, studen...
for the professor who is working with harrietta lydford, how is his popularity?
cs_semester
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'
Question: how many research assistants does the female professor with the lowest teaching ability have? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> cou...
how many research assistants does the female professor with the lowest teaching ability have?
cs_semester
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
Question: for the professors who advise more than 2 students, which professor has a higher teaching ability? give the full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, sa...
for the professors who advise more than 2 students, which professor has a higher teaching ability? give the full name.
cs_semester
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' ) )
Question: give the grade score for rik unsworth in 'computer network'. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. s...
give the grade score for rik unsworth in 'computer network'.
cs_semester
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'
Question: how many courses does alvera mcquillin take? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> studen...
how many courses does alvera mcquillin take?
cs_semester
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'
Question: state the name of research postgraduate student among professor zhihua zhou's research assistants. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -...
state the name of research postgraduate student among professor zhihua zhou's research assistants.
cs_semester
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'
Question: provide the number of students enrolled in the 'statistical learning' course. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_...
provide the number of students enrolled in the 'statistical learning' course.
cs_semester
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
Question: who were the students who failed the course 'applied deep learning'? give the full name. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_i...
who were the students who failed the course 'applied deep learning'? give the full name.
cs_semester
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'
Question: give the phone number of the only student who obtained 'a' in the course 'intro to blockchain'. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> c...
give the phone number of the only student who obtained 'a' in the course 'intro to blockchain'.
cs_semester
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'
Question: what is the percentage of professor ogdon zywicki's research assistants are taught postgraduate students? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registr...
what is the percentage of professor ogdon zywicki's research assistants are taught postgraduate students?
cs_semester
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'
Question: what is the percentage of students who get a 'b' in the course 'computer network'? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, stu...
what is the percentage of students who get a 'b' in the course 'computer network'?
cs_semester
select count(course_id) from course where diff = 5
Question: how many courses have the highest difficulty? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> stude...
how many courses have the highest difficulty?
cs_semester
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' )
Question: what is the full name of the professor who graduated from an ivy league school? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, studen...
what is the full name of the professor who graduated from an ivy league school?
cs_semester
select name from course where credit = ( select max(credit) from course ) and diff = ( select max(diff) from course )
Question: among the most important courses, what is the name of the most difficult course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, stude...
among the most important courses, what is the name of the most difficult course?
cs_semester
select count(student_id) from student where type = 'ug' and intelligence = ( select max(intelligence) from student )
Question: how many students have the highest intelligence among those taking a bachelor's degree? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id...
how many students have the highest intelligence among those taking a bachelor's degree?
cs_semester
select count(prof_id) from prof where gender = 'female' and popularity = ( select max(popularity) from prof )
Question: among the most popular professors, how many are females? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. stude...
among the most popular professors, how many are females?
cs_semester
select count(student_id) from student where type = 'rpg'
Question: how many research postgraduate students are there? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> ...
how many research postgraduate students are there?
cs_semester
select count(t2.student_id) from course as t1 inner join registration as t2 on t1.course_id = t2.course_id where t2.grade = 'a' and t1.name = 'applied deep learning '
Question: how many students got an a in applied deep learning? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -...
how many students got an a in applied deep learning?
cs_semester
select t2.gpa from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t1.salary = 'free'
Question: what are the gpas of the unpaid research assistants? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -...
what are the gpas of the unpaid research assistants?
cs_semester
select t2.name from registration as t1 inner join course as t2 on t1.course_id = t2.course_id where t1.grade = 'a' and t2.diff = 1 group by t2.name order by count(t1.student_id) desc limit 1
Question: among the easiest courses, what is the name of the course where most students got an a? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id...
among the easiest courses, what is the name of the course where most students got an a?
cs_semester
select count(course_id) from registration where student_id in ( select student_id from student where gpa = ( select max(gpa) from student ) )
Question: how many courses does the student with the highest gpa this semester take? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id,...
how many courses does the student with the highest gpa this semester take?
cs_semester
select count(t1.student_id) from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id where t2.first_name = 'ogdon' and t2.last_name = 'zywicki'
Question: how many students does ogdon zywicki advise? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> studen...
how many students does ogdon zywicki advise?
cs_semester
select distinct t2.name from registration as t1 inner join course as t2 on t1.course_id = t2.course_id where t1.sat = 5
Question: what is the name of the course with the highest satisfaction from students? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id...
what is the name of the course with the highest satisfaction from students?