1sf/bird-sql-train-with-schema huggingface dataset:
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: 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`.
Evidence: "One of our favorite stories is @FINRA_News's move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a" is the text
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the gender of the user whose tweet got 535 retweets?
Evidence: tweet got 535 retweets refers to RetweetCount = 535
SQL: SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount = 535
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Give the gender of the user who made the highest klout tweet on Wednesdays.
Evidence: highest klout refers to Max(Klout); 'Wednesday' is the Weekday
SQL: 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
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: For the tweet which got the most likes, state the gender of the user who tweeted it.
Evidence: most likes refers to Max(Likes)
SQL: SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Likes DESC LIMIT 1
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: State the number of tweets from Michigan on Thursdays.
Evidence: "Michigan" is the State; 'Thursday' is the Weekday; number of tweets refers to Count(TweetID)
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Which state was the tweet `tw-685681052912873473` from? Give the state code.
Evidence: tw-685681052912873473' is the TweetID
SQL: SELECT T2.StateCode FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.TweetID = 'tw-685681052912873473'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the percentage of male Twitter users from Florida?
Evidence: "Florida" is the State; male user refers to Gender = 'Male'; percentage = Divide (Count(UserID where Gender = 'Male'), Count (UserID)) * 100
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the percentage of the tweets from California are positive?
Evidence: "California" is the State; positive tweet refers to Sentiment > 0; percentage = Divide (Count(TweetID where Sentiment > 0), Count (TweetID)) * 100
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the day of the week that tweet with ID tw-682712873332805633 was posted?
Evidence: "tw-682712873332805633" is the TweetID; day of the week refers to Weekday
SQL: SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many unique users have seen tweet with text `Happy New Year to all those AWS instances of ours!`?
Evidence: "Happy New Year to all those AWS instances of ours!" is the text; seen unique users refers to Reach
SQL: SELECT Reach FROM twitter WHERE text = 'Happy New Year to all those AWS instances of ours!'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Count the total number of tweet IDs in `en`.
Evidence: "en" is the language and refers to Lang = 'en'
SQL: SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Is 3751 the location ID for tweet with ID tw-682714048199311366?
Evidence: "tw-682714048199311366" is the TweetID
SQL: SELECT LocationID FROM twitter WHERE TweetID = 'tw-682714048199311366'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many tweets have been posted on Wednesday?
Evidence: "Wednesday" is the Weekday
SQL: SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: List down all of the texts posted on Twitter on Thursday.
Evidence: "Thursday" is the Weekday
SQL: SELECT text FROM twitter WHERE Weekday = 'Thursday'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the gender of the user who posted a tweet with ID tw-682714583044243456?
Evidence: "tw-682714583044243456" is the TweetID
SQL: SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.TweetID = 'tw-682714583044243456'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: List down the text of tweets posted by unknown gender users.
Evidence: unknown gender user refers to Gender = 'Unknown'
SQL: SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Unknown'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Calculate the total number of male tweet IDs.
Evidence: "Male" is the Gender
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What gender of users posted the most tweets in `en`?
Evidence: "en" is the language and refers to Lang = 'en'; most tweet in 'en' refers to Max(Count(text where Lang = 'en'))
SQL: 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
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What gender of users retweet more than 30 times?
Evidence: retweet more than 30 times refers to RetweetCount > 30
SQL: SELECT DISTINCT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount > 30
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many female users reshared their tweets?
Evidence: female users refers to Gender = 'Female'; reshare refers to IsReshare = 'TRUE'
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Which country's tweets collected the most likes?
Evidence: country collected the most likes refers to Country where Max(Sum(Likes))
SQL: 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
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Tweet with ID tw-682723090279841798 was posted from which country?
Evidence: "tw-682723090279841798" is the TweetID
SQL: SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TweetID = 'tw-682723090279841798'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: List down all the tweet text posted from Australia.
Evidence: "Australia" is the Country
SQL: SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Australia'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Write down the tweet text posted from Rawang, Selangor, Malaysia.
Evidence: "Rawang" is the City; "Selangor" is the State; "Malaysia" is the Country
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Tweets that were posted from Brazil are in what languague?
Evidence: "Brazil" is the Country; language refers to Lang
SQL: SELECT DISTINCT T1.Lang FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Brazil'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: State the country where the most positive sentiment tweets were posted.
Evidence: country with the most positive sentiment tweet refers to Country where Max(Count(Sentiment > 0))
SQL: 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
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Calculate the total likes collected by tweets in `ru` posted by male users.
Evidence: 'ru' refers to Lang = 'ru'; male user refers to Gender = 'Male'
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Calculate the average number of male users who posted tweets in a week.
Evidence: male user refers to Gender = 'Male'; average tweet in a week per user refers to Divide ( Divide(Count(TweetID), Count (UserID)), Divide(31, 7))
SQL: 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
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many tweets have a klout of over 50?
Evidence: klout of over 50 refers to Klout > 50
SQL: SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Klout > 50
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Please list the texts of all the tweets that are not in English.
Evidence: not in English refers to Lang <> en'
SQL: SELECT text FROM twitter WHERE Lang != 'en'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Please give the user ID of the user who has posted the most tweets.
Evidence: users with the most tweet refers to UserID where Max(Count (TweetID))
SQL: SELECT UserID FROM twitter GROUP BY UserID ORDER BY COUNT(DISTINCT TweetID) DESC LIMIT 1
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Among all the tweets posted on Mondays, how many of them are reshared?
Evidence: "Monday" is the Weekday; reshare refers to IsReshare = 'TRUE'
SQL: SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Weekday = 'Monday' AND IsReshare = 'TRUE'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Please list the texts of the top 3 tweets with the most number of unique users seeing the tweet.
Evidence: the most number of unique users seeing refers to Max(Reach)
SQL: SELECT text FROM twitter ORDER BY Reach DESC LIMIT 3
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many reshared tweets have over 100 likes?
Evidence: over 100 likes refers to Likes > 100; reshare tweet refers to IsReshare = 'TRUE'
SQL: SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE IsReshare = 'TRUE' AND Likes > 100
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the total number of tweets sent by male users on Mondays?
Evidence: male user refers to Gender = 'Male; 'Monday' is the Weekday; total number of tweet refers to Count (TweetID)
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: What is the gender of the user who has posted the tweet that got the most likes?
Evidence: tweet got the most likes refers to Max(Likes)
SQL: SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Likes DESC LIMIT 1
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: Please list the texts of all the tweets in French posted by male users.
Evidence: "French" is the language and refers to Lang = 'fr'; male user refers to Gender = 'Male'
SQL: 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'
Database: social_media
Tables: location, user, twitter
Columns (table index, column name): -1, *, 0, LocationID, 0, Country, 0, State, 0, StateCode, 0, City, 1, UserID, 1, Gender, 2, TweetID, 2, Weekday, 2, Hour, 2, Day, 2, Lang, 2, IsReshare, 2, Reach, 2, RetweetCount, 2, Likes, 2, Klout, 2, Sentiment, 2, text, 2, LocationID, 2, UserID
Question: How many tweets in French were posted from Australia?
Evidence: "French" is the language and refers to Lang = 'fr'; 'Australia' is the Country
SQL: 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'