question
stringlengths
23
286
sql
stringlengths
29
1.45k
db_id
stringclasses
11 values
prompt
stringlengths
1.09k
6.84k
question_id
int64
0
1.53k
difficulty
stringclasses
3 values
What is the highest overall rating received by Dorlan Pabon?
SELECT MAX(t2.overall_rating) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Dorlan Pabon'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,100
simple
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'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,101
moderate
For the players who had a 77 points overall rating on 2016/6/23, who was the oldest? Give the name of the player.
SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2016-06-23' AND t2.overall_rating = 77 ORDER BY t1.birthday ASC LIMIT 1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,102
moderate
What was the overall rating for Aaron Mooy on 2016/2/4?
SELECT t2.overall_rating FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2016-02-04' AND t1.player_name = 'Aaron Mooy'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,103
moderate
What was the potiential for Francesco Parravicini on 2010/8/30?
SELECT t2.potential FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2010-08-30' AND t1.player_name = 'Francesco Parravicini'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,104
moderate
How was Francesco Migliore's attacking work rate on 2015/5/1?
SELECT t2.attacking_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2015-05-01' AND t1.player_name = 'Francesco Migliore'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,105
moderate
Tell the defensive work rate for Kevin Berigaud on 2013/2/22.
SELECT t2.defensive_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2013-02-22' AND t1.player_name = 'Kevin Berigaud'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,106
moderate
When was the first time did Kevin Constant have his highest crossing score? Give the date.
SELECT `date` FROM ( SELECT t2.crossing, t2.`date` FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE t1.player_name = 'Kevin Constant' ORDER BY t2.crossing DESC) ORDER BY date DESC LIMIT 1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,107
moderate
What was the build up play speed class for "Willem II" on 2011/2/22?
SELECT t2.buildUpPlaySpeedClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Willem II' AND SUBSTR(t2.`date`, 1, 10) = '2011-02-22'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,108
moderate
How was the build up play dribbling class for "LEI" on 2015/9/10?
SELECT t2.buildUpPlayDribblingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_short_name = 'LEI' AND SUBSTR(t2.`date`, 1, 10) = '2015-09-10'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,109
moderate
Tell the build Up play passing class for "FC Lorient" on 2010/2/22.
SELECT t2.buildUpPlayPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'FC Lorient' AND SUBSTR(t2.`date`, 1, 10) = '2010-02-22'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,110
moderate
State the chance creation passing class for "PEC Zwolle" on 2013/9/20.
SELECT t2.chanceCreationPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'PEC Zwolle' AND SUBSTR(t2.`date`, 1, 10) = '2013-09-20'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,111
moderate
What was the chance creation crossing class for "Hull City" on 2010/2/22?
SELECT t2.chanceCreationCrossingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hull City' AND SUBSTR(t2.`date`, 1, 10) = '2010-02-22'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,112
moderate
For the team "Hannover 96", what was its defence aggression class on 2015/9/10?
SELECT t2.chanceCreationShootingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hannover 96' AND SUBSTR(t2.`date`, 1, 10) = '2015-09-10'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,113
moderate
What was the average overall rating for Marko Arnautovic from 2007/2/22 to 2016/4/21?
SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE t1.player_name = 'Marko Arnautovic' AND SUBSTR(t2.`date`, 1, 10) BETWEEN '2007-02-22' AND '2016-04-21'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,114
challenging
What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12?
SELECT (SUM(CASE WHEN t1.player_name = 'Landon Donovan' THEN t2.overall_rating ELSE 0 END) * 1.0 - SUM(CASE WHEN t1.player_name = 'Jordan Bowery' THEN t2.overall_rating ELSE 0 END)) * 100 / SUM(CASE WHEN t1.player_name = 'Landon Donovan' THEN t2.overall_rating ELSE 0 END) LvsJ_percent FROM Player AS t1 INNER JOIN Playe...
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,115
challenging
List down 5 tallest players' name.
SELECT player_name FROM Player ORDER BY height DESC LIMIT 5
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,116
simple
What are the player api id of 10 heaviest players?
SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 10
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,117
simple
List down the name of players who are 35 years old and above.
SELECT player_name FROM Player WHERE CAST((JULIANDAY('now') - JULIANDAY(birthday)) AS REAL) / 365 >= 35
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,118
simple
How many home team goal have been scored by Aaron Lennon?
SELECT SUM(t2.home_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_9 WHERE t1.player_name = 'Aaron Lennon'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,119
simple
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')
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,120
moderate
Calculate the total home team goal scored by players whose age are 30 years old and below.
SELECT SUM(t2.home_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_1 WHERE datetime(CURRENT_TIMESTAMP, 'localtime') - datetime(T1.birthday) < 31
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,121
moderate
State 10 names of the strongest players.
SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 10
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,122
simple
What is the name of players with the highest potential?
SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.potential DESC LIMIT 1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,123
simple
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'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,124
moderate
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
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,125
moderate
State the name of players who came from Belgium.
SELECT t3.player_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 WHERE t1.name = 'Belgium'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,126
simple
Locate players with vision scores of 90 and above, state the country of these players.
SELECT DISTINCT t4.name FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.player_api_id = t2.player_api_id INNER JOIN Match AS t3 ON t2.player_api_id = t3.home_player_8 INNER JOIN Country AS t4 ON t3.country_id = t4.id WHERE t1.vision > 89
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,127
moderate
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
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,128
simple
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'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,129
simple
What are the short name of team who played safe while creating chance of passing?
SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.chanceCreationPassingClass = 'Safe'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,130
moderate
What is the average heights of Italy players?
SELECT CAST(SUM(T1.height) AS REAL) / COUNT(T1.id) FROM Player AS T1 INNER JOIN Match AS T2 ON T1.id = T2.id INNER JOIN Country AS T3 ON T2.country_id = T3.ID WHERE T3.NAME = 'Italy'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,131
simple
Please provide the names of top three football players who are over 180 cm tall in alphabetical order.
SELECT player_name FROM Player WHERE height > 180 ORDER BY player_name LIMIT 3
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,132
simple
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%'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,133
simple
What is the difference between players 6 and 23's jumping scores?
SELECT SUM(CASE WHEN t1.id = 6 THEN t1.jumping ELSE 0 END) - SUM(CASE WHEN t1.id = 23 THEN t1.jumping ELSE 0 END) FROM Player_Attributes AS t1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,134
simple
Please provide top three football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.
SELECT id FROM Player_Attributes WHERE preferred_foot = 'right' ORDER BY potential DESC LIMIT 3
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,135
moderate
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)
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,136
moderate
What percentage of players have a strength and stamina score of more than 80?
SELECT CAST(COUNT(CASE WHEN strength > 80 AND stamina > 80 THEN id ELSE NULL END) AS REAL) * 100 / COUNT(id) FROM Player_Attributes t
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,137
simple
In what country did the Poland Ekstraklasa take place?
SELECT name FROM Country WHERE id IN ( SELECT country_id FROM League WHERE name = 'Poland Ekstraklasa' )
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,138
simple
What was the final score for the match on September 24, 2008, in the Belgian Jupiler League between the home team and the away team?
SELECT t2.home_team_goal, t2.away_team_goal FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Belgium Jupiler League' AND SUBSTR(t2.`date`, 1, 10) = '2008-09-24'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,139
challenging
What are Alexis Blin's sprint speed, agility, and acceleration scores?
SELECT sprint_speed, agility, acceleration FROM Player_Attributes WHERE player_api_id IN ( SELECT player_api_id FROM Player WHERE player_name = 'Alexis Blin' )
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,140
simple
Does the KSV Cercle Brugge team have a slow, balanced or fast speed class?
SELECT DISTINCT t1.buildUpPlaySpeedClass FROM Team_Attributes AS t1 INNER JOIN Team AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.team_long_name = 'KSV Cercle Brugge'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,141
moderate
In the 2015–2016 season, how many games were played in the Italian Serie A league?
SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Italy Serie A' AND t2.season = '2015/2016'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,142
simple
What was the highest score of the home team in the Netherlands Eredivisie league?
SELECT MAX(t2.home_team_goal) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Netherlands Eredivisie'
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,143
simple
Please state the finishing rate and curve score of the player who has the heaviest weight.
SELECT id, finishing, curve FROM Player_Attributes WHERE player_api_id = ( SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 1 ) LIMIT 1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,144
simple
Which league had the most games in the 2015–2016 season?
SELECT t1.name FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2015/2016' GROUP BY t1.name ORDER BY COUNT(t2.id) DESC LIMIT 1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,145
simple
Please provide the full name of the away team that scored the most goals.
SELECT t2.team_long_name FROM Match AS t1 INNER JOIN Team AS t2 ON t1.away_team_api_id = t2.team_api_id ORDER BY t1.away_team_goal DESC LIMIT 1
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,146
moderate
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)
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,147
simple
What is the percentage of players that are under 180 cm who have an overall strength of more than 70?
SELECT CAST(COUNT(CASE WHEN t2.overall_rating > 70 THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height < 180
european_football_2
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Country (id integer, name text, , PRIMARY KEY(id), ) #League (id integer, country_id integer, name text, , PRIMARY KEY(id), FOREIGN KEY(cou...
1,148
moderate
Are there more in-patient or outpatient who were male? What is the deviation in percentage?
SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,149
moderate
What is the percentage of female patient were born after 1930?
SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,150
moderate
For patient born between Year 1930 to 1940, how many percent of them were inpatient?
SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE STRFTIME('%Y', Birthday) BETWEEN '1930' AND '1940'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,151
moderate
What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient?
SELECT SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE Diagnosis = 'SLE'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,152
moderate
What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.
SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,153
simple
State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had.
SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,154
simple
List the patient ID, sex and birthday of patient with LDH beyond normal range.
SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,155
simple
State the ID and age of patient with positive degree of coagulation.
SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,156
moderate
For patients with severe degree of thrombosis, list their ID, sex and dieseas the patient is diagnosed with.
SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 2
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,157
simple
List all patients who were born in 1937 whose total cholesterol was beyond the normal range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,158
moderate
For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.
SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,159
simple
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'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,160
moderate
For in-patient age 50 and above, what is their average anti-cardiolipin antibody (IgG) concentration?
SELECT AVG(T2.`aCL IgG`) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) >= 50 AND T1.Admission = '+'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,161
challenging
How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?
SELECT COUNT(*) FROM Patient WHERE STRFTIME('%Y', Description) = '1997' AND SEX = 'F' AND Admission = '-'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,162
moderate
What was the age of the youngest patient when they initially arrived at the hospital?
SELECT MIN(STRFTIME('%Y', `First Date`) - STRFTIME('%Y', Birthday)) FROM Patient
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,163
simple
How many of the patients with the most serious thrombosis cases examined in 1997 are women?
SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,164
moderate
What is the age gap between the youngest and oldest patient with a normal triglyceride recorded?
SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,165
moderate
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
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,166
simple
For the year that concluded on December 31, 1998, how many male patients on average were tested in the lab each month?
SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,167
moderate
The oldest SJS patient's medical laboratory work was completed on what date, and what age was the patient when they initially arrived at the hospital?
SELECT T1.Date, STRFTIME('%Y', T2.`First Date`) - STRFTIME('%Y', T2.Birthday) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'SJS' AND T2.Birthday IS NOT NULL ORDER BY T2.Birthday ASC LIMIT 1
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,168
challenging
What is the ratio of male to female patients among all those with abnormal uric acid counts?
SELECT CAST(SUM(CASE WHEN T2.UA <= 8.0 AND T1.SEX = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.UA <= 6.5 AND T1.SEX = 'F' THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,169
challenging
How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.`First Date`) >= 1
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,170
moderate
How many underage patients were examined during the course of the three-year period from 1990 to 1993?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < '18'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,171
challenging
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'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,172
simple
What is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985, and 12/31/1995?
SELECT T2.Diagnosis FROM Examination AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC LIMIT 1
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,173
challenging
What is the average age of patients 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'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,174
moderate
How old was the patient who had the highest hemoglobin count at the time of the examination, and what is the doctor's diagnosis?
SELECT STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday), T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.HGB DESC LIMIT 1
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,175
moderate
What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?
SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,176
simple
Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?
SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,177
simple
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
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,178
simple
For the patient who was diagnosed with SLE on 1994/2/19, what was his/her anti-Cardiolipin antibody concentration status on 1993/11/12?
SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,179
moderate
Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?
SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9.0 AND T2.Date = '1992-06-12'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,180
moderate
For the patient who got the laboratory test of uric acid level as 8.4 on 1991-10-21, how old was he/she at that time?
SELECT STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UA = 8.4 AND T2.Date = '1991-10-21'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,181
moderate
For the patient who first came to the hospital on 1991/6/13 who was diagnosed with SJS, what is the total number of his/her Laboratory tests in 1995?
SELECT COUNT(*) FROM Laboratory WHERE ID = ( SELECT ID FROM Patient WHERE `First Date` = '1991-06-13' AND Diagnosis = 'SJS' ) AND STRFTIME('%Y', Date) = '1995'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,182
moderate
For the patient who was diagnosed SLE on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?
SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = ( SELECT ID FROM Examination WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' ) AND T2.`Examination Date` = T1.`First Date`
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,183
challenging
For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?
SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,184
simple
For the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from November to December in 1981?
SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-02...
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,185
challenging
Lists all patients by ID who were diagnosed with Behcet's and had their exams between 01/01/197 and 12/31/1997.
SELECT ID FROM Examination WHERE `Examination Date` BETWEEN '1997-01-01' AND '1997-12-31' AND Diagnosis = 'Behcet'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,186
moderate
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
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,187
moderate
How many female patients born in 1964 were admitted to the hospital? List them by ID.
SELECT ID FROM Patient WHERE STRFTIME('%Y', Birthday) = '1964' AND SEX = 'F' AND Admission = '+'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,188
simple
What number of patients with a degree of thrombosis level 2 and ANA pattern of only S, have a level of anti-Cardiolip in antibody (IgM) 20% higher than average?
SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,189
challenging
What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?
SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Laboratory WHERE `U-PRO` > 0 AND `U-PRO` < 30
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,190
challenging
What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?
SELECT CAST(SUM(CASE WHEN Diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE STRFTIME('%Y', `First Date`) = '1981' AND SEX = 'M'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,191
challenging
List all patients who were followed up at the outpatient clinic who underwent a laboratory test in October 1991 and had a total blood bilirubin level within the normal range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.`T-BIL` < 2.0 AND STRFTIME('%Y', T2.Date) = '1991' AND STRFTIME('%m', T2.Date) = '10'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,192
challenging
Excluding all P only ANA Pattern patients, how many of the remainder are women born between 1980 and 1989?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'P' AND STRFTIME('%Y', T1.Birthday) BETWEEN '1980' AND '1989' AND T1.SEX = 'F'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,193
moderate
What sex is the patient who in a medical examination was diagnosed with PSS and in a laboratory examination had a blood level of C-reactive protein de 2+, createnine 1 and LDH 123?
SELECT T1.SEX FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T3.ID = T2.ID WHERE T2.Diagnosis = 'PSS' AND T3.CRP = '2+' AND T3.CRE = 1.0 AND T3.LDH = 123
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,194
challenging
What is the average blood albumin level for female patients with a PLT greater than 400 who have been diagnosed with SLE?
SELECT AVG(T2.ALB) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 400 AND T1.Diagnosis = 'SLE' AND T1.SEX = 'F'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,195
moderate
What is the most common sign of patients with SLE disease?
SELECT Symptoms FROM Examination WHERE Diagnosis = 'SLE' GROUP BY Symptoms ORDER BY COUNT(Symptoms) DESC LIMIT 1
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,196
simple
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
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,197
simple
How many female patients were given an APS diagnosis?
SELECT COUNT(ID) FROM Patient WHERE SEX = 'F' AND Diagnosis = 'APS'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,198
simple
How many patients who underwent testing in 1997 had protein levels outside the normal range?
SELECT COUNT(ID) FROM Laboratory WHERE ALB <= 6.0 OR ALB >= 8.5 AND STRFTIME('%Y', Date) = '1997'
thrombosis_prediction
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #Examination (ID integer, Examination Date date, aCL IgG real, aCL IgM real, ANA integer, ANA Pattern text, aCL IgA integer, Diagnosis text,...
1,199
simple