Chinastark/bird_dataset huggingface dataset:
Database: movie
Question: Among the movies with drama genre, what is the percentage of the actors with net worth greater than $400,000,000.00?
Evidence: drama genre refers to Genre = 'Drama'; net worth greater than $400,000,000.00 refers to NetWorth > '$400,000,000.00'; percentage = divide(count(ActorID where NetWorth > '$400,000,000.00'), COUNT(ActorID))*100%
SQL: SELECT SUM(CASE WHEN CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) > 400000000 THEN 1 ELSE 0 END) - SUM(CASE WHEN CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) < 400000000 THEN 1 ELSE 0 END) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Genre = 'Drama'
Database: movie
Question: List the character's name of actress born in Sherman Oaks and starred in the movie Bruce Almighty with height greater than the 50% of average height of all actors listed.
Evidence: actress refers to Gender = 'Female'; born in Sherman Oaks refers to Birth City = 'Sherman Oaks'; movie Bruce Almighty refers to Title = 'Bruce Almighty'; height greater than the 50% of average height refers to Height (Inches) > multiply(avg(Height (Inches)), 0.5)
SQL: SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.Gender = 'Female' AND T1.Title = 'Godzilla' AND T3.`Birth City` = 'Sherman Oaks' AND T3.`Height (Inches)` * 100 > ( SELECT AVG(`Height (Inches)`) FROM actor ) * 50
Database: social_media
Question: How many tweets are in English?
Evidence: english is the language and refers to Lang = 'en'
SQL: SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Lang = 'en'
Database: social_media
Question: Please list the texts of all the tweets that are reshared.
Evidence: reshared refers to Isreshare = 'TRUE'
SQL: SELECT text FROM twitter WHERE IsReshare = 'TRUE'
Database: social_media
Question: How many tweets are seen by more than 1000 unique users?
Evidence: seen by more than 1000 unique users refers to Reach > 1000
SQL: SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Reach > 1000
Database: social_media
Question: Among all the tweets that have a positive sentiment, how many of them are posted on Thursday?
Evidence: positive sentiment refers to Sentiment > 0; posted on Thursday refers to Weekday = 'Thursday'
SQL: SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Sentiment > 0 AND Weekday = 'Thursday'
Database: social_media
Question: What is the text of the tweet that got the most `likes`?
Evidence: got the most like refers to Max(Likes)
SQL: SELECT text FROM twitter WHERE Likes = ( SELECT MAX( Likes) FROM twitter )
Database: social_media
Question: Please list all the cities in Argentina.
Evidence: "Argentina" is the Country
SQL: SELECT City FROM location WHERE City IS NOT NULL AND Country = 'Argentina'
Database: social_media
Question: How many tweets in total were posted by a user in Argentina?
Evidence: "Argentina" is the Country
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country = 'Argentina' LIMIT 1
Database: social_media
Question: Users in which city of Argentina post the most tweets?
Evidence: "Argentina" is the Country; post the most tweets refers to Max(Count(TweetID))
SQL: SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country = 'Argentina' GROUP BY T2.City ORDER BY COUNT(T1.TweetID) DESC LIMIT 1
Database: social_media
Question: Among all the tweets that are reshared, how many of them are posted by a user in Buenos Aires?
Evidence: reshared refers to Isreshare = 'TRUE'; 'Buenos Aires' is the City
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.City = 'Buenos Aires' AND T1.IsReshare = 'TRUE'
Database: social_media
Question: Please list the texts of all the tweets posted from Buenos Aires with a positive sentiment.
Evidence: "Buenos Aires" is the City; positive sentiment refers to Sentiment > 0
SQL: SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Sentiment > 0 AND T2.City = 'Buenos Aires'
Database: social_media
Question: From which country is the tweet with the most likes posted?
Evidence: tweet with the most likes refers to Max(Likes)
SQL: SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID ORDER BY T1.Likes DESC LIMIT 1
Database: social_media
Question: Users in which country has posted more numbers of positive tweets, Argentina or Australia?
Evidence: "Argentina" and "Australia" are both Country; positive tweets refers to Sentiment > 0; Country posted more number of tweets refers to Country where Max(Count(TweetID))
SQL: SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country IN ('Argentina', 'Australia') AND T1.Sentiment > 0 GROUP BY T2.Country ORDER BY COUNT(T1.TweetID) DESC LIMIT 1
Database: social_media
Question: Among all the tweets posted from Buenos Aires, how many of them were posted on Thursdays?
Evidence: "Buenos Aires" is the City; posted on Thursday refers to Weekday = 'Thursday'
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.City = 'Buenos Aires' AND T1.Weekday = 'Thursday'
Database: social_media
Question: Among all the users that have posted a tweet with over 1000 likes, how many of them are male?
Evidence: over 1000 likes refers to Likes > 1000; 'Male' is the Gender of user
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Likes > 10 AND T2.Gender = 'Male'
Database: social_media
Question: How many tweets have the male users posted in total?
Evidence: male users refers to Gender = 'Male'; total tweets refers to Count(TweetID)
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
Question: What is the gender of the user who has posted the tweet that is seen by the most number of unique users?
Evidence: seen by the most number of unique users refers to Max(Reach)
SQL: SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Reach DESC LIMIT 1
Database: social_media
Question: How many tweets are posted by male users in Argentina?
Evidence: "Argentina" is the Country; male user refers to Gender = 'Male'
SQL: 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'
Database: social_media
Question: Please list the texts of all the tweets posted by male users from Buenos Aires.
Evidence: "Buenos Aires" is the City; male user refers to Gender = 'Male'
SQL: 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'
Database: social_media
Question: What is the average number of tweets posted by the users in a city in Argentina?
Evidence: "Argentina" is the Country; average number of tweets in a city = Divide (Count(TweetID where Country = 'Argentina'), Count (City))
SQL: 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'
Database: social_media
Question: Among all the tweets with a positive sentiment, what is the percentage of those posted by a male user?
Evidence: positive sentiment refers to Sentiment > 0; male user refers to Gender = 'Male'; percentage = Divide (Count(TweetID where Gender = 'Male'), Count (TweetID)) * 100
SQL: 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
Database: social_media
Question: Give the number of users who do not show their genders.
Evidence: do not show their gender refers to Gender = 'Unknown'
SQL: SELECT COUNT(UserID) AS user_number FROM user WHERE Gender = 'Unknown'
Database: social_media
Question: State the number of states in the United Kingdom.
Evidence: "United Kingdom" is the Country
SQL: SELECT COUNT(State) AS State_number FROM location WHERE Country = 'United Kingdom'
Database: social_media
Question: What is the code of Gwynedd State?
Evidence: code refers to StateCode
SQL: SELECT DISTINCT StateCode FROM location WHERE State = 'Gwynedd'
Database: social_media
Question: Give the location id of West Sussex State.
SQL: SELECT DISTINCT LocationID FROM location WHERE State = 'West Sussex'
Database: social_media
Question: How many reshared tweets are there in Texas?
Evidence: reshared tweet refers to IsReshare = 'TRUE'; 'Texas' is the State
SQL: 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'
Database: social_media
Question: For the tweet which got a reach number of 547851, which country did it come from?
Evidence: reach number of 547851 refers to Reach = 547851
SQL: SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Reach = 547851
Database: social_media
Question: State the number of positive tweets from Ha Noi.
Evidence: positive tweet refers to Sentiment > 0; 'Ha Noi' is the State
SQL: 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'
Database: social_media
Question: Show the text of the tweet with the highest klout from Connecticut.
Evidence: highest klout refers to Max(Klout); 'Connecticut' is the State
SQL: 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
Database: social_media
Question: How many female Twitter users are there from Wisconsin?
Evidence: female users refers to Gender = 'Female'; 'Wisconsin' is the State
SQL: 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'
Database: social_media
Question: What is the gender of the user who tweeted `tw-715909161071091712`?
Evidence: "tw-715909161071091712" 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-715909161071091712'
Database: social_media
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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'
Database: social_media
Question: Among all the tweets with a positive sentiment, how many of them were posted by male users in Australia?
Evidence: tweet with positive sentiment refers to Sentiment > 0; male user refers to Gender = 'Male'; 'Australia' is the Country
SQL: 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
Database: social_media
Question: How many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users?
Evidence: positive sentiment tweet refers to Sentiment > 0; neutral sentiment refers to Sentiment = 0; male user refers to Gender = 'Male'; difference = Subtract (Count (TweetID where Sentiment > 0), Count (TweetID where Sentiment = 0))
SQL: 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'
Database: social_media
Question: From which city was the tweet with the most number of retweets posted?
Evidence: tweet with most number of retweet post refers to Max(RetweetCount)
SQL: SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID ORDER BY T1.RetweetCount DESC LIMIT 1