db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
0
673
SQL
stringlengths
23
804
question_id
int64
0
9.43k
difficulty
stringclasses
1 value
image_and_language
List the object classes of image ID 36 with coordinates (0,0).
object classes of image ID 36 refers to OBJ_CLASS where IMG_ID = 36; coordinates (0,0) refer to X and Y coordinates of the bounding box where X = 0 and Y = 0;
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 36 AND T1.X = 0 AND T1.Y = 0
7,600
image_and_language
Write 10 coordinates with the object class "pizza."
coordinates for the object refer to X, Y, W and H coordinates of the bounding box; object class "pizza" refers to OBJ_CLASS = 'pizza';
SELECT T1.IMG_ID, T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'pizza' LIMIT 10
7,601
image_and_language
What object class is in the X and Y coordinates of 126 and 363?
object class refers to OBJ_CLASS; X and Y coordinates of 126 and 363 refer to coordinates of the bounding box where X = 126 and Y = 363;
SELECT T1.IMG_ID, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 126 AND T1.Y = 363
7,602
image_and_language
What is the most common object class of image ID 56?
the most common object class of image ID 56 refers to MAX(COUNT(OBJ_CLASS_ID)) where IMG_ID = 56;
SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 56 GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T2.OBJ_CLASS_ID) DESC LIMIT 1
7,603
image_and_language
Write the object classes of image ID 22 alongside the object's width and height.
object classes of image ID 22 refers to OBJ_CLASS where IMG_ID = 22; the object's width and heigh refer to W and H coordinates of the bounding box respectively;
SELECT T1.W, T1.H, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 22
7,604
image_and_language
What is the predicate class of image ID 68?
predicate class of image ID 68 refers to PRED_CLASS where IMG_ID = 68;
SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 68
7,605
image_and_language
How many 'has' predicate classes does image ID 107 have?
has' predicate classes refers to PRED_CLASS = 'has'; image ID 107 refers to IMG_ID = 107;
SELECT COUNT(T2.PRED_CLASS) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 107 AND T2.PRED_CLASS = 'has'
7,606
image_and_language
Name the most common predicate class of image ID 4434.
the most common predicate class of image ID 4434 MAX(PRED_CLASS) where IMG_ID = 4434;
SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1
7,607
image_and_language
Count the number of 'dress' object classes and include their X and Y coordinates in image ID 1764.
dress' object classes refer to OBJ_CLASS = 'dress'; image ID 1764 refers to IMG_ID = 1764; X and Y refer to coordinates of the bounding box;
SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1764 AND T2.OBJ_CLASS = 'dress'
7,608
image_and_language
Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.
X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';
SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'
7,609
image_and_language
How many 'blue' attribute classes are there on image ID 2355735?
blue' attribute classes on image ID 2355735 refer to ATT_CLASS = 'blue' where IMG_ID = 2355735;
SELECT COUNT(T1.ATT_CLASS) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 2355735 AND T1.ATT_CLASS = 'blue'
7,610
image_and_language
What is the average width and height of the objects in image ID 47? List their object classes as well.
The bounding box's W and H abbreviations stand for the object's width and height in which average width and height refer to AVG(W) and AVG(H) respectively; image ID 47 refers to IMG_ID = 47; object classes refer to OBJ_CLASS;
SELECT T2.OBJ_CLASS, AVG(T1.W), AVG(T1.H) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 47 GROUP BY T2.OBJ_CLASS
7,611
hockey
List the first Name and last name of all players not from USA and who are born in 1990 .
Not from USA refers to birthCountry! = 'USA'; born in 1990 refers to birthYear = 1990
SELECT firstName, lastName FROM Master WHERE birthYear = 1990 AND birthCountry != 'USA'
7,612
hockey
List all players' given name who are good at both left and right hand and playing the forward position.
good at both left and right hand refers to shootCatch IS NULL;  playing the forward position refers to pos = 'F'
SELECT nameGiven FROM Master WHERE shootCatch IS NULL AND pos = 'F'
7,613
hockey
Who are the players who were not in the Hall of Fame list.
not in the Hall of Fame refers to hofID IS NULL
SELECT firstName, lastName FROM Master WHERE hofID IS NULL
7,614
hockey
Who is the youngest player who is still living. State the given name and date of birth.
still living refers to deathYear IS NULL; youngest refers to MAX(birthYear,birthMon,birthDay)
SELECT nameGiven , nameGiven , birthYear, birthMon, birthDay FROM Master WHERE deathYear IS NULL ORDER BY birthYear DESC, birthMon DESC, birthday DESC LIMIT 1
7,615
hockey
For all the deceased players who are good at both left and right hand, list the player's name and the age when he died.
age when he died refers to SUBTRACT(deathYear,birthYear); deceased refers to deathYear IS NOT NULL; good at both left and right hand refers to shootCatch IS NULL
SELECT firstName, lastName, deathYear - birthYear FROM Master WHERE shootCatch IS NULL AND deathYear IS NOT NULL
7,616
hockey
Name the goalies who played for more than two teams from Year 2000 to 2005.
goalie who played for more than 2 teams refers to COUNT(DISTINCT(T2.tmID))>2
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year >= 2000 AND T2.year <= 2005 GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.tmID) > 2
7,617
hockey
What is the average weight of players who have height greater than 72 inches.
average weight refers to AVG(weight); height greater than 72 inches refers to height>72
SELECT AVG(weight) FROM Master WHERE height > 72
7,618
hockey
Name the goalies who have played more than total of 5000 minutes in the all the season played. State given name of the player and from which country was he born.
played more than total of 5000 minutes refers to SUM(Min)>5000;country he was born refers to birthCountry
SELECT DISTINCT T1.nameGiven, T1.birthCountry FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID GROUP BY T1.nameGiven, T1.birthCountry HAVING SUM(T2.Min) > 5000
7,619
hockey
Name the goaltenders who had played in both PCHA and NHL league.
PCHA refers to lgID = 'PCHA'; NHL league refers to lgID = 'NHL'
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID IN ('PCHA', 'NHL') GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.lgID) > 1
7,620
hockey
List all deceased goalies by last name. List the season where he had the most time played.
deceased refers to deathYear; most time played refers to MAX(Min)
SELECT T1.playerID, T2.year, Min FROM Master AS T1 INNER JOIN Goalies AS T2 ON T2.playerID = T1.playerID WHERE T1.deathYear IS NOT NULL ORDER BY T2.Min DESC LIMIT 1
7,621
hockey
List all goalies from year 2000 to 2010 for team COL. State their given name, height, weight and age of today.
team COL refers to tmID = 'COL'; age of today refers to SUBTRACT(YEAR(NOW())-birthYear)
SELECT T1.nameGiven, T1.height , T1.weight, STRFTIME('%Y', CURRENT_TIMESTAMP) - birthYear FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'COL' AND T2.year >= 2000 AND T2.year <= 2010 GROUP BY T1.playerID
7,622
hockey
Name all goalies with 10 or more empty net goals. Name the players and season where he played.
10 or more empty net goals refers to ENG> = 10; season refers to year
SELECT T1.firstName, T1.lastName , T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.ENG >= 10
7,623
hockey
State the goalie who has the lowest percentage of goals against among all the shots against recorded. Name the players and season where he played.
goals against refers to GA; shots against refers to SA; lowest percentage of goals against among all the shots against refers to MIN(DIVIDE(GA,SA)*100)
SELECT T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE CAST(T2.GA AS REAL) / T2.SA IS NOT NULL ORDER BY CAST(T2.GA AS REAL) / T2.SA LIMIT 1
7,624
hockey
List all goalies who played in the year 2005 season and shorter than 72 inches. List all the team names he play for.
shorter than 72 inches refers to height<72
SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.tmID = T3.tmID WHERE T2.year = 2005 AND T1.height < 72
7,625
hockey
State the nick name of player ID 'aubinje01'. List all the teams and season he played for.
nick name refers to nameNick; team refers to tmID; season refers to year
SELECT DISTINCT T1.nameNick, T3.year, T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.tmID = T3.tmID WHERE T1.playerID = 'aubinje01'
7,626
hockey
Name the goalies with the most seasons played. State the average time he played for each season.
most seasons played refers to MAX(COUNT(playerID)); average time he played for each season refers to DIVIDE(SUM(T2.Min),COUNT(T2.playerID))
SELECT T1.firstName, T1.lastName, T2.year, AVG(T2.Min) FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = ( SELECT playerID FROM Goalies GROUP BY playerID ORDER BY COUNT(playerID) DESC LIMIT 1 ) GROUP BY T1.firstName, T1.lastName, T2.year
7,627
hockey
Name the goalie and the season he played where he had 5% shutouts among the number of goals recorded while the goalie was on the ice.
shutouts refers to SHO; number of goals refers to GA; 5% shutouts among the number of goals refers to DIVIDE(SHO,GA)*100 = 5.00
SELECT DISTINCT T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN ( SELECT playerID, year FROM Goalies WHERE CAST(SHO AS REAL) / GA > 0.05 ) AS T2 ON T2.playerID = T1.playerID
7,628
hockey
Name the deceased players whose death country is different from his birth country order by birth year.
death country is different from his birth country refers to birthCountry! = deathCountry
SELECT firstName, lastName FROM Master WHERE birthCountry != deathCountry ORDER BY birthYear
7,629
hockey
Who are the players played both in NHL and WHA. List the given name and first year they were in NHL and first year in WHA.
first year they were in NHL refers to firstNHL; first year in WHA refers to firstWHA; play in both refers to firstNHL IS NOT NULL AND firstWHA IS NOT NULL
SELECT nameGiven, firstNHL, firstWHA FROM Master WHERE firstNHL IS NOT NULL AND firstWHA IS NOT NULL
7,630
hockey
List the living players who have two positions. State their given name the position they play.
living players refers to deathYear IS NULL; positions refers to pos
SELECT firstName, lastName, pos FROM Master WHERE deathYear IS NULL AND pos LIKE '%/%'
7,631
hockey
State the nick name of the tallest player? If the player had left NHL, mention the last season he was with NHL.
nick name refers to nameNick; tallest player refers to MAX(height); had left NHL refers to lastNHL
SELECT nameNick, lastNHL FROM Master ORDER BY height DESC LIMIT 1
7,632
hockey
What is the average height of player who were born in 1990 and after? Compare the average height with players who were born before 1990.
average height refers to AVG(height); born in 1990 refers to birthYear = 1990
SELECT AVG(IIF(birthYear < 1990, height, NULL)) - AVG(IIF(birthYear >= 1990, height, NULL)) FROM Master
7,633
hockey
Name the goalies who are good at left hand and also has become a coach after retirement. Name all teams he had played before.
good at left hand refers to shootCatch = 'L'; goalies refers to pos = 'G'
SELECT DISTINCT firstName, lastName, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T1.playerID IS NOT NULL AND T2.coachID IS NOT NULL AND T2.shootCatch = 'L' AND T2.pos = 'G'
7,634
hockey
List all the deceased goalies and the teams he had played whose birth country was in Canada.
goalies refers to pos = 'G'; deceased goalies refers to deathYear IS NOT NULL
SELECT DISTINCT firstName, lastName, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T2.birthCountry = 'Canada' AND T2.deathYear IS NOT NULL AND T2.pos = 'G'
7,635
hockey
Name the goalies and season they played when Boston Bruins won number 1 in rank.
goalies refers to pos = 'G'; season refers to year
SELECT T1.firstName, T1.lastName, T3.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.year = T3.year AND T2.tmID = T3.tmID WHERE T1.deathYear IS NOT NULL AND T3.name = 'Boston Bruins' AND T3.rank = 1 AND T1.pos = 'G'
7,636
hockey
Among all goalies who are still alive, whose first season in NHL in before 1950. List the team names they were in.
first season in NHL in before 1950 refers to firstNHL<1950; goalies who are still alive refers to deathYear IS NOT NULL
SELECT DISTINCT T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.lgID = T3.lgID AND T2.year = T3.year WHERE T1.deathYear IS NOT NULL AND T1.firstNHL < 1950
7,637
hockey
For all players who becomes coach after retirement, state the given name of coach and which teams and years did they coach?
SELECT DISTINCT T2.nameGiven, T3.name, T3.year FROM Coaches AS T1 INNER JOIN Master AS T2 ON T2.coachID = T1.coachID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T2.playerID IS NOT NULL AND T2.coachID IS NOT NULL
7,638
hockey
Among the coaches who was never a player, who has highest percentage of game winning? Provide the given name of the coach and team he coached.
highest percentage of game winning refers to MAX(DIVIDE(w,g)*100)
SELECT T2.nameGiven, T3.name FROM Coaches AS T1 INNER JOIN Master AS T2 ON T2.coachID = T1.coachID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T1.coachID IS NOT NULL ORDER BY CAST(T1.w AS REAL) / T1.g DESC LIMIT 1
7,639
hockey
Which coach has the best performance for team DET in history? What was the winning percentage? Name the coach and the year he coached.
winning percentage refers to DIVIDE(w,g)*100; team DET refers to tmID = 'DET'
SELECT CAST(T2.W AS REAL) / T2.G, T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN ( SELECT coachID FROM Coaches ORDER BY CAST(w AS REAL) / g DESC LIMIT 1 ) AS T3 ON T2.coachID = T3.coachID
7,640
hockey
Who is the coach who had coached the the most seasons in MTL? State his given name, date of birth and all teams he had coaches before.
date of birth refers to birthDay + birthMon + birthYear
SELECT T2.nameGiven , T2.birthYear, T2.birthMon, T2.birthDay, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T3.lgID = T1.lgID WHERE T3.tmID = 'MTL' GROUP BY T2.nameGiven, T2.birthYear, T2.birthMon, T2.birthDay, T3.name ORDER BY COUNT(T2.coachID) DESC LIMIT 1
7,641
hockey
List all goalies with more lost than won games for two seasons or more. State the name of the player and team he played.
lost refers to L; won refers to W
SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.year = T3.year AND T2.tmID = T3.tmID WHERE T1.pos = 'G' AND T2.L > T2.W GROUP BY T1.firstName, T1.lastName, T3.name HAVING COUNT(T3.year) > 2
7,642
hockey
For all the goalies born in year 1987, who are good in both right hand and left hand? Calculate his percentage of winning for every season he played.
good in both right hand and left hand refers shootCatch IS NULL; winning refers to W; every season he played refers to GP; percentage of winning for every season he played refers to DIVIDE(W,GP)*100
SELECT T1.firstName, T1.lastName, T2.year, CAST(T2.W AS REAL) / T2.GP FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.birthYear = 1987 AND T1.shootCatch IS NULL
7,643
hockey
What is given name for player 'aebisda01'. Calculate the average time in minutes for the all his games played as goaltender.
played as goaltender refers to pos = 'G'; time in minutes refers to Min; all his games played refers to GP; average time in minutes refers to DIVIDE(SUM(Min)/SUM(GP))
SELECT T1.nameGiven, CAST(SUM(T2.Min) AS REAL) / SUM(T2.GP) FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = 'aebisda01' GROUP BY T1.nameGiven
7,644
hockey
List all living goalies who have greater than 50% wins among all games played. State their last name and first name.
wins refers to W; all games played refers to GP;greater than 50% wins among all games played refers to DIVIDE(SUM(W),GP)*100>50
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.deathYear IS NOT NULL GROUP BY T1.playerID HAVING CAST(SUM(T2.Min) AS REAL) / SUM(T2.GP) > 0.5
7,645
hockey
How many players and coaches are awarded after death?
awarded after death refers to note = 'posthumous'
SELECT COUNT(note) FROM AwardsMisc WHERE note IS NOT NULL
7,646
hockey
Among the players who won an award in the year 1983, how many of them play the position of goalie?
position of goalie refers to pos = 'G'
SELECT COUNT(playerID) FROM AwardsPlayers WHERE pos = 'G' AND year = 1983
7,647
hockey
How many coaches worked a temporary term in the year 2007?
worked a temporary term refers to notes = 'interim'
SELECT COUNT(coachID) FROM Coaches WHERE year = 2007 AND notes = 'interim'
7,648
hockey
How many shoutouts are there in the regular season of 1977?
regular season refers to `R/P` = 'R'
SELECT COUNT(year) FROM CombinedShutouts WHERE year = 1977 AND `R/P` = 'R'
7,649
hockey
How many teams scored against their opponent who had pulled their goalie in the year 2005?
teams scored against their opponent who had pulled their goalie refers to ENG is not null
SELECT COUNT(tmID) FROM Goalies WHERE year = 2005 AND ENG IS NULL
7,650
hockey
Please list the years in which the NHL League had shots recorded while the goalie was on the ice.
shots recorded while the goalie was on the ice refers to SA IS NOT NULL; NHL League refers to lgID = 'NHL'
SELECT DISTINCT year FROM Goalies WHERE lgID = 'NHL' AND SA IS NOT NULL
7,651
hockey
How many teams have the same total number of postseason wins and postseason loses?
same total number of postseason wins and postseason loses refers to PostW = PostL
SELECT DISTINCT COUNT(tmID) FROM Goalies WHERE PostW = PostL
7,652
hockey
Please list the name of the person who was in the Hall of Fame in the year 1978.
SELECT name FROM HOF WHERE year = 1978
7,653
hockey
How many people were in the Hall of Fame's Builder category?
SELECT COUNT(hofID) FROM HOF WHERE category = 'Builder'
7,654
hockey
Among the people who got into the Hall of Fame after the year 1980, how many of them belong to the category of "Player"?
after the year 1980 refers to year>1980
SELECT COUNT(hofID) FROM HOF WHERE year > 1980 AND category = 'Player'
7,655
hockey
Please list the Nicknames of the players who got in the Hall of Fame in 2007.
nicknames refers to nameNick
SELECT DISTINCT T1.nameNick FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T2.year = 2007
7,656
hockey
Did the tallest player got in the Hall of Fame? If yes, please list the year when he got in the Hall of Fame.
tallest player refers to max(height)
SELECT CASE WHEN T1.hofID IS NULL THEN 'NO' ELSE T2.year END FROM Master AS T1 LEFT JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.height = ( SELECT MAX(height) FROM Master )
7,657
hockey
Please list the awards the coaches who are born in Canada have won.
born in Canada refers to birthCountry = 'Canada'
SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthCountry = 'Canada'
7,658
hockey
Among the coaches whose team has over 30 wins in a year, how many of them are born in the USA?
over 30 wins refers to w>30; born in the USA refers to birthCountry = 'USA'
SELECT COUNT(T2.coachID) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.W > 30 AND T1.birthCountry = 'USA'
7,659
hockey
Among the coaches who have taught teams from the NHL League, how many of them are from Canada?
from Canada refers to birthCountry = 'Canada'; NHL league refers to lgID = 'NHL'
SELECT COUNT(T2.coachID) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.lgID = 'NHL' AND T1.birthCountry = 'Canada'
7,660
hockey
Please list the awards won by coaches who were born in 1952.
born in 1977 refers to birthYear = '1977'
SELECT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthYear = 1952
7,661
hockey
Among the coaches who have received an award in 1940, how many of them are born in Toronto?
born in Toronto refers to birthCountry = 'Toronto'
SELECT COUNT(T1.coachID) FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 1940 AND T1.birthCity = 'Toronto'
7,662
hockey
Among the coaches who have received an award after the year 1940, how many of them have already died?
after the year 1940 refers to year>1940; have already died refers to deathYear IS NOT NULL
SELECT COUNT(T1.coachID) FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.deathYear IS NOT NULL AND T2.year > 1940
7,663
hockey
Please list the awards won by coaches who taught the NHL League and have already died.
have already died refers to deathYear IS NOT NULL; NHL league refers to lgID = 'NHL'
SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.deathYear IS NOT NULL AND T2.lgID = 'NHL'
7,664
hockey
Among the coaches who have gotten in the Hall of Fame, how many of them have a weight of over 195?
weight of over 195 refers to weight>195
SELECT COUNT(DISTINCT T1.coachID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.weight > 195
7,665
hockey
Please list the first name of the players who are good at both left hands and right hands for goalie and have gotten in the Hall of Fame.
good at both left hands and right hands for goalie refers to shootCatch IS NULL
SELECT DISTINCT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.shootCatch IS NULL
7,666
hockey
Among the players who became coaches, how many of them have gotten in the Hall of Fame?
players who became coaches refers to playerID IS NOT NULL AND coachID IS NOT NULL
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.playerID IS NOT NULL AND T1.coachID IS NOT NULL
7,667
hockey
Please list the birth cities of the players who have won an award in the year 1970.
SELECT DISTINCT T1.birthCity FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1970
7,668
hockey
How many players born in Toronto have won the All-Rookie award?
born in Toronto refers to birthCity = 'Toronto'
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'
7,669
hockey
Among the players who have won the All-Rookie award, how many of them have died?
have died refers to deathYear IS NOT NULL
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.deathYear IS NOT NULL
7,670
hockey
Among the players who died in Massachussets, how many of them have won an award?
died in Massachussets refers to deathState = 'Massachussets'
SELECT COUNT(DISTINCT T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.deathState = 'MA'
7,671
hockey
Please list the awards the players who died in Arlington have won.
died in Arlington refers to deathCity = 'Arlington'
SELECT T2.award FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.deathCity = 'Kemptville'
7,672
hockey
Please list the nicknames of the players who have won the All-Rookie award and are born in March.
born in March refers to birthMon = '3'; nicknames refers to nameNick
SELECT DISTINCT T1.nameNick FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthMon = 3
7,673
hockey
Among the players who were born in July and August, how many of them got in the Hall of Fame?
born in July and August refers to birthMon IN('7','8')
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.birthMon IN (7, 8)
7,674
hockey
In which month was the player who has won the most awards born?
who has won the most awards refers to max(count(award)); the month player was born refers to birthMon
SELECT T1.birthMon FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID GROUP BY T2.playerID ORDER BY COUNT(T2.award) DESC LIMIT 1
7,675
hockey
Players born in which year have received the most awards in total?
received the most awards in total refers to max(count(award))
SELECT T1.birthYear FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID GROUP BY T1.birthYear ORDER BY COUNT(T2.award) DESC LIMIT 1
7,676
hockey
Which country is the most award-winning player from?
most award-winning refers to max(count(award)); country player is from refers to birthCountry
SELECT T1.birthCountry FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID GROUP BY T1.birthCountry ORDER BY COUNT(T2.award) DESC LIMIT 1
7,677
hockey
Which country has the most players in the Hall of Fame?
country refers to birthCountry
SELECT T1.birthCountry FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID GROUP BY T1.birthCountry ORDER BY COUNT(T1.playerID) DESC LIMIT 1
7,678
hockey
Please list the positions of the players who were born in Canada and have won the All-Rookie award.
born in Canada refers to birthCountry = 'Canada'; pos = 'LW' refers to left winger; pos = 'RW' refers to right winger; pos = 'C' refers to center; pos = 'G' refers to goalie; pos = 'D' refers to defenceman; pos = 'W' refers to winger; pos = 'F' refers to forward
SELECT DISTINCT T1.pos FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCountry = 'Canada' AND T2.award = 'All-Rookie'
7,679
hockey
What is the average BMI of all the coaches who have gotten in the Hall of Fame?
average BMI = divide(sum(divide(weight, multiply(height, height))), count(coachID))
SELECT SUM(T1.weight / (T1.height * T1.height)) / COUNT(T1.coachID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID
7,680
hockey
What is the percentage of American players among all the players who have gotten in the Hall of Fame?
percentage of American players = divide(count(hofID where birthCountry = 'USA'), count(hofID))*100%
SELECT CAST(COUNT(CASE WHEN T1.birthCountry = 'USA' THEN T1.playerID ELSE NULL END) AS REAL) * 100 / COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID
7,681
hockey
How many years did player Id "healygl01" play?
years of playing = MAX(year)-MIN(year)
SELECT COUNT(year) FROM Goalies WHERE playerID = 'healygl01'
7,682
hockey
Which team did player Id "roypa01" play in 1992? Give the team id.
team id refers to tmID
SELECT tmID FROM Goalies WHERE playerID = 'roypa01' AND year = 1992
7,683
hockey
What was the total number of the games that player Id "rutlewa01" played in 1967?
total number of the games refers to GP
SELECT GP FROM Goalies WHERE playerID = 'rutlewa01' AND year = 1967
7,684
hockey
Show me how many minutes player Id "valiqst01" played in the game in 2007 season.
show me how many minutes refers to Min
SELECT Min FROM Goalies WHERE playerID = 'valiqst01' AND year = 2007
7,685
hockey
How many games did player Id "vanbijo01" win in the 1990 season?
the number of wins refers to W
SELECT W FROM Goalies WHERE playerID = 'vanbijo01' AND year = 1990
7,686
hockey
In how many games did player Id "vernomi01" end up with a tie or an overtime loss in the 1998 season?
end up with a tie or an overtime loss refers to T/OL
SELECT `T/OL` FROM Goalies WHERE playerID = 'vernomi01' AND year = 1998
7,687
hockey
For the coach who won Second Team All-Star in 1933, how many wins did he have that year?
the number of wins refers to count(w)
SELECT SUM(T1.W) FROM Coaches AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 1933 AND T2.award = 'Second Team All-Star'
7,688
hockey
Did legendsID "P194502" personally attend his Hall of Fame dedication?
note = 'posthumous'refers to "didn't personally attend"
SELECT IIF(T1.note = 'posthumous', 'YES', 'NO') FROM AwardsMisc AS T1 RIGHT JOIN Master AS T2 ON T1.ID = T2.playerID WHERE T2.legendsID = 'P194502'
7,689
hockey
Which position did Mike Antonovich play?
pos = 'LW' refers to left winger; pos = 'RW' refers to right winger; pos = 'C' refers to center; pos = 'G' refers to goalie; pos = 'D' refers to defenceman; pos = 'W' refers to winger; pos = 'F' refers to forward
SELECT T1.pos FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.firstName = 'Mike' AND T1.lastName = 'Antonovich'
7,690
hockey
For the coach who co-coached with Dave Lewis in 1998, where was his birth place?
co-coached refers to notes = 'co-coach'; birth place refers to 'birthCountry-birthState-birthCity'
SELECT T1.birthCountry FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 1998 AND T2.notes = 'co-coach with Dave Lewis'
7,691
hockey
Which player who showed as the third goalie in a game has the biggest weight? Give the full name of the player.
the third goalie refers to stint = 3; the biggest weight refers to max(weight)
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.stint = 3 ORDER BY T1.weight DESC LIMIT 1
7,692
hockey
Among the players who had 10 empty net goals in their career, who is the tallest? Show his full name.
10 empty net goals refers to ENG = 10; the tallest refers to max(height)
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID GROUP BY T2.playerID, T1.height HAVING SUM(T2.ENG) > 10 ORDER BY T1.height DESC LIMIT 1
7,693
hockey
For the goalie who had the most shutouts in 2010, what's his catching hand?
the most shutouts refers to max(SHO); shootCatch = 'L' refers to lefthand; shootCatch = 'R' refers to righthand; shootCatch = 'null' or 'empty' means this player is good at both left and right hand
SELECT T1.shootCatch FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2010 GROUP BY T2.playerID ORDER BY SUM(T2.SHO) DESC LIMIT 1
7,694
hockey
Who is the youngest goalie among those who had more than 150 goal againsts in 2002 season?
youngest goalie refers to max(birthYear/birthMon/birthDay); more than 150 goal againsts refers to GA>150
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2002 AND T2.GA > 150 GROUP BY T2.playerID, T1.birthYear, T1.birthMon, T1.birthMon HAVING SUM(T2.GA) ORDER BY T1.birthYear DESC, T1.birthMon DESC, SUM(T1.birthDay) DESC LIMIT 1
7,695
hockey
In the history of team id NJD, which goalie saved the most goal attempts? Give his full name.
saved the most goal attempts refers to max(subtract(SA, GA)); team id refers to tmID
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'NJD' GROUP BY T2.playerID ORDER BY SUM(T2.SA - T2.GA) DESC LIMIT 1
7,696
hockey
Which teams had the most postseason empty net goals in 2010 season? List their team names.
most postseason empty net goals refers to max(PostENG)
SELECT T2.name FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID WHERE T1.year = 2010 GROUP BY T2.name ORDER BY SUM(PostENG) DESC LIMIT 1
7,697
hockey
For the team which had the most postseason shutouts in 1995, how many points did they have that year?
points refer to Pts; the most postseason shutouts refers to max(PostSHO)
SELECT SUM(T2.SHO) FROM Scoring AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1995 GROUP BY T2.tmID ORDER BY SUM(T2.PostSHO) DESC LIMIT 1
7,698
hockey
Which coach had the highest winning rates in the 2009 season? What's coach's nickname.
the highest winning rate refer to divide(W, sum(W, L))
SELECT T2.coachID, T1.nameNick FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 2009 ORDER BY CAST(T2.W AS REAL) / (T2.W + T2.L) DESC LIMIT 1
7,699