question
stringlengths
23
286
sql
stringlengths
29
1.45k
db_id
stringclasses
11 values
prompt
stringlengths
1.09k
6.84k
question_id
int64
0
1.53k
difficulty
stringclasses
3 values
Tell the Japanese name of the set which card "Fellwar Stone" is in it.
SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Fellwar Stone' AND T2.language = 'Japanese' AND T2.translation IS NOT NULL
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
500
moderate
Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.
SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Journey into Nyx Hero''s Path' ORDER BY T1.convertedManaCost DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
501
moderate
What is the release date for the set "Ola de frío"?
SELECT T1.releaseDate FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Ola de frío'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
502
simple
What was the expansion type for the set which card "Samite Pilgrim" in it?
SELECT type FROM sets WHERE code IN ( SELECT setCode FROM cards WHERE name = 'Samite Pilgrim' )
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
503
simple
How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'.
SELECT COUNT(id) FROM cards WHERE setCode IN ( SELECT code FROM sets WHERE name = 'World Championship Decks 2004' ) AND convertedManaCost = 3
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
504
simple
Show the Simplified Chinese translation of the name of the set "Mirrodin"?
SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
505
moderate
For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil?
SELECT CAST(SUM(CASE WHEN isNonFoilOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Japanese' )
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
506
challenging
For all the set of cards that has Brazil Portuguese translation, what is the percentage of them are only available online?
SELECT CAST(SUM(CASE WHEN isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Portuguese (Brazil)' )
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
507
challenging
What are the available printing types of the cards that doesn't have a text box created by Aleksi Briclot?
SELECT DISTINCT availability FROM cards WHERE artist = 'Aleksi Briclot' AND isTextless = 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
508
moderate
What is the unique id of the set that has the highest number of cards?
SELECT id FROM sets ORDER BY baseSetSize DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
509
simple
Among the cards that doesn't have multiple faces on the same card, who is the illustrator of the card art that has the highest cost of converted mana?
SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
510
simple
What is the most common visual frame effects among the incredibly powerful foils?
SELECT frameEffects FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL GROUP BY frameEffects ORDER BY COUNT(frameEffects) DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
511
moderate
How many cards with unknown power that can't be found in foil is in duel deck A?
SELECT SUM(CASE WHEN power LIKE '%*%' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasFoil = 0 AND duelDeck = 'a'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
512
simple
Among the sets whose expansion type is Commander, which set has the highest total number of cards including promotional and related supplemental products but excluding Alchemy modifications? Indicate the id of the set.
SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
513
challenging
In duels, what are the top 10 cards with the highest uncoverted mana cost?
SELECT DISTINCT name FROM cards WHERE uuid IN ( SELECT uuid FROM legalities WHERE format = 'duel' ) ORDER BY manaCost DESC LIMIT 0, 10
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
514
simple
When was the oldest mythic card released and what are its legal play formats?
SELECT T1.originalReleaseDate, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'mythic' AND T1.originalReleaseDate IS NOT NULL AND T2.status = 'Legal' ORDER BY T1.originalReleaseDate LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
515
moderate
How many cards did Volkan Baǵa illustrated whose foreign language is in French?
SELECT COUNT(T3.id) FROM ( SELECT T1.id FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Volkan Baǵa' AND T2.language = 'French' GROUP BY T1.id ) AS T3
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
516
moderate
How many rare enchantment Abundance cards are there whose play format status are all legal?
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.rarity = 'rare' AND T1.types = 'Enchantment' AND T1.name = 'Abundance' AND T2.status = 'Legal'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
517
moderate
Which of the play formats has the highest number of banned status? Indicate the play format and the name of the card.
SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T2.status = 'Banned' GROUP BY T2.format ORDER BY COUNT(T2.status) DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
518
moderate
What is the language of the "Battlebond" set?
SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' )
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
519
simple
Who is the illustrator that illustrated the least amount of cards? List the format of play of the cards that he/she illustrated.
SELECT T1.artist, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid GROUP BY T1.artist ORDER BY COUNT(T1.id) ASC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
520
moderate
Among the cards whose version of frame style is 1997, what is the status of the card illustrated by D. Alexander Gregory in legacy play format that has sensitive content or Wizards of the Coast?
SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.frameVersion = 1997 AND T1.hasContentWarning = 1 AND T1.artist = 'D. Alexander Gregory' AND T2.format = 'legacy'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
521
challenging
Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format.
SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
522
moderate
What is the annual average number of sets that were released between 1/1/2012 to 12/31/2015? Indicate the common langugage of the card.
SELECT (CAST(SUM(T1.id) AS REAL) / COUNT(T1.id)) / 4, T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.id = T2.id WHERE T1.releaseDate BETWEEN '2012-01-01' AND '2015-12-31' GROUP BY T1.releaseDate ORDER BY COUNT(T2.language) DESC LIMIT 1
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
523
challenging
List the artists who illustrated cards with black borders which are available only in arena.
SELECT DISTINCT artist FROM cards WHERE availability = 'arena' AND BorderColor = 'black'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
524
simple
Find the uuid of cards in which the old school format is restricted or banned.
SELECT uuid FROM legalities WHERE format = 'oldschool' AND (status = 'Banned' OR status = 'Restricted')
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
525
simple
Among the card designed by Matthew D. Wilson, how many are available only in the paper?
SELECT COUNT(id) FROM cards WHERE artist = 'Matthew D. Wilson' AND availability = 'paper'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
526
simple
What are the rulings for the card named and designed by Kev Walker? List them in descending order of dates.
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Kev Walker' ORDER BY T2.date DESC
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
527
moderate
List the names of all the cards in the set Hour of Devastation and find the formats in which these cards are legal.
SELECT DISTINCT T2.name , CASE WHEN T1.status = 'Legal' THEN T1.format ELSE NULL END FROM legalities AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid WHERE T2.setCode IN ( SELECT code FROM sets WHERE name = 'Hour of Devastation' )
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
528
challenging
Find and list the names of sets which doesn't have Japanese translation but have Korean translation.
SELECT name FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Korean' AND language NOT LIKE '%Japanese%' )
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
529
moderate
List all the frame styles and cards Allen Williams worked on and find any banned cards if there are any.
SELECT DISTINCT T1.frameVersion, T1.name , IIF(T2.status = 'Banned', T1.name, 'NO') FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Allen Williams'
card_games
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #cards (id integer, artist text, asciiName text, availability text, borderColor text, cardKingdomFoilId text, cardKingdomId text, colorIdent...
530
moderate
Which user has a higher reputation, Harlan or Jarrod Dixon?
SELECT DisplayName FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') AND Reputation = ( SELECT MAX(Reputation) FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
531
simple
Please list the display names of all the users whose accounts were created in the year 2014.
SELECT DisplayName FROM users WHERE STRFTIME('%Y', CreationDate) = '2014'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
532
simple
How many users last accessed the website after 2014/9/1?
SELECT COUNT(Id) FROM users WHERE date(LastAccessDate) > '2014-09-01'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
533
simple
What is the display name of the user who has the most number of views?
SELECT DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
534
simple
Among the users who have more than 100 upvotes, how many of them have more then 1 downvotes?
SELECT COUNT(Id) FROM users WHERE Upvotes > 100 AND Downvotes > 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
535
simple
How many users with more than 10 views created their account after the year 2013?
SELECT COUNT(id) FROM users WHERE STRFTIME('%Y', CreationDate) > '2013' AND Views > 10
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
536
simple
How many posts does the user csgillespie own?
SELECT COUNT(T1.id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
537
simple
Please list the titles of the posts owned by the user csgillespie?
SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
538
simple
Who is the owner of the post "Eliciting priors from experts"?
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
539
simple
What is the title of the post that is owned by csgillespie and has the highest popularity?
SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' ORDER BY T1.ViewCount DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
540
simple
What is the display name of the user who is the owner of the most valuable post?
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id ORDER BY T1.FavoriteCount DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
541
simple
What is the total number of comments of all the posts owned by csgillespie?
SELECT SUM(T1.CommentCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
542
simple
For the post that got the most number of answers owned by csgillespie, how many answers did it get?
SELECT MAX(T1.AnswerCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
543
simple
What is the display name of the user who last edited the post "Examples for teaching: Correlation does not mean causation"?
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Examples for teaching: Correlation does not mean causation'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
544
moderate
Among the posts owned by csgillespie, how many of them are root posts?
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' AND T1.ParentId IS NULL
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
545
simple
Please list the display names of all the users who owns a post that is well-finished.
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.ClosedDate IS NOT NULL
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
546
simple
Among the posts owned by an elder user, how many of them have a score of over 19?
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Score >= 20 AND T2.Age > 65
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
547
simple
What is the location of the owner of the post "Eliciting priors from experts"?
SELECT T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
548
simple
From which post is the tag "bayesian" excerpted from? Please give the body of the post.
SELECT T2.Body FROM tags AS T1 INNER JOIN posts AS T2 ON T2.Id = T1.ExcerptPostId WHERE T1.TagName = 'bayesian'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
549
simple
From which post is the most popular tag excerpted from? Please give the body of the post.
SELECT Body FROM posts WHERE id = ( SELECT ExcerptPostId FROM tags ORDER BY Count DESC LIMIT 1 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
550
simple
How many badges has the user csgillespie obtained?
SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
551
simple
Please list the names of the badges obtained by csgillespie.
SELECT T1.`Name` FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
552
simple
Among the badges obtained by csgillespie, how many of them were obtained in the year 2011?
SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE STRFTIME('%Y', T1.Date) = '2011' AND T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
553
simple
What is the display name of the user who has obtained the most number of badges?
SELECT T2.DisplayName FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id GROUP BY T2.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
554
simple
What is the average score of the posts owned by the user csgillespie?
SELECT AVG(T1.Score) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
555
simple
What is the average number of badges obtained by a user with over 200 views?
SELECT CAST(COUNT(T1.Id) AS REAL) / COUNT(DISTINCT T2.DisplayName) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.Views > 200
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
556
simple
Among the posts with a score of over 20, what is the percentage of them being owned by an elder user?
SELECT CAST(SUM(IIF(T2.Age > 65, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Score > 20
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
557
moderate
How many votes did the user No.58 take on 2010/7/19?
SELECT COUNT(Id) FROM votes WHERE UserId = 58 AND CreationDate = '2010-07-19'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
558
simple
Indicate the creation date of the maximum number of votes.
SELECT CreationDate FROM votes GROUP BY CreationDate ORDER BY COUNT(Id) DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
559
simple
Give the number of "Revival" badges.
SELECT COUNT(Id) FROM badges WHERE Name = 'Revival'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
560
simple
What is the title for the post which got the highest score comment?
SELECT Title FROM posts WHERE Id = ( SELECT PostId FROM comments ORDER BY Score DESC LIMIT 1 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
561
simple
For the post which got 1910 view counts, how many comments does it get?
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T1.ViewCount = 1910
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
562
simple
User No.3025 gave a comment at 20:29:39 on 2014/4/23 to a post, how many favorite counts did that post get?
SELECT T1.FavoriteCount FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T2.CreationDate = '2014-04-23 20:29:39.0' AND T2.UserId = 3025
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
563
moderate
Give the only one comment text of the post with parent id 107829.
SELECT T2.Text FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T1.ParentId = 107829 AND T1.CommentCount = 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
564
simple
User No.23853 gave a comment to a post at 9:08:18 on 2013/7/12, was that post well-finished?
SELECT IIF(T2.ClosedDate IS NULL, 'NOT well-finished', 'well-finished') AS resylt FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 23853 AND T1.CreationDate = '2013-07-12 09:08:18.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
565
moderate
For the owner user of post No. 65041, what is his/her reputation points?
SELECT T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Id = 65041
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
566
simple
For the user with the display name of "Tiago Pasqualini", how many posts did he/she own?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Tiago Pasqualini'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
567
simple
Provide the display name of the user who made the vote No.6347.
SELECT T1.DisplayName FROM users AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.UserId WHERE T2.Id = 6347
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
568
simple
Give the number of votes for the post about data visualization.
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data visualization%'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
569
simple
For the user whose display name is "DatEpicCoderGuyWhoPrograms", what is his/her badge's name?
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'DatEpicCoderGuyWhoPrograms'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
570
simple
For the user No.24, how many times is the number of his/her posts compared to his/her votes?
SELECT CAST(COUNT(T2.Id) AS REAL) / COUNT(DISTINCT T1.Id) FROM votes AS T1 INNER JOIN posts AS T2 ON T1.UserId = T2.OwnerUserId WHERE T1.UserId = 24
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
571
moderate
How many views did the post titled 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer' get?
SELECT ViewCount FROM posts WHERE Title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
572
moderate
Write the contents of comments with a score of 17.
SELECT Text FROM comments WHERE Score = 17
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
573
simple
Which user has the website URL listed at 'http://stackoverflow.com'
SELECT DisplayName FROM users WHERE WebsiteUrl = 'http://stackoverflow.com'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
574
simple
What is the badge name that user 'SilentGhost' obtained?
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'SilentGhost'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
575
simple
Name the user that commented 'thank you user93!'
SELECT T1.DisplayName FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T2.Text = 'thank you user93!'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
576
simple
Write all comments made by user 'A Lion.'
SELECT T2.Text FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'A Lion'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
577
simple
Which user made a post titled 'Understanding what Dassault iSight is doing?' and how much is the reputation of the user?
SELECT T1.DisplayName, T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Title = 'Understanding what Dassault iSight is doing?'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
578
moderate
Write all comments made on the post titled 'How does gentle boosting differ from AdaBoost?'
SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'How does gentle boosting differ from AdaBoost?'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
579
simple
Name 10 users with the badge name 'Necromancer.'
SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Necromancer' LIMIT 10
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
580
simple
Who is the editor of the post titled 'Open source tools for visualizing multi-dimensional data?'
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Open source tools for visualizing multi-dimensional data?'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
581
moderate
List the title of posts which were edited by Vebjorn Ljosa.
SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'Vebjorn Ljosa'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
582
simple
What is the total score of the posts edited by Yevgeny and include the user's website URL.
SELECT SUM(T1.Score), T2.WebsiteUrl FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'Yevgeny' GROUP BY T2.WebsiteUrl
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
583
simple
Write all the comments left by users who edited the post titled 'Why square the difference instead of taking the absolute value in standard deviation?'
SELECT T2.Comment FROM posts AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.PostId WHERE T1.Title = 'Why square the difference instead of taking the absolute value in standard deviation?'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
584
moderate
How much is the total bounty amount of the post titled about 'data'
SELECT SUM(T2.BountyAmount) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data%'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
585
simple
Which user added a bounty amount of 50 to the post title mentioning variance?
SELECT T3.DisplayName, T1.Title FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId INNER JOIN users AS T3 ON T3.Id = T2.UserId WHERE T2.BountyAmount = 50 AND T1.Title LIKE '%variance%'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
586
challenging
Calculate the average view count of posts tagged as 'humor' and write the title and the comments of the posts alongside their scores if applicable.
SELECT AVG(T2.ViewCount), T2.Title, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.Id = T1.PostId WHERE T2.Tags = '<humor>'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
587
moderate
Give the total number of comments posted by user ID 13.
SELECT COUNT(Id) FROM comments WHERE UserId = 13
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
588
simple
Which user ID has the highest reputation?
SELECT Id FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
589
simple
Which user ID has the lowest view?
SELECT Id FROM users WHERE Views = ( SELECT MIN(Views) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
590
simple
How many users are awarded with supporter badge during year 2011?
SELECT COUNT(Id) FROM badges WHERE STRFTIME('%Y', Date) = '2011' AND Name = 'Supporter'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
591
simple
How many users are awarded with more than 5 badges?
SELECT UserId FROM ( SELECT UserId, COUNT(Name) AS num FROM badges GROUP BY UserId ) T WHERE T.num > 5
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
592
simple
How many users from New York have a teacher and supporter badge?
SELECT COUNT(DISTINCT T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Name IN ('Supporter', 'Teacher') AND T2.Location = 'New York'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
593
simple
Which user created post ID 1 and what is the reputation of this user?
SELECT T2.Id, T2.Reputation FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.PostId = 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
594
simple
Which user have only one post history per post and having at least 1000 views?
SELECT T2.UserId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T3.ViewCount >= 1000 GROUP BY T2.UserId HAVING COUNT(DISTINCT T2.PostHistoryTypeId) = 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
595
moderate
Which users have posted the most comments. List out the user's badge?
SELECT Name FROM badges AS T1 INNER JOIN comments AS T2 ON T1.UserId = t2.UserId GROUP BY T2.UserId ORDER BY COUNT(T2.UserId) DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
596
simple
How many users from India have the teacher badges?
SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.Location = 'India' AND T1.Name = 'Teacher'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
597
simple
What is the percentage difference of student badges given during 2010 and 2011?
SELECT CAST(SUM(IIF(STRFTIME('%Y', Date) = '2010', 1, 0)) AS REAL) * 100 / COUNT(Id) - CAST(SUM(IIF(STRFTIME('%Y', Date) = '2011', 1, 0)) AS REAL) * 100 / COUNT(Id) FROM badges WHERE Name = 'Student'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
598
challenging
What are the post history type IDs for post ID 3720 and how many unique users have commented on the post?
SELECT T1.PostHistoryTypeId, (SELECT COUNT(DISTINCT UserId) FROM comments WHERE PostId = 3720) AS NumberOfUsers FROM postHistory AS T1 WHERE T1.PostId = 3720
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
599
simple