set dict |
|---|
{
"query": "Please list the awards the coaches who are born in Canada have won.",
"pos": [
"SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthCountry = 'Canada'"
],
"neg": [
"SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Sc... |
{
"query": "For the goalie whose last name is \"Young\", how many teams did he play in?",
"pos": [
"SELECT COUNT(DISTINCT T1.tmID) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.lastName = 'Young'"
],
"neg": [
"SELECT playerID FROM Goalies AS T1 INNER JOIN Teams AS T2 O... |
{
"query": "Which league did player id\"adamsja01\" play in 1920?",
"pos": [
"SELECT lgID FROM ScoringSC WHERE playerID = 'adamsja01' AND year = 1920"
],
"neg": [
"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'",... |
{
"query": "List down the first name of coaches who still coach after year 2000.",
"pos": [
"SELECT DISTINCT T1.firstName FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year > 2000"
],
"neg": [
"SELECT T1.pos FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID... |
{
"query": "In the year 2000, which team has played the most games against the Buffalo Sabres?",
"pos": [
"SELECT T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.oppID = T2.tmID INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.tmID = T3.tmID WHERE T1.year = 2000 AND T2.name = ... |
{
"query": "How many players, whose shooting/catching hand is both left and right, debuted their first NHL in 2011?",
"pos": [
"SELECT COUNT(playerID) FROM Master WHERE shootCatch IS NULL AND firstNHL = '2011'"
],
"neg": [
"SELECT firstName, lastName FROM Master WHERE birthYear = 1990 AND birthCountry !... |
{
"query": "State the nick name of player ID 'aubinje01'. List all the teams and season he played for.",
"pos": [
"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'"
... |
{
"query": "Among the coaches whose team has over 30 wins in a year, how many of them are born in the USA?",
"pos": [
"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'"
],
"neg": [
"SELECT SUM(CASE WHEN T1.year = 2... |
{
"query": "Players born in which year have received the most awards in total?",
"pos": [
"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"
],
"neg": [
"SELECT DISTINCT T1.nameNick, T3.year, T3.... |
{
"query": "Among the players who had 10 empty net goals in their career, who is the tallest? Show his full name.",
"pos": [
"SELECT T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.ENG = 10 ORDER BY T2.height DESC LIMIT 1"
],
"neg": [
"SELECT Be... |
{
"query": "How many goals were scored while the goalkeeper was on the ice in the 1924 WCHL by the goalie with the most goals scored?",
"pos": [
"SELECT SUM(PostGA) FROM Goalies WHERE lgID = 'WCHL' AND year = '1924' GROUP BY playerID ORDER BY SUM(PostGA) DESC LIMIT 1"
],
"neg": [
"SELECT COUNT(T1.player... |
{
"query": "Among the players who were born in July and August, how many of them got in the Hall of Fame?",
"pos": [
"SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.birthMon IN (7, 8)"
],
"neg": [
"SELECT T1.birthCountry FROM Master AS T1 INNER JOIN Awar... |
{
"query": "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.",
"pos": [
"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) /... |
{
"query": "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.",
"pos": [
"SELECT DISTINCT T1.nameGiven, T1.birthCountry FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID GROUP BY... |
{
"query": "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.",
"pos": [
"SELECT AVG(IIF(birthYear < 1990, height, NULL)) - AVG(IIF(birthYear >= 1990, height, NULL)) FROM Master"
],
"neg": [
"SELECT SUM(T1.l), T1.coac... |
{
"query": "For he who had the highest plus / minus on the court in the 1981 season, what's his full name?",
"pos": [
"SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1981 GROUP BY T2.playerID ORDER BY SUM(T2.`+/-`) DESC LIMIT 1"
],
"n... |
{
"query": "For the player who scored 7 shorthanded goals in 1989, what's his dominant hand?",
"pos": [
"SELECT T1.shootCatch FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1989 GROUP BY T2.playerID HAVING SUM(T2.SHG) = 7"
],
"neg": [
"SELECT CAST(COUNT(name) AS ... |
{
"query": "List the first Name and last name of all players not from USA and who are born in 1990 .",
"pos": [
"SELECT firstName, lastName FROM Master WHERE birthYear = 1990 AND birthCountry != 'USA'"
],
"neg": [
"SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerI... |
{
"query": "How many players were included in the Hall of Fame on average between 1950 and 1980?",
"pos": [
"SELECT CAST(COUNT(name) AS REAL) / 30 FROM HOF WHERE year BETWEEN 1950 AND 1980 AND category = 'Player'"
],
"neg": [
"SELECT COUNT(tmID) FROM Goalies WHERE year = 2005 AND ENG IS NULL",
"SELE... |
{
"query": "How many years were there after Don Waddell retired and became a coach in NHL?",
"pos": [
"SELECT MAX(T2.year) - MIN(T2.year) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.firstName = 'Don' AND T1.lastName = 'Waddell'"
],
"neg": [
"SELECT nameNick, lastNHL FR... |
{
"query": "Name the deceased players whose death country is different from his birth country order by birth year.",
"pos": [
"SELECT firstName, lastName FROM Master WHERE birthCountry != deathCountry ORDER BY birthYear"
],
"neg": [
"SELECT COUNT(DISTINCT T1.tmID) FROM Goalies AS T1 INNER JOIN Master AS... |
{
"query": "Among the players who became coaches, how many of them have gotten in the Hall of Fame?",
"pos": [
"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"
],
"neg": [
"SELECT T1.firstName, T1.lastName ... |
{
"query": "What's the weight of the player who had the most Power Play Goals in the 21st century?",
"pos": [
"SELECT T1.weight FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year > 2000 GROUP BY T1.playerID, T1.weight ORDER BY SUM(T2.PPG) DESC LIMIT 1"
],
"neg": [
"SEL... |
{
"query": "Please list the awards won by coaches who were born in 1952.",
"pos": [
"SELECT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthYear = 1952"
],
"neg": [
"SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID... |
{
"query": "How many hall of famers both played and coached in the league?",
"pos": [
"SELECT COUNT(playerID) FROM Master WHERE hofID IS NOT NULL AND playerID IS NOT NULL AND coachID IS NOT NULL"
],
"neg": [
"SELECT T2.nameGiven , T2.birthYear, T2.birthMon, T2.birthDay, T3.name FROM Goalies AS T1 INNER ... |
{
"query": "In the history of team id NJD, which goalie saved the most goal attempts? Give his full name.",
"pos": [
"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"
],... |
{
"query": "Which player who showed as the third goalie in a game has the biggest weight? Give the full name of the player.",
"pos": [
"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"
],
"neg": [
... |
{
"query": "Among the teams with the most number of ties, how many penalty was committed by a player or coach that is not on the ice? Indicate the name of the team.",
"pos": [
"SELECT BenchMinor, name FROM Teams ORDER BY T DESC LIMIT 1"
],
"neg": [
"SELECT T1.birthCountry FROM Master AS T1 INNER JOIN Co... |
{
"query": "Please list the first 3 teams that got the most penalty minutes in 2006.",
"pos": [
"SELECT name FROM Teams WHERE year = 2006 GROUP BY tmID, name ORDER BY SUM(PIM) DESC LIMIT 3"
],
"neg": [
"SELECT T1.year FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year W... |
{
"query": "What is the power play percentage of the team with the most number of loses?",
"pos": [
"SELECT CAST(SUM(PPG) AS REAL) * 100 / SUM(PPC) FROM Teams GROUP BY tmID ORDER BY SUM(L) DESC LIMIT 1"
],
"neg": [
"SELECT T2.shootCatch FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.play... |
{
"query": "Among the coaches who have taught teams from the NHL League, how many of them are from Canada?",
"pos": [
"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'"
],
"neg": [
"SELECT T1.pos FROM Mast... |
{
"query": "For the team had the biggest power play percentage in 2011, who was their coach that season? Give the full name.",
"pos": [
"SELECT T1.coachID FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID WHERE T2.year = 2011 ORDER BY CAST(T2.PPG AS REAL) / T2.PPC DESC LIMIT 1"
],
"neg": [
... |
{
"query": "Please list the years in which the NHL League had shots recorded while the goalie was on the ice.",
"pos": [
"SELECT DISTINCT year FROM Goalies WHERE lgID = 'NHL' AND SA IS NOT NULL"
],
"neg": [
"SELECT T2.nameGiven, T2.lastName, T2.birthYear, birthMon, birthDay , T3.tmID FROM Scoring AS T1 ... |
{
"query": "What was the total number of the games that player Id \"rutlewa01\" played in 1967?",
"pos": [
"SELECT GP FROM Goalies WHERE playerID = 'rutlewa01' AND year = 1967"
],
"neg": [
"SELECT playerID FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.name... |
{
"query": "Which team recorded the most number of road victories in 2005? Indicate the team ID.",
"pos": [
"SELECT tmID FROM TeamSplits WHERE YEAR = '2005' ORDER BY rW DESC LIMIT 1"
],
"neg": [
"SELECT CAST(T1.W AS REAL) / T1.G, T2.playerID FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID... |
{
"query": "What is the highest total points a team got in a year?",
"pos": [
"SELECT SUM(Pts), year FROM Teams GROUP BY year, tmID ORDER BY SUM(Pts) DESC LIMIT 1"
],
"neg": [
"SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthCountry = 'C... |
{
"query": "What is the percentage of winning rate of improvement since Alain Vigneault became the coach of Vancouver Canucks in 2006 season?",
"pos": [
"SELECT SUM(CASE WHEN T1.year = 2006 THEN CAST(T1.W AS REAL) * 100 / (T1.W + T1.L) ELSE 0 END) - ( SELECT CAST(W AS REAL) * 100 / (W + L) FROM Teams WHERE year... |
{
"query": "How many coaches worked a temporary term in the year 2007?",
"pos": [
"SELECT COUNT(coachID) FROM Coaches WHERE year = 2007 AND notes = 'interim'"
],
"neg": [
"SELECT pos FROM Master WHERE birthYear IS NOT NULL ORDER BY birthYear, birthMon, birthDay LIMIT 8",
"SELECT COUNT(year) FROM Sco... |
{
"query": "How many teams have the same total number of postseason wins and postseason loses?",
"pos": [
"SELECT DISTINCT COUNT(tmID) FROM Goalies WHERE PostW = PostL"
],
"neg": [
"SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = '... |
{
"query": "What are the awards won by the coach who coached the team with the most number of victories of all time? Indicate the choach ID.",
"pos": [
"SELECT DISTINCT T2.coachID, T1.award FROM AwardsCoaches AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID GROUP BY T2.coachID, T1.award ORDER BY SUM(T2... |
{
"query": "Did legendsID \"P194502\" personally attend his Hall of Fame dedication?",
"pos": [
"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'"
],
"neg": [
"SELECT T1.firstName, T1.lastName FROM Master ... |
{
"query": "Who is the youngest player who is still living. State the given name and date of birth.",
"pos": [
"SELECT nameGiven , nameGiven , birthYear, birthMon, birthDay FROM Master WHERE deathYear IS NULL ORDER BY birthYear DESC, birthMon DESC, birthday DESC LIMIT 1"
],
"neg": [
"SELECT DISTINCT T1.... |
{
"query": "Who are the players who were not in the Hall of Fame list.",
"pos": [
"SELECT firstName, lastName FROM Master WHERE hofID IS NULL"
],
"neg": [
"SELECT T1.W FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 1985 AND T1.tmID = ( SELECT DIST... |
{
"query": "State the nick name of the tallest player? If the player had left NHL, mention the last season he was with NHL.",
"pos": [
"SELECT nameNick, lastNHL FROM Master ORDER BY height DESC LIMIT 1"
],
"neg": [
"SELECT SUM(CASE WHEN T1.year = 2006 THEN CAST(T1.W AS REAL) * 100 / (T1.W + T1.L) ELSE 0... |
{
"query": "Which country has the most players in the Hall of Fame?",
"pos": [
"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"
],
"neg": [
"SELECT COUNT(T2.coachID) FROM Master AS T1 INNER JOIN Coach... |
{
"query": "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.",
"pos": [
"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 )... |
{
"query": "State the player ID of player with average height of 75.",
"pos": [
"SELECT DISTINCT playerID FROM Master GROUP BY playerID HAVING AVG(height) = 75"
],
"neg": [
"SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1981 GROU... |
{
"query": "Among the coaches who have gotten in the Hall of Fame, how many of them have a weight of over 195?",
"pos": [
"SELECT COUNT(DISTINCT T1.coachID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.weight > 195"
],
"neg": [
"SELECT BenchMinor, name FROM Teams ORDER BY T DES... |
{
"query": "Who was the coach for the team which had the most bench minors penalty in 2003?",
"pos": [
"SELECT DISTINCT T3.firstName, T3.lastName FROM Teams AS T1 INNER JOIN Coaches AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN Master AS T3 ON T2.coachID = T3.coachID WHERE T1.year = '2003' GROUP B... |
{
"query": "Show me how many minutes player Id \"valiqst01\" played in the game in 2007 season.",
"pos": [
"SELECT Min FROM Goalies WHERE playerID = 'valiqst01' AND year = 2007"
],
"neg": [
"SELECT COUNT(T1.coachID) FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.yea... |
{
"query": "Give the number of female employees.",
"pos": [
"SELECT COUNT(*) FROM employee WHERE gender = 'F'"
],
"neg": [
"SELECT T2.educationrequired FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'David' AND T1.lastname = 'Whitehead' AND T1.gende... |
{
"query": "In which city's office does Sandy Adams work at?",
"pos": [
"SELECT T2.locationcity FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.lastname = 'Adams' AND T1.firstname = 'Sandy'"
],
"neg": [
"SELECT educationrequired FROM position WHERE positiontitle... |
{
"query": "Who is the employee with the highest salary? Specify his/her full name.",
"pos": [
"SELECT firstname, lastname FROM employee WHERE CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL)) FROM employee )"
],
"neg": [
"SELECT ssn FROM... |
{
"query": "Which position has the highest amount of poor performing employees?",
"pos": [
"SELECT T2.positiontitle FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' GROUP BY T2.positiontitle ORDER BY COUNT(T2.positiontitle) DESC LIMIT 1"
],
"neg"... |
{
"query": "What is the required education for the position of regional manager?",
"pos": [
"SELECT educationrequired FROM position WHERE positiontitle = 'Regional Manager'"
],
"neg": [
"SELECT firstname, lastname FROM employee WHERE CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(... |
{
"query": "Which city and address has zip code of above 90000?",
"pos": [
"SELECT locationcity, address FROM location WHERE zipcode > 90000"
],
"neg": [
"SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID GROUP BY T2... |
{
"query": "What is the full office location address where most of the employees work at?",
"pos": [
"SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID GROUP BY T2.address, T2.locationcity, T2.state, T2.zipcode ORDER BY COUN... |
{
"query": "Mention the full name, hired date and performance status of the employee whose location is in Utah state.",
"pos": [
"SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'UT'"
],
"neg": [
... |
{
"query": "Write down the full name, performance status and located city of the employee who's social security number is \"767-74-7373\".",
"pos": [
"SELECT T1.firstname, T1.lastname, T2.state, T2.locationcity FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.ssn = '767-... |
{
"query": "How many \"account representatives\" are there in Chicago with a good performance?",
"pos": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative... |
{
"query": "List the full names, gender and positions who's location is in New York city.",
"pos": [
"SELECT T1.firstname, T1.lastname, T1.gender, T3.positiontitle FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T... |
{
"query": "How many employees are there in the \"Miami\" office?",
"pos": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Miami'"
],
"neg": [
"SELECT firstname, lastname FROM employee ORDER BY salary DESC LIMIT 1",
"SELECT... |
{
"query": "Please list the social security numbers of all the employees who work in California.",
"pos": [
"SELECT T1.ssn FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'CA'"
],
"neg": [
"SELECT T2.positiontitle FROM employee AS T1 INNER JOIN position... |
{
"query": "Which positions are suitable with 4 years degree education?",
"pos": [
"SELECT positiontitle FROM position WHERE educationrequired = '4 year degree'"
],
"neg": [
"SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positi... |
{
"query": "Among the employees with poor performance, provide the managers' full names, location city, address and its zip code.",
"pos": [
"SELECT T1.firstname, T1.lastname, T2.locationcity, T2.address, T2.zipcode FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN posi... |
{
"query": "Please list the social security numbers of the male employees with a salary of over $70,000 a year.",
"pos": [
"SELECT ssn FROM employee WHERE gender = 'M' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 70000"
],
"neg": [
"SELECT COUNT(*) FROM position WHERE CAST(REPLACE(SUBSTR(maxs... |
{
"query": "Who is the employee in “New York City” with a good performance? Give the social security number of the employee.",
"pos": [
"SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'New York City' AND T1.perfor... |
{
"query": "State the name of the city where Jose Rodriguez works.",
"pos": [
"SELECT T2.locationcity FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez'"
],
"neg": [
"SELECT T1.firstname, T1.lastname, T2.locationcity... |
{
"query": "Which position has the highest number of female employees with a 2 year degree?",
"pos": [
"SELECT T2.positiontitle FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.educationrequired = '2 year degree' AND T1.gender = 'F' GROUP BY T2.positiontitle ORDER BY COU... |
{
"query": "Describe the employees' full name, positions, located city and office phone number within Colorado state.",
"pos": [
"SELECT T1.firstname, T1.lastname, T3.positiontitle, T2.locationcity, T2.officephone FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN positi... |
{
"query": "How many positions have a maximum salary of no more than US$1000,000?",
"pos": [
"SELECT COUNT(*) FROM position WHERE CAST(REPLACE(SUBSTR(maxsalary, 4), ',', '') AS REAL) < 100000"
],
"neg": [
"SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1 INNER JOIN location ... |
{
"query": "How much is the salary of the first ever employee that was hired?",
"pos": [
"SELECT salary FROM employee ORDER BY hiredate ASC LIMIT 1"
],
"neg": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID =... |
{
"query": "What is the average salary of the employees who work as a Trainee?",
"pos": [
"SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) AS avg FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'"
],
"neg": [
"SELECT T2.e... |
{
"query": "How many male Regional Managers are there?",
"pos": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Regional Manager' AND T1.gender = 'M'"
],
"neg": [
"SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JO... |
{
"query": "How many emplyees have a good job performance?",
"pos": [
"SELECT COUNT(*) FROM employee WHERE performance = 'Good'"
],
"neg": [
"SELECT firstname, lastname FROM employee ORDER BY salary DESC LIMIT 1",
"SELECT T2.educationrequired FROM employee AS T1 INNER JOIN position AS T2 ON T1.pos... |
{
"query": "In which state does Emily Wood work?",
"pos": [
"SELECT T2.state FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood'"
],
"neg": [
"SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN position AS T... |
{
"query": "How many Account Representatives are there in Illinois with satisfying performance?",
"pos": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representativ... |
{
"query": "Which employee's job position requires a higher education level, Jose Rodriguez or Sandy Adams?",
"pos": [
"SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE (T1.lastname = 'Adams' AND T1.firstname = 'Sandy') OR (T1.lastname = 'Ro... |
{
"query": "List the full name and social security number of the account representative with average performance.",
"pos": [
"SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.performance = 'Average'"
],
"neg": [
"SELECT T1... |
{
"query": "In which state can you find the highest amount of good performing Account Representatives?",
"pos": [
"SELECT T2.state FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Repres... |
{
"query": "Please list the full names of the employees who are working as a Trainee.",
"pos": [
"SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'"
],
"neg": [
"SELECT T1.firstname, T1.lastname, T2.state,... |
{
"query": "How many male employees work at the address 450 Peachtree Rd?",
"pos": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.address = '450 Peachtree Rd' AND T1.gender = 'M'"
],
"neg": [
"SELECT T1.firstname, T1.lastname FROM employee AS... |
{
"query": "Which employee has the highest salary? Please give his or her full name.",
"pos": [
"SELECT firstname, lastname FROM employee ORDER BY salary DESC LIMIT 1"
],
"neg": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = '... |
{
"query": "What is the education required for David Whitehead to reach his current position?",
"pos": [
"SELECT T2.educationrequired FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'David' AND T1.lastname = 'Whitehead' AND T1.gender = 'M'"
],
"neg": [
... |
{
"query": "Among the employees who are Trainees, how many of them work in New York?",
"pos": [
"SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Trainee' AND T2.state = 'NY'"
... |
{
"query": "Give the full address of the office of the highest paid manager.",
"pos": [
"SELECT T2.address FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Manager' ORDER BY T1.salary DESC LIMIT... |
{
"query": "Among the USA players, who has the lightest weight?",
"pos": [
"SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.nation = 'USA' ORDER BY T1.weight_in_lbs ASC LIMIT 1"
],
"neg": [
"SELECT CAST(COUNT(CASE WHEN T1.height_in_cm < 200 AN... |
{
"query": "Among all players drafted by the Toronto Maple Leafs in 2008, identify the player with the highest prospects for the draft.",
"pos": [
"SELECT PlayerName FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND draftyear = '2008' ORDER BY CSS_rank DESC LIMIT 1"
],
"neg": [
"SELECT DISTINC... |
{
"query": "What is the name of the tallest player?",
"pos": [
"SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id ORDER BY T2.height_in_cm DESC LIMIT 1"
],
"neg": [
"SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id ... |
{
"query": "Among all the players that are right-shooted, how many of them weigh over 90 kg?",
"pos": [
"SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.shoots = 'R'"
],
"neg": [
"SELECT ( SELECT T2.height_in_cm FR... |
{
"query": "What is the difference in the number of goals scored by Pavel Brendl during the regular season versus the playoffs in the 1998-1999 season?",
"pos": [
"SELECT T3.Rs_G - T4.Pf_G AS diff FROM ( SELECT T2.PlayerName, T1.G AS Rs_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.EL... |
{
"query": "List out the seasons that Niklas Eckerblom played.",
"pos": [
"SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom'"
],
"neg": [
"SELECT T3.height_in_inch FROM PlayerInfo AS T1 INNER JOIN SeasonStatu... |
{
"query": "Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov.",
"pos": [
"SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Yevgeni Muratov' THEN T1.PIM ELSE 0 END) AS REAL) * 100 / SUM(T1.PIM) FROM SeasonStatus AS T1 INNER JOIN PlayerIn... |
{
"query": "Calculate the average weight in pounds of all players drafted by Arizona Coyotes.",
"pos": [
"SELECT CAST(SUM(T1.weight_in_lbs) AS REAL) / COUNT(T2.ELITEID) FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.overallby = 'Arizona Coyotes'"
],
"neg": [
"SEL... |
{
"query": "Name the player who has the most NHL points in draft year.",
"pos": [
"SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.P = ( SELECT MAX(P) FROM SeasonStatus )"
],
"neg": [
"SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Ian Schultz' TH... |
{
"query": "How many players were born in 1982 and have a height above 182cm?",
"pos": [
"SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_cm > 182 AND strftime('%Y', T2.birthdate) = '1982'"
],
"neg": [
"SELECT DISTINCT T1.SEASON ... |
{
"query": "List the names of all players in team Avangard Omsk in season 2000-2001.",
"pos": [
"SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk'"
],
"neg": [
"SELECT DISTINCT T1.GAMET... |
{
"query": "Which team has the most Swedish?",
"pos": [
"SELECT T.TEAM FROM ( SELECT T2.TEAM, COUNT(DISTINCT T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.nation = 'Sweden' GROUP BY T2.TEAM ORDER BY COUNT(DISTINCT T1.ELITEID) DESC LIMIT 1 ) AS T"
],
"neg... |
{
"query": "Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations?",
"pos": [
"SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.overallby = 'Arizona Coyotes' AND T2.draftyear = 2000 ORDER BY T1.PIM DESC LIMI... |
{
"query": "Among all players drafted by the Toronto Maple Leafs, identify the percentage who are from Eastern Europe.",
"pos": [
"SELECT CAST(COUNT(CASE WHEN nation IN ('Belarus', 'Czech Rep.', 'Slovakia', 'Ukraine') THEN ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(ELITEID) FROM PlayerInfo WHERE overallby = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.