id
int64 0
1.53k
| query
stringlengths 23
215
| sql
stringlengths 29
1.45k
| difficulty
stringclasses 3
values |
---|---|---|---|
705 |
Give the user's reputation and up vote number of the user that commented "fine, you win :)".
|
SELECT T2.Reputation, T2.UpVotes FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'fine, you win :)'
|
simple
|
674 |
Who has the highest reputation? Please give the display name.
|
SELECT DisplayName FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )
|
simple
|
1,061 |
How many players whose first names are Adam and weigh more than 170?
|
SELECT COUNT(id) FROM Player WHERE weight > 170 AND player_name LIKE 'Adam%'
|
simple
|
798 |
What is the publisher for Hawkman, Karate Kid and Speedy?
|
SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name IN ('Hawkman', 'Karate Kid', 'Speedy')
|
moderate
|
750 |
What is the average weight of all female superheroes?
|
SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Female'
|
simple
|
104 |
The transaction of 840 USD happened in 1998/10/14, when was this account opened?
|
SELECT T1.date FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T2.amount = 840 AND T2.date = '1998-10-14'
|
simple
|
885 |
State the name and date of the last round of race in year 1999.
|
SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1
|
simple
|
455 |
Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names.
|
SELECT DISTINCT name FROM cards WHERE isPromo = 1 AND side IS NOT NULL
|
simple
|
560 |
Give the number of "Revival" badges.
|
SELECT COUNT(Id) FROM badges WHERE Name = 'Revival'
|
simple
|
1,187 |
How many patients who were examined between 1987/7/6 and 1996/1/31 had a GPT level greater than 30 and an ALB level less than 4? List them by their ID.
|
SELECT DISTINCT ID FROM Laboratory WHERE Date BETWEEN '1987-07-06' AND '1996-01-31' AND GPT > 30 AND ALB < 4
|
moderate
|
1,166 |
What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.
|
SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1
|
simple
|
1,023 |
Among the players with an overall rating between 60 to 65, how many players whose going to be in all of your attack moves instead of defensing?
|
SELECT COUNT(id) FROM Player_Attributes WHERE overall_rating BETWEEN 60 AND 65 AND defensive_work_rate = 'low'
|
moderate
|
858 |
Which country is the constructor which got 1 point in the race No. 24 from?
|
SELECT T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 24 AND T1.points = 1
|
simple
|
217 |
Identify all the atoms that are connected to the atoms of the TR181 molecule.
|
SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T1.molecule_id = 'TR181'
|
simple
|
143 |
What are the accounts that have gold credit cards?
|
SELECT T2.account_id FROM disp AS T2 INNER JOIN card AS T1 ON T1.disp_id = T2.disp_id WHERE T1.type = 'gold'
|
simple
|
1,160 |
What is the percentage of female patient had total protein not within the normal range?
|
SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND (T2.TP < 6.0 OR T2.TP > 8.5) THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'
|
moderate
|
42 |
What is the type of education offered in the school who scored the highest average in Math?
|
SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 1
|
simple
|
1,125 |
Among the players with finishing rate of 1, pick the eldest player and state the player's name.
|
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.finishing = 1 ORDER BY t1.birthday ASC LIMIT 1
|
moderate
|
256 |
Calculate the total atoms consisting of the element carbon and hydrogen.
|
SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.element = 'c' OR T.element = 'h'
|
simple
|
426 |
Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order.
|
SELECT name FROM sets WHERE mtgoCode IS NULL ORDER BY name LIMIT 3
|
simple
|
329 |
Which carcinogenic molecule have the highest number of atoms consisted in it?
|
SELECT T.molecule_id FROM ( SELECT T2.molecule_id, COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' GROUP BY T2.molecule_id ORDER BY COUNT(T1.atom_id) DESC LIMIT 1 ) t
|
moderate
|
467 |
How many cards are there in the base set of "Hauptset Zehnte Edition"?
|
SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'
|
simple
|
440 |
Which foreign language used by "A Pedra Fellwar"?
|
SELECT DISTINCT language FROM foreign_data WHERE name = 'A Pedra Fellwar'
|
simple
|
654 |
Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag.
|
SELECT T3.DisplayName, T3.Location FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id INNER JOIN users AS T3 ON T3.Id = T2.OwnerUserId WHERE T1.TagName = 'hypothesis-testing'
|
moderate
|
1,298 |
Among the patients whose total cholesterol is within the normal range, how many of them have a P pattern observed in the sheet of ANA examination?
|
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T3.`ANA Pattern` = 'P' AND T2.`T-CHO` < 250
|
moderate
|
1,208 |
Provide IDs for male patients with ALT glutamic pylvic transaminase (GPT) that have history of ALT glutamic pylvic transaminase (GPT) exceed the normal range.
|
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.GPT >= 60
|
moderate
|
710 |
In posts with 1 comment, how many of the comments have 0 score?
|
SELECT COUNT(T1.id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.CommentCount = 1 AND T2.Score = 0
|
simple
|
1,286 |
For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital?
|
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 = '+'
|
simple
|
578 |
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?'
|
moderate
|
67 |
What is the total amount of Community College District closure in 1989 in the city of San Francisco?
|
SELECT COUNT(School) FROM schools WHERE strftime('%Y', ClosedDate) = '1989' AND City = 'San Francisco' AND DOCType = 'Community College District'
|
simple
|
14 |
List the top five schools, by descending order, from the highest to the lowest, the most number of Enrollment (Ages 5-17). Please give their NCES school identification number.
|
SELECT T1.NCESSchool FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.`Enrollment (Ages 5-17)` DESC LIMIT 5
|
simple
|
1,318 |
What is the event that has the highest attendance of the students from the Student_Club?
|
SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_name ORDER BY COUNT(T2.link_to_event) DESC LIMIT 1
|
simple
|
1,178 |
What was the gender of the first AORTITIS diagnosed patient?
|
SELECT SEX FROM Patient WHERE Diagnosis = 'AORTITIS' AND `First Date` IS NOT NULL ORDER BY `First Date` ASC LIMIT 1
|
simple
|
550 |
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 )
|
simple
|
427 |
What languages are available in the set known as Archenemy on the magic card market and having the code ARC?
|
SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.mcmName = 'Archenemy' AND T2.setCode = 'ARC'
|
moderate
|
200 |
Find the triple-bonded molecules which are carcinogenic.
|
SELECT DISTINCT T2.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#' AND T2.label = '+'
|
simple
|
842 |
Calculate the average height of all neutral superheroes.
|
SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
|
simple
|
238 |
How many molecules have a triple bond type?
|
SELECT COUNT(DISTINCT T.molecule_id) FROM bond AS T WHERE T.bond_type = '#'
|
simple
|
870 |
What's Lucas di Grassi's Q1 result in the race No. 345?
|
SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 345 AND T2.forename = 'Lucas' AND T2.surname = 'di Grassi'
|
simple
|
1,197 |
When was the medical information on patient number 48473 first documented, and what disease did she have?
|
SELECT `First Date`, Diagnosis FROM Patient WHERE ID = 48473
|
simple
|
964 |
List out the code for drivers who have nationality in America.
|
SELECT code FROM drivers WHERE Nationality = 'American'
|
simple
|
383 |
How many of the banned cards are white border?
|
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Banned' AND T1.borderColor = 'white'
|
simple
|
792 |
What is Abomination's superpower?
|
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.superhero_name = 'Abomination'
|
simple
|
340 |
Which are the cards that have incredibly powerful foils.
|
SELECT id FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL
|
simple
|
1,124 |
Who are the players that tend to be attacking when their mates were doing attack moves? List down their name.
|
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.attacking_work_rate = 'high'
|
moderate
|
1,415 |
List out the position of members who joined major of Business.
|
SELECT T2.position FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Business'
|
simple
|
509 |
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
|
simple
|
1,531 |
Who is the top spending customer and how much is the average price per single item purchased by this customer? What currency was being used?
|
SELECT T2.CustomerID, SUM(T2.Price / T2.Amount), T1.Currency FROM customers AS T1 INNER JOIN transactions_1k AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CustomerID = ( SELECT CustomerID FROM yearmonth ORDER BY Consumption DESC LIMIT 1 ) GROUP BY T2.CustomerID, T1.Currency
|
moderate
|
897 |
Name the driver with the most winning. Mention his nationality and what is his maximum point scores.
|
SELECT T1.forename, T1.surname, T1.nationality, MAX(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId WHERE T2.wins >= 1 GROUP BY T1.forename, T1.surname, T1.nationality ORDER BY COUNT(T2.wins) DESC LIMIT 1
|
moderate
|
305 |
Name all bonds with single bond types and what atoms are connected to the molecules.
|
SELECT T1.bond_id, T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '-'
|
simple
|
1,101 |
What is the average number of goals made by Parma as the away team while playing in Italy?
|
SELECT CAST(SUM(T1.away_team_goal) AS REAL) / COUNT(T1.id) FROM "Match" AS T1 INNER JOIN TEAM AS T2 ON T1.away_team_api_id = T2.team_api_id INNER JOIN Country AS T3 ON T1.country_id = T3.id WHERE T2.team_long_name = 'Parma' AND T3.name = 'Italy'
|
moderate
|
221 |
What are the atoms that are bonded in the molecule TR001 with the bond ID of TR001_2_6?
|
SELECT SUBSTR(T.bond_id, 1, 7) AS atom_id1 , T.molecule_id || SUBSTR(T.bond_id, 8, 2) AS atom_id2 FROM bond AS T WHERE T.molecule_id = 'TR001' AND T.bond_id = 'TR001_2_6'
|
simple
|
172 |
How many owner and disponent dispositions are there from account number 1 to account number 10?
|
SELECT SUM(type = 'OWNER') , SUM(type = 'DISPONENT') FROM disp WHERE account_id BETWEEN 1 AND 10
|
simple
|
802 |
Who is the tallest superhero?
|
SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1
|
simple
|
450 |
Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?
|
SELECT SUM(CASE WHEN artist = 'Aaron Miller' AND cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) FROM cards
|
moderate
|
771 |
List the name of superheroes with flight power.
|
SELECT T1.superhero_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 T3.power_name = 'Flight'
|
simple
|
1,261 |
How many patients with a normal RF don't have thrombosis?
|
SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0
|
simple
|
625 |
How many users were from New York?
|
SELECT COUNT(Id) FROM users WHERE Location = 'New York'
|
simple
|
1,129 |
List down the long name for slow speed class team.
|
SELECT DISTINCT t1.team_long_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlaySpeedClass = 'Slow'
|
simple
|
1,133 |
How many football players born after the 1990s have the first name "Aaron"?
|
SELECT COUNT(id) FROM Player WHERE birthday > '1990' AND player_name LIKE 'Aaron%'
|
simple
|
1,227 |
What is the average age of the male patient with high cholesterol?
|
SELECT AVG(STRFTIME('%Y', date('NOW')) - STRFTIME('%Y', T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-CHO` >= 250 AND T1.SEX = 'M'
|
moderate
|
225 |
Please list top five molecules that have double bonds in alphabetical order.
|
SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '=' ORDER BY T.molecule_id LIMIT 5
|
simple
|
35 |
What is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12?
|
SELECT T2.AdmEmail1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter School (Y/N)` = 1 ORDER BY T1.`Enrollment (K-12)` ASC LIMIT 1
|
moderate
|
854 |
What is the coordinates location of the circuits for Australian grand prix?
|
SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Australian Grand Prix'
|
simple
|
566 |
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
|
simple
|
1,512 |
Which customer paid the most in 2012/8/25?
|
SELECT CustomerID FROM transactions_1k WHERE Date = '2012-08-25' GROUP BY CustomerID ORDER BY SUM(Price) DESC LIMIT 1
|
simple
|
97 |
List out the id number of client who choose statement of issuance after transaction are Disponent?
|
SELECT T2.client_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND T2.type = 'DISPONENT'
|
simple
|
983 |
Which of the Italian constructor got the highest point to date? Give its introduction website?
|
SELECT T1.url FROM constructors AS T1 INNER JOIN constructorStandings AS T2 on T1.constructorId = T2.constructorId WHERE T1.nationality = 'Italian' ORDER BY T2.points DESC LIMIT 1
|
simple
|
624 |
What is the name of user with the ID of 30?
|
SELECT DisplayName FROM users WHERE Id = 30
|
simple
|
855 |
Where can I find the information about the races held on Sepang International Circuit?
|
SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'
|
simple
|
269 |
How many bond id have element iodine?
|
SELECT COUNT(T3.bond_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 T1.element = 'i'
|
simple
|
13 |
Please list the phone numbers of the schools with the top 3 SAT excellence rate.
|
SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr DESC LIMIT 3
|
simple
|
360 |
cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question
What are the languages available for the set that card 'Angel of Mercy' is in?
|
SELECT language FROM set_translations WHERE id IN ( SELECT id FROM cards WHERE name = 'Angel of Mercy' )
|
moderate
|
662 |
How many posts with votes that were created in 2011 have a bounty of 50?
|
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T2.BountyAmount = 50 AND STRFTIME('%Y', T2.CreationDate) = '2011'
|
simple
|
436 |
How many cards have frame effect as extendedart? List out the id of those cards.
|
SELECT id FROM cards WHERE frameEffects = 'extendedart' GROUP BY id
|
simple
|
1,439 |
Please list the phone numbers of the members who majored in business at the College of Agriculture and Applied Sciences.
|
SELECT T1.phone FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T2.major_name = 'Business' AND T2.college = 'College of Agriculture and Applied Sciences'
|
moderate
|
178 |
Which kind of credit card does client number 9 possess?
|
SELECT T3.type FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T1.client_id = 9
|
simple
|
922 |
What time did the the 2010's Formula_1 race took place on the Abu Dhabi Circuit?
|
SELECT T2.date, T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2010 AND T2.name = 'Abu Dhabi Grand Prix'
|
simple
|
20 |
How many schools in Amador which the Low Grade is 9 and the High Grade is 12?
|
SELECT COUNT(T1.`School Name`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Amador' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12
|
simple
|
709 |
In comments with 0 score, how many of the posts have view count lower than 5?
|
SELECT COUNT(T1.Id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.ViewCount < 5 AND T2.Score = 0
|
simple
|
1,288 |
Please list the diagnosis of the patients whose total protein is lower than normal.
|
SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0
|
simple
|
913 |
In which country can I find the circuit with the highest altitude?
|
SELECT country FROM circuits ORDER BY alt DESC LIMIT 1
|
simple
|
1,407 |
Among the budgets for Advertising, list out top three which have the most budgeted amount?
|
SELECT budget_id FROM budget WHERE category = 'Advertisement' ORDER BY amount DESC LIMIT 3
|
simple
|
622 |
State the name of badge that the user whose display name is "Sharpie" obtained.
|
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Sharpie'
|
simple
|
1,497 |
Which SME customer consumed the least in June 2012?
|
SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201206' AND T1.Segment = 'SME' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1
|
simple
|
753 |
Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color.
|
SELECT DISTINCT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.height_cm BETWEEN 170 AND 190 AND T2.colour = 'No Colour'
|
moderate
|
1,057 |
Calculate the average home team goal in the 2010/2011 season in the country of Poland.
|
SELECT CAST(SUM(t2.home_team_goal) AS REAL) / COUNT(t2.id) FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Poland' AND t2.season = '2010/2011'
|
moderate
|
202 |
How many triple type bonds are there?
|
SELECT COUNT(T.bond_id) FROM bond AS T WHERE T.bond_type = '#'
|
simple
|
1,078 |
Which player is older, Aaron Lennon or Abdelaziz Barrada?
|
SELECT player_name FROM Player WHERE player_name IN ('Aaron Lennon', 'Abdelaziz Barrada') ORDER BY birthday ASC LIMIT 1
|
simple
|
767 |
What is the average of superheroes with no skin colour?
|
SELECT CAST(COUNT(*) AS REAL) / SUM(CASE WHEN T2.id = 1 THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id
|
simple
|
568 |
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
|
simple
|
1,204 |
How long did it take after patient number 821298 arrived at the hospital for the first time before her evaluation began?
|
SELECT STRFTIME('%d', T3.`Examination Date`) - STRFTIME('%d', T1.`First Date`) FROM Patient AS T1 INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T1.ID = 821298
|
simple
|
532 |
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'
|
simple
|
938 |
Who was the champion of 2008's Australian Grand Prix and where can I know more about him?
|
SELECT T1.forename, T1.surname, T1.url FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian Grand Prix' AND T2.time LIKE '_:%:__.___' AND T3.year = 2008
|
moderate
|
822 |
How many green-skinned villains are there in the superhero universe?
|
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T2.alignment = 'Bad' AND T3.colour = 'Green'
|
moderate
|
284 |
Determine the bond type that is formed in the chemical compound containing element Carbon.
|
SELECT DISTINCT T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c'
|
moderate
|
21 |
In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12?
|
SELECT COUNT(CDSCode) FROM frpm WHERE `County Name` = 'Los Angeles' AND `Free Meal Count (K-12)` > 500 AND `FRPM Count (K-12)`< 700
|
simple
|
1,487 |
Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?
|
SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T2.Date = '201310' AND T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1
|
moderate
|
514 |
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
|
simple
|
1,322 |
Among the events attended by more than 10 members of the Student_Club, how many of them are meetings?
|
SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_id HAVING COUNT(T2.link_to_event) > 10 EXCEPT SELECT T1.event_name FROM event AS T1 WHERE T1.type = 'Meeting'
|
moderate
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.