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