question_id int64 0 1.53k | db_id stringclasses 11
values | question stringlengths 23 286 | gold_sql stringlengths 29 1.45k | gold_columns stringlengths 11 227 | n_gold_columns int64 1 11 | n_schema_columns int64 11 199 | label_source stringclasses 7
values |
|---|---|---|---|---|---|---|---|
500 | card_games | 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 | cards.name; cards.setCode; set_translations.language; set_translations.setCode; set_translations.translation | 5 | 115 | unchanged |
501 | card_games | 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 | cards.convertedManaCost; cards.name; cards.setCode; sets.code; sets.name | 5 | 115 | unchanged |
502 | card_games | 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' | set_translations.setCode; set_translations.translation; sets.code; sets.releaseDate | 4 | 115 | unchanged |
503 | card_games | 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' ) | cards.name; cards.setCode; sets.code; sets.type | 4 | 115 | unchanged |
504 | card_games | 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 | cards.convertedManaCost; cards.id; cards.setCode; sets.code; sets.name | 5 | 115 | unchanged |
505 | card_games | 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' | set_translations.language; set_translations.setCode; set_translations.translation; sets.code; sets.name | 5 | 115 | joinkey_added |
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? | 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' ) | set_translations.language; set_translations.setCode; sets.code; sets.id; sets.isNonFoilOnly | 5 | 115 | unchanged |
507 | card_games | 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)' ) | set_translations.language; set_translations.setCode; sets.code; sets.id; sets.isOnlineOnly | 5 | 115 | unchanged |
508 | card_games | 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 | cards.artist; cards.availability; cards.isTextless | 3 | 115 | unchanged |
509 | card_games | 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 | sets.baseSetSize; sets.id | 2 | 115 | unchanged |
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? | SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1 | cards.artist; cards.convertedManaCost; cards.side | 3 | 115 | unchanged |
511 | card_games | 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 | cards.cardKingdomFoilId; cards.cardKingdomId; cards.frameEffects | 3 | 115 | unchanged |
512 | card_games | How many cards with unknown power that can't be found in foil is in duel deck A? | SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasFoil = 0 AND duelDeck = 'a' | cards.duelDeck; cards.hasFoil; cards.power | 3 | 115 | unchanged |
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. | SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC LIMIT 1 | sets.id; sets.totalSetSize; sets.type | 3 | 115 | unchanged |
514 | card_games | 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 | cards.manaCost; cards.name; cards.uuid; legalities.format; legalities.uuid | 5 | 115 | unchanged |
515 | card_games | 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 | cards.originalReleaseDate; cards.rarity; cards.uuid; legalities.format; legalities.status; legalities.uuid | 6 | 115 | unchanged |
516 | card_games | 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 | cards.artist; cards.id; cards.uuid; foreign_data.language; foreign_data.uuid | 5 | 115 | ambiguity_resolved |
517 | card_games | 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' | cards.id; cards.name; cards.rarity; cards.types; cards.uuid; legalities.status; legalities.uuid | 7 | 115 | unchanged |
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. | 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' | cards.name; cards.uuid; legalities.format; legalities.status; legalities.uuid | 5 | 115 | joinkey_added,ambiguity_resolved |
519 | card_games | What is the language of the "Battlebond" set? | SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' ) | set_translations.id; set_translations.language; sets.id; sets.name | 4 | 115 | joinkey_added |
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. | 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 | cards.artist; cards.id; cards.uuid; legalities.format; legalities.uuid | 5 | 115 | unchanged |
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? | 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' | cards.artist; cards.frameVersion; cards.hasContentWarning; cards.uuid; legalities.format; legalities.status; legalities.uuid | 7 | 115 | unchanged |
522 | card_games | 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 | cards.edhrecRank; cards.name; cards.uuid; legalities.format; legalities.status; legalities.uuid | 6 | 115 | unchanged |
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. | 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 | set_translations.id; set_translations.language; sets.id; sets.releaseDate | 4 | 115 | joinkey_added |
524 | card_games | 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' | cards.artist; cards.availability; cards.borderColor | 3 | 115 | joinkey_added |
525 | card_games | 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') | legalities.format; legalities.status; legalities.uuid | 3 | 115 | unchanged |
526 | card_games | 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' | cards.artist; cards.availability; cards.id | 3 | 115 | unchanged |
527 | card_games | 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 | cards.artist; cards.uuid; rulings.date; rulings.text; rulings.uuid | 5 | 115 | unchanged |
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. | 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' ) | cards.name; cards.setCode; cards.uuid; legalities.format; legalities.status; legalities.uuid; sets.code; sets.name | 8 | 115 | unchanged |
529 | card_games | 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%' ) | set_translations.language; set_translations.setCode; sets.code; sets.name | 4 | 115 | unchanged |
530 | card_games | 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' | cards.artist; cards.frameVersion; cards.name; cards.uuid; legalities.status; legalities.uuid | 6 | 115 | unchanged |
531 | codebase_community | 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') ) | users.DisplayName; users.Reputation | 2 | 71 | unchanged |
532 | codebase_community | Please list the display names of all the users whose accounts were created in the year 2011. | SELECT DisplayName FROM users WHERE STRFTIME('%Y', CreationDate) = '2011' | users.CreationDate; users.DisplayName | 2 | 71 | unchanged |
533 | codebase_community | How many users last accessed the website after 2014/9/1? | SELECT COUNT(Id) FROM users WHERE date(LastAccessDate) > '2014-09-01' | users.Id; users.LastAccessDate | 2 | 71 | unchanged |
534 | codebase_community | 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 ) | users.DisplayName; users.Views | 2 | 71 | unchanged |
535 | codebase_community | 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 | users.DownVotes; users.Id; users.UpVotes | 3 | 71 | joinkey_added |
536 | codebase_community | 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 | users.CreationDate; users.Id; users.Views | 3 | 71 | joinkey_added |
537 | codebase_community | 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' | posts.Id; posts.OwnerUserId; users.DisplayName; users.Id | 4 | 71 | joinkey_added |
538 | codebase_community | 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' | posts.OwnerUserId; posts.Title; users.DisplayName; users.Id | 4 | 71 | unchanged |
539 | codebase_community | 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' | posts.OwnerUserId; posts.Title; users.DisplayName; users.Id | 4 | 71 | unchanged |
540 | codebase_community | 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 | posts.OwnerUserId; posts.Title; posts.ViewCount; users.DisplayName; users.Id | 5 | 71 | unchanged |
541 | codebase_community | 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 | posts.FavoriteCount; posts.OwnerUserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
542 | codebase_community | 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' | posts.CommentCount; posts.OwnerUserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
543 | codebase_community | 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' | posts.AnswerCount; posts.OwnerUserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
544 | codebase_community | 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' | posts.LastEditorUserId; posts.Title; users.DisplayName; users.Id | 4 | 71 | unchanged |
545 | codebase_community | 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 | posts.Id; posts.OwnerUserId; posts.ParentId; users.DisplayName; users.Id | 5 | 71 | unchanged |
546 | codebase_community | 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 | posts.ClosedDate; posts.OwnerUserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
547 | codebase_community | 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 | posts.Id; posts.OwnerUserId; posts.Score; users.Age; users.Id | 5 | 71 | unchanged |
548 | codebase_community | 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' | posts.OwnerUserId; posts.Title; users.Id; users.Location | 4 | 71 | unchanged |
549 | codebase_community | 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' | posts.Body; posts.Id; tags.ExcerptPostId; tags.TagName | 4 | 71 | unchanged |
550 | codebase_community | 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 ) | posts.Body; posts.Id; tags.Count; tags.ExcerptPostId | 4 | 71 | joinkey_added |
551 | codebase_community | 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' | badges.Id; badges.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
552 | codebase_community | 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' | badges.Name; badges.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
553 | codebase_community | 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' | badges.Date; badges.Id; badges.UserId; users.DisplayName; users.Id | 5 | 71 | unchanged |
554 | codebase_community | 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 | badges.Id; badges.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
555 | codebase_community | 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' | posts.OwnerUserId; posts.Score; users.DisplayName; users.Id | 4 | 71 | unchanged |
556 | codebase_community | 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 | badges.Id; badges.UserId; users.DisplayName; users.Id; users.Views | 5 | 71 | unchanged |
557 | codebase_community | Among the posts with a score of over 5, 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 > 5 | posts.Id; posts.OwnerUserId; posts.Score; users.Age; users.Id | 5 | 71 | unchanged |
558 | codebase_community | 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' | votes.CreationDate; votes.Id; votes.UserId | 3 | 71 | unchanged |
559 | codebase_community | Indicate the creation date of the maximum number of votes. | SELECT CreationDate FROM votes GROUP BY CreationDate ORDER BY COUNT(Id) DESC LIMIT 1 | votes.CreationDate; votes.Id | 2 | 71 | unchanged |
560 | codebase_community | Give the number of "Revival" badges. | SELECT COUNT(Id) FROM badges WHERE Name = 'Revival' | badges.Id; badges.Name | 2 | 71 | unchanged |
561 | codebase_community | 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 ) | comments.PostId; comments.Score; posts.Id; posts.Title | 4 | 71 | unchanged |
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 | comments.PostId; posts.Id; posts.ViewCount | 3 | 71 | unchanged |
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? | 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 | comments.CreationDate; comments.PostId; comments.UserId; posts.FavoriteCount; posts.Id | 5 | 71 | unchanged |
564 | codebase_community | 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 | comments.PostId; comments.Text; posts.CommentCount; posts.Id; posts.ParentId | 5 | 71 | unchanged |
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? | 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' | comments.CreationDate; comments.PostId; comments.UserId; posts.ClosedDate; posts.Id | 5 | 71 | joinkey_added |
566 | codebase_community | 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 | posts.Id; posts.OwnerUserId; users.Id; users.Reputation | 4 | 71 | unchanged |
567 | codebase_community | 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' | posts.OwnerUserId; users.DisplayName; users.Id | 3 | 71 | unchanged |
568 | codebase_community | 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 | users.DisplayName; users.Id; votes.Id; votes.UserId | 4 | 71 | unchanged |
569 | codebase_community | 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%' | posts.Id; posts.Title; votes.PostId | 3 | 71 | unchanged |
570 | codebase_community | 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' | badges.Name; badges.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
571 | codebase_community | 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 | posts.Id; posts.OwnerUserId; votes.Id; votes.UserId | 4 | 71 | unchanged |
572 | codebase_community | 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' | posts.Title; posts.ViewCount | 2 | 71 | unchanged |
573 | codebase_community | Write the contents of comments with a score of 17. | SELECT Text FROM comments WHERE Score = 17 | comments.Score; comments.Text | 2 | 71 | unchanged |
574 | codebase_community | Which user has the website URL listed at 'http://stackoverflow.com' | SELECT DisplayName FROM users WHERE WebsiteUrl = 'http://stackoverflow.com' | users.DisplayName; users.WebsiteUrl | 2 | 71 | unchanged |
575 | codebase_community | 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' | badges.Name; badges.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
576 | codebase_community | 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!' | comments.Text; comments.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
577 | codebase_community | 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' | comments.Text; comments.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
578 | codebase_community | 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?' | posts.OwnerUserId; posts.Title; users.DisplayName; users.Id; users.Reputation | 5 | 71 | joinkey_added |
579 | codebase_community | 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?' | comments.PostId; comments.Text; posts.Id; posts.Title | 4 | 71 | unchanged |
580 | codebase_community | 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 | badges.Name; badges.UserId; users.DisplayName; users.Id | 4 | 71 | unchanged |
581 | codebase_community | 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?' | posts.OwnerUserId; posts.Title; users.DisplayName; users.Id | 4 | 71 | unchanged |
582 | codebase_community | 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' | posts.OwnerUserId; posts.Title; users.DisplayName; users.Id | 4 | 71 | unchanged |
583 | codebase_community | 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.LastEditorUserId = T2.Id WHERE T2.DisplayName = 'Yevgeny' GROUP BY T2.WebsiteUrl | posts.LastEditorUserId; posts.Score; users.DisplayName; users.Id; users.WebsiteUrl | 5 | 71 | joinkey_added |
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?' | 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?' | postHistory.Comment; postHistory.PostId; posts.Id; posts.Title | 4 | 71 | unchanged |
585 | codebase_community | 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%' | posts.Id; posts.Title; votes.BountyAmount; votes.PostId | 4 | 71 | unchanged |
586 | codebase_community | 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%' | posts.Id; posts.Title; users.DisplayName; users.Id; votes.BountyAmount; votes.PostId; votes.UserId | 7 | 71 | unchanged |
587 | codebase_community | Calculate the average view count of each post tagged as 'humor' and list the title and the comment of each post. | 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 | comments.PostId; comments.Text; posts.Id; posts.Tags; posts.Title; posts.ViewCount | 6 | 71 | joinkey_added |
588 | codebase_community | Give the total number of comments posted by user ID 13. | SELECT COUNT(Id) FROM comments WHERE UserId = 13 | comments.Id; comments.UserId | 2 | 71 | unchanged |
589 | codebase_community | Which user ID has the highest reputation? | SELECT Id FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users ) | users.Id; users.Reputation | 2 | 71 | unchanged |
590 | codebase_community | Which user ID has the lowest view? | SELECT Id FROM users WHERE Views = ( SELECT MIN(Views) FROM users ) | users.Id; users.Views | 2 | 71 | unchanged |
591 | codebase_community | How many users are awarded with supporter badge during year 2011? | SELECT COUNT(Id) FROM badges WHERE STRFTIME('%Y', Date) = '2011' AND Name = 'Supporter' | badges.Date; badges.Id; badges.Name | 3 | 71 | unchanged |
592 | codebase_community | How many users are awarded with more than 5 badges? | SELECT COUNT(UserId) FROM ( SELECT UserId, COUNT(Name) AS num FROM badges GROUP BY UserId ) T WHERE T.num > 5 | badges.Name; badges.UserId | 2 | 71 | ambiguity_resolved |
593 | codebase_community | 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' | badges.Id; badges.Name; badges.UserId; users.Id; users.Location | 5 | 71 | unchanged |
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 | comments.PostId; comments.UserId; users.Id; users.Reputation | 4 | 71 | unchanged |
595 | codebase_community | 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 | postHistory.PostHistoryTypeId; postHistory.PostId; postHistory.UserId; posts.Id; posts.ViewCount; users.Id | 6 | 71 | unchanged |
596 | codebase_community | 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 | badges.Name; badges.UserId; comments.UserId | 3 | 71 | unchanged |
597 | codebase_community | 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' | badges.Id; badges.Name; badges.UserId; users.Id; users.Location | 5 | 71 | unchanged |
598 | codebase_community | 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' | badges.Date; badges.Id; badges.Name | 3 | 71 | unchanged |
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 | comments.PostId; comments.UserId; postHistory.PostHistoryTypeId; postHistory.PostId | 4 | 71 | unchanged |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.