id
int64 0
1.53k
| query
stringlengths 23
215
| sql
stringlengths 29
1.45k
| difficulty
stringclasses 3
values |
---|---|---|---|
1,174 | What is the average age of patients as of year 1999 examined in the laboratory for the October of the year 1991? | SELECT AVG('1999' - STRFTIME('%Y', T2.Birthday)) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.Date BETWEEN '1991-10-01' AND '1991-10-30' | moderate |
504 | 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 | simple |
286 | Among all chemical compounds identified in the database, what percent of compounds form a triple-bond. | SELECT CAST(COUNT(CASE WHEN T.bond_type = '#' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T | simple |
982 | How many American drivers have puncture status. | SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN results AS T2 on T1.driverId = T2.driverId INNER JOIN status AS T3 on T2.statusId = T3.statusId WHERE T3.status = 'Puncture' AND T1.nationality = 'American' | simple |
1,350 | What is the status of the event which bought "Post Cards, Posters" on 2019/8/20? | SELECT T1.event_status FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget WHERE T2.expense_description = 'Post Cards, Posters' AND T2.expense_date = '2019-08-20' | moderate |
966 | How many driver participated in race ID number 18? | SELECT COUNT(driverId) FROM driverStandings WHERE raceId = 18 | simple |
1,447 | List the name and location of events that underspend its budget. | SELECT DISTINCT T1.event_name, T1.location FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.remaining > 0 | simple |
685 | Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time. | SELECT T2.ViewCount, T3.DisplayName FROM postHistory AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id INNER JOIN users AS T3 ON T2.LastEditorUserId = T3.Id WHERE T1.Text = 'Computer Game Datasets' | moderate |
391 | Among the Artifact cards, which are black color and comes with foreign languague translation? | SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Artifact' AND T1.colors = 'B' | moderate |
1,329 | What county did Sherri Ramsey grew up? | SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sherri' AND T1.last_name = 'Ramsey' | simple |
296 | Indicate the molecule id is belonging to the TR000_1_2 bond that has the first atom named TR000_1. | SELECT T2.molecule_id, T2.bond_id, T1.atom_id FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE T1.atom_id = 'TR000_1' AND T2.bond_id = 'TR000_1_2' | simple |
160 | Among the weekly issuance accounts, how many have a loan of under 200000? | SELECT COUNT(T1.account_id) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T2.frequency = 'POPLATEK TYDNE' AND T1.amount < 200000 | simple |
530 | 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' | moderate |
703 | Among the tags with tag ID below 15, how many of them have 20 count of posts and below? | SELECT COUNT(id) FROM tags WHERE Count <= 20 AND Id < 15 | simple |
1,520 | For the customer who paid 124.05 in 2012/8/24, how much did he/she spend during the January of 2012? And what is the date and expenses exactly? | SELECT T1.CustomerID, T2.Date, T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Price = 124.05 AND T2.Date = '201201' | moderate |
1,444 | List the expenses that spend more than fifty dollars on average. | SELECT expense_description FROM expense GROUP BY expense_description HAVING AVG(cost) > 50 | simple |
610 | What are the name of badge that users who have the highest reputation obtained? | SELECT T2.name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId ORDER BY T1.Reputation DESC LIMIT 1 | simple |
1,022 | What is the preferred foot when attacking of the player with the lowest potential? | SELECT preferred_foot FROM Player_Attributes WHERE potential IS NOT NULL ORDER BY potential ASC LIMIT 1 | simple |
546 | 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 | simple |
1,389 | Which event has the lowest cost? | SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget ORDER BY T3.cost LIMIT 1 | simple |
1,309 | Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD. | SELECT T2.PLT FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'MCTD' AND T2.PLT BETWEEN 100 AND 400 | moderate |
156 | Who is the owner of the account with the largest loan amount? | SELECT T1.client_id FROM disp AS T1 INNER JOIN account AS T3 ON T1.account_id = T3.account_id INNER JOIN loan AS T2 ON T3.account_id = T2.account_id WHERE T1.type = 'OWNER' ORDER BY T2.amount DESC LIMIT 1 | simple |
451 | How many cards available in paper have a positive starting maximum hand size? | SELECT SUM(CASE WHEN availability = 'paper' AND hAND = '3' THEN 1 ELSE 0 END) FROM cards | simple |
1,054 | What is the defensive work rate of the football player David Wilson
? | SELECT DISTINCT t2.defensive_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'David Wilson' | simple |
1,486 | Is it true that more SMEs pay in Czech koruna than in euros? If so, how many more? | SELECT SUM(Currency = 'CZK') - SUM(Currency = 'EUR') FROM customers WHERE Segment = 'SME' | simple |
722 | What is the colour of Apocalypse's skin? | SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id WHERE T1.superhero_name = 'Apocalypse' | simple |
518 | 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' | moderate |
199 | In the molecule containing sodium atoms, how many are non-carcinogenic? | SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'na' AND T2.label = '-' | simple |
1,280 | How many male patients have their glutamic oxaloacetic transaminase in the normal range? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND T1.SEX = 'M' | simple |
670 | What is the date when the youngest user made his or her first post? | SELECT T2.CreaionDate FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Age IS NOT NULL ORDER BY T1.Age, T2.CreaionDate LIMIT 1 | simple |
153 | How many 'classic' cards are eligible for loan? | SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'classic' AND T2.type = 'OWNER' | simple |
826 | Identify the heaviest superhero in DC Comics. | SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics' ORDER BY T1.weight_kg DESC LIMIT 1 | simple |
1,086 | What's the heading accuracy of Ariel Borysiuk? | SELECT t2.heading_accuracy FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Ariel Borysiuk' | simple |
213 | What type of bond is there between the atoms TR004_8 and TR004_20? | SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR004_8' AND T2.atom_id2 = 'TR004_20' OR T2.atom_id2 = 'TR004_8' AND T2.atom_id = 'TR004_20' | moderate |
969 | How many British drivers who were born in 1980? | SELECT COUNT(driverId) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) = '1980' | simple |
317 | Calculate the percentage of carcinogenic molecules which contain the Chlorine element. | SELECT COUNT(CASE WHEN T2.label = '+' AND T1.element = 'cl' THEN T2.molecule_id ELSE NULL END) * 100 / COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id | moderate |
338 | What is the atom ID of double bonded carbon in TR012 molecule? | SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T2.molecule_id = 'TR012' AND T3.bond_type = '=' AND T1.element = 'c' | moderate |
1,397 | On average, how much did the Student_Club spend on food for the typical event in the past? | SELECT SUM(spent) / COUNT(spent) FROM budget WHERE category = 'Food' AND event_status = 'Closed' | simple |
449 | What is the language of the card that has azorius watermark? List out the type of this card. | SELECT DISTINCT T2.language, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'azorius' | simple |
131 | Which district has highest active loan? | SELECT T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.status IN ('C', 'D') GROUP BY T2.A3 ORDER BY SUM(T3.amount) DESC LIMIT 1 | moderate |
222 | What is the difference between the number of molecules that are carcinogenic and those that are not? | SELECT COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) - COUNT(CASE WHEN T.label = '-' THEN T.molecule_id ELSE NULL END) AS diff_car_notcar FROM molecule t | moderate |
917 | Which website should I go to if I want to know more about Anthony Davidson? | SELECT url FROM drivers WHERE forename = 'Anthony' AND surname = 'Davidson' | simple |
274 | List the toxicology elements associated with molecule TR001. | SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR001' | simple |
1,459 | What is the major of Garrett Gerke and which department does it belong to? | SELECT T2.major_name, T2.department FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.first_name = 'Garrett' AND T1.last_name = 'Gerke' | simple |
1,442 | What is the percentage of the events that went over budget? | SELECT CAST(SUM(CASE WHEN remaining < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(budget_id) FROM budget | simple |
1,287 | Among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP < 300 AND T1.Admission = '-' | moderate |
433 | What is the percentage of the set of cards that have Chinese Simplified as the language and are only available for online games? | SELECT CAST(SUM(CASE WHEN T2.language = 'Chinese Simplified' AND T1.isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode | moderate |
936 | Which was the fastest lap for Lewis Hamilton in the 2008 Australian Grand Prix? | SELECT T1.fastestLap FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T2.name = 'Australian Grand Prix' AND T2.year = 2008 AND T3.forename = 'Lewis' AND T3.surname = 'Hamilton' | simple |
242 | Among all the atoms from 21 to 25, list all the molecules that are carcinogenic. | SELECT DISTINCT T2.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE SUBSTR(T1.atom_id, -2) BETWEEN '21' AND '25' AND T2.label = '+' | moderate |
704 | What is the excerpt post ID and wiki post ID of the tag named sample? | SELECT ExcerptPostId, WikiPostId FROM tags WHERE TagName = 'sample' | simple |
1 | Please list the lowest three eligible free rates for students aged 5-17 in continuation schools. | SELECT `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` FROM frpm WHERE `Educational Option Type` = 'Continuation School' AND `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` IS NOT NULL ORDER BY `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` ASC LIMIT 3 | moderate |
120 | From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance. | SELECT T1.account_id, T1.frequency FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.date) BETWEEN '1995' AND '2000' | moderate |
766 | What is the hero's full name with the highest attribute in strength? | SELECT T1.full_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Strength' ORDER BY T2.attribute_value DESC LIMIT 1 | moderate |
1,468 | Where is the hometown of Garrett Gerke? | SELECT T2.city FROM member AS T1 INNER JOIN zip_code AS T2 ON T2.zip_code = T1.zip WHERE T1.first_name = 'Garrett' AND T1.last_name = 'Gerke' | simple |
1,051 | List all the football player with the highest potential score. | SELECT DISTINCT(t1.player_name) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.potential = (SELECT MAX(potential) FROM Player_Attributes) | simple |
1,358 | Who was the first one paid his/her dues? Tell the full name. | SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.source = 'Dues' ORDER BY T2.date_received LIMIT 1 | simple |
1,387 | Which student has been entrusted to manage the budget for the Yearly Kickoff? | SELECT T4.first_name, T4.last_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget INNER JOIN member AS T4 ON T3.link_to_member = T4.member_id WHERE T1.event_name = 'Yearly Kickoff' | moderate |
492 | For the set "From the Vault: Lore", what is its expansion type? | SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%' | simple |
1,268 | For the patients with an abnormal anti-SM, please list the IDs of the three youngest ones. | SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM NOT IN ('negative','0') ORDER BY T1.Birthday DESC LIMIT 3 | simple |
727 | Who is the publisher of Sauron? | SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Sauron' | simple |
1,405 | Calculate the amount budgeted for 'April Speaker' event. List all the budgeted categories for said event in an ascending order based on their amount budgeted. | SELECT T2.category, SUM(T2.amount) FROM event AS T1 JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'April Speaker' GROUP BY T2.category ORDER BY SUM(T2.amount) ASC | moderate |
362 | What is the description about the ruling of card "Condemn"? | SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Condemn' | simple |
711 | Among products comments with 0 score, what is the total number of users ages 40 years old? | SELECT COUNT(DISTINCT T1.id) FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score = 0 AND T2.Age = 40 | simple |
781 | Provide the heights of the heroes whose eye colours are amber. | SELECT T1.height_cm FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Amber' | simple |
1,074 | List all the short name of the football team that had a home team goal of 10? | SELECT t1.team_short_name FROM Team AS t1 INNER JOIN Match AS t2 ON t1.team_api_id = t2.home_team_api_id WHERE t2.home_team_goal = 10 | simple |
689 | Identify the display name and location of the user, who was the last to edit the post with ID 183. | SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Id = 183 ORDER BY T1.LastEditDate DESC LIMIT 1 | simple |
694 | Provide the text of the latest 10 comments to the post with the title 'Analysing wind data with R' and the display name of the user who left it. | SELECT T3.Text, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T2.Id = T3.PostId WHERE T2.Title = 'Analysing wind data with R' ORDER BY T1.CreationDate DESC LIMIT 10 | moderate |
1,498 | What is the highest monthly consumption in the year 2012? | SELECT SUM(Consumption) FROM yearmonth WHERE SUBSTR(Date, 1, 4) = '2012' GROUP BY SUBSTR(Date, 5, 2) ORDER BY SUM(Consumption) DESC LIMIT 1 | simple |
1,416 | How many members of Business have the Medium size of tee shirt? | SELECT COUNT(T2.member_id) FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Business' AND T2.t_shirt_size = 'Medium' | simple |
874 | Who finished second in the San Marino Grand Prix in 2006? | SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.year = 2006 AND T1.name = 'San Marino Grand Prix' AND T2.position = 2 | simple |
708 | List the creation date and age of the user that commented with webiste. | SELECT T2.CreationDate, T2.Age FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.text LIKE '%http://%' | moderate |
1,120 | Sum up the away team goal scored by both Daan Smith and Filipe Ferreira. | SELECT SUM(t2.away_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_5 WHERE t1.player_name IN ('Daan Smith', 'Filipe Ferreira') | moderate |
616 | What is the comment's rating score of the post which was created on 7/19/2010 7:19:56 PM | SELECT T1.Score FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.CreationDate = '2010-07-19 19:19:56.0' | simple |
748 | What is the eye colour of superhero with superhero ID 75? | SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.id = 75 | simple |
638 | List all the name of users that obtained the Organizer Badges. | SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Organizer' | simple |
1,234 | List the patient ID, sex and birthday who has abnormal white blood cell count. Group them by sex and list the patient by age in ascending order. | SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC <= 3.5 OR T2.WBC >= 9.0 GROUP BY T1.SEX,T1.ID ORDER BY T1.Birthday ASC | moderate |
1,321 | How many events of the Student_Club did Sacha Harrison attend in 2019? | SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Sacha' AND T3.last_name = 'Harrison' AND SUBSTR(T1.event_date, 1, 4) = '2019' | moderate |
582 | 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' | simple |
1,172 | How many male patients have elevated total bilirubin count? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M' | simple |
600 | List out all post that are related to post ID 61217 and what is the popularity of this post? | SELECT T1.ViewCount FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 61217 | simple |
1,332 | How much did the Student_Club members spend on food in September Meeting? | SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Food' AND SUBSTR(T1.event_date, 6, 2) = '09' | moderate |
823 | How many female superheroes are in Marvel Comics? | SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.gender = 'Female' | moderate |
1,419 | What is the category of event which was taken place in 2020-03-24T12:00:00? | SELECT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_date = '2020-03-24T12:00:00' | simple |
542 | 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' | simple |
101 | List out the accounts who have the earliest trading date in 1995 ? | SELECT account_id FROM trans WHERE STRFTIME('%Y', date) = '1995' ORDER BY date ASC LIMIT 1 | simple |
1,128 | Which country's players have the heaviest average weights? | SELECT t1.name FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id INNER JOIN Player AS t3 ON t2.home_player_1 = t3.player_api_id GROUP BY t1.name ORDER BY AVG(t3.weight) DESC LIMIT 1 | simple |
623 | How many elders obtained the "Supporter" badge? | SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Age > 65 AND T2.Name = 'Supporter' | simple |
815 | Count the good female superheroes. | SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Good' AND T3.gender = 'Female' | simple |
946 | Please list the location coordinates of the US circuits. | SELECT lat, lng FROM circuits WHERE country = 'USA' | simple |
977 | From race no. 50 to 100, how many finishers have been disqualified? | SELECT SUM(IIF(time IS NOT NULL, 1, 0)) FROM results WHERE statusId = 2 AND raceID < 100 AND raceId > 50 | simple |
1,147 | Please name one player whose overall strength is the greatest. | SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.overall_rating = ( SELECT MAX(overall_rating) FROM Player_Attributes) | simple |
226 | What is the percentage of double bonds in the molecule TR008? Please provide your answer as a percentage with five decimal places. | SELECT ROUND(CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id),5) FROM bond AS T WHERE T.molecule_id = 'TR008' | moderate |
441 | State the set code of the set with release date of 07/13/2007? | SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.releaseDate = '2007-07-13' | simple |
873 | What is the actual finish time for Bruce McLaren in the race No.743? | SELECT T2.time FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 743 AND T1.forename = 'Bruce' AND T1.surname = 'McLaren' | simple |
953 | How many French constructors have a lap number of over 50? | SELECT COUNT(DISTINCT T2.constructorId) FROM results AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.laps > 50 AND T2.nationality = 'French' | simple |
446 | What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror? | SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id), T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Abyssal Horror' | moderate |
845 | List the power of superheroes with height greater than 80% of the average height of all superheroes. | SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.height_cm * 100 > ( SELECT AVG(height_cm) FROM superhero ) * 80 | moderate |
1,409 | Mention the total expense used on 8/20/2019. | SELECT SUM(cost) FROM expense WHERE expense_date = '2019-08-20' | simple |
1,381 | List the name of students that have attended more than 7 events. | SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member GROUP BY T2.link_to_member HAVING COUNT(T2.link_to_event) > 7 | moderate |
1,136 | How many players had the highest potential score for crossing that preferred to use their left foots while attacking? | SELECT COUNT(t1.id) FROM Player_Attributes AS t1 WHERE t1.preferred_foot = 'left' AND t1.crossing = ( SELECT MAX(crossing) FROM Player_Attributes) | moderate |
Subsets and Splits