{"question": "How many players are on each team in the NBA", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster GROUP BY team;"}
{"question": "Who is the tallest player in the NBA roster", "sql": "SELECT name, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height FROM nba_roster GROUP BY name ORDER BY height DESC LIMIT 1;"}
{"question": "What is the average age of NBA players", "sql": "SELECT AVG(AGE) FROM nba_roster;"}
{"question": "Who is the heaviest player in the NBA", "sql": "SELECT NAME, WT FROM nba_roster WHERE WT!= 'NA' ORDER BY CAST(SUBSTR(WT, 1, INSTR(WT,' ')-1) AS INTEGER) DESC LIMIT 1;"}
{"question": "What is the total salary of all players in the NBA who are at least 6 feet 7 inches tall", "sql": "SELECT SUM(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as total_salary FROM nba_roster WHERE CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12 >= 6.67;"}
{"question": "Which three teams have the most players from a particular college", "sql": "SELECT team, COLLEGE, COUNT(*) as num_players FROM nba_roster WHERE COLLEGE!= '--' GROUP BY team, COLLEGE ORDER BY num_players DESC LIMIT 3;"}
{"question": "What is the total salary for each team in the NBA, excluding teams with missing salary data", "sql": "SELECT team, SUM(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) AS total_salary FROM nba_roster WHERE SALARY!= '--' GROUP BY team ORDER BY total_salary DESC;"}
{"question": "Which team has the most players under the age of 25", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE AGE <= 25 GROUP BY team ORDER BY num_players DESC;"}
{"question": "What is the average age of players in the NBA who are older than 5 years", "sql": "SELECT AVG(AGE) AS average_age FROM nba_roster WHERE AGE * 12 > 60;"}
{"question": "What team pays its players the most, on average", "sql": "SELECT team, AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) AS average_salary FROM nba_roster WHERE SALARY!= '--' GROUP BY team ORDER BY average_salary DESC LIMIT 1;"}
{"question": "Who is the highest paid center on the Dallas Mavericks who is older than 5 years old", "sql": "SELECT name, salary FROM nba_roster WHERE team='Dallas Mavericks' AND POS='C' AND SALARY!= '--' AND age > 5 ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "Who is the highest-paid Power Forward on the Chicago Bulls", "sql": "SELECT name, salary FROM nba_roster WHERE team='Chicago Bulls' AND POS='PF' AND SALARY!='--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "How many players are currently on the Toronto Raptors' roster", "sql": "SELECT COUNT(*) FROM nba_roster WHERE Team = 'Toronto Raptors';"}
{"question": "How many players in the NBA are over the age of 30", "sql": "SELECT COUNT(*) AS num_players FROM nba_roster WHERE AGE > 30;"}
{"question": "What is the most common position among players 25 or older in the NBA", "sql": "SELECT POS, COUNT(*) AS count FROM nba_roster WHERE AGE >= 25 GROUP BY POS ORDER BY count DESC LIMIT 1;"}
{"question": "What is the jersey number of the player with the 75th percentile of jersey numbers in the NBA", "sql": "SELECT CAST(Jersey AS INTEGER) as percentile FROM nba_roster ORDER BY percentile LIMIT 1 OFFSET (SELECT COUNT(*) FROM nba_roster) * 0.75;"}
{"question": "What is the most common position among the Toronto Raptors players", "sql": "SELECT POS, COUNT(*) AS count FROM nba_roster WHERE team='Toronto Raptors' GROUP BY POS ORDER BY count DESC LIMIT 1;"}
{"question": "Which team has the heaviest average weight", "sql": "SELECT team, AVG(CAST(SUBSTR(WT, 1, INSTR(WT,' ')-1) AS INTEGER) + CAST(SUBSTR(WT, INSTR(WT,' ')+1) AS FLOAT)/16) as average_weight FROM nba_roster WHERE WT!= 'NA' GROUP BY team ORDER BY average_weight DESC LIMIT 1;"}
{"question": "Who are the top 3 highest-paid Power Forwards in the NBA", "sql": "SELECT NAME, SALARY FROM nba_roster WHERE POS = 'PF' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 3;"}
{"question": "Which teams have the smallest rosters and what is the average age of their players", "sql": "SELECT team, COUNT(*) AS roster_size, AVG(AGE) AS average_age FROM nba_roster GROUP BY team ORDER BY roster_size ASC;"}
{"question": "Which team has the highest average salary for players who attended college", "sql": "SELECT team, AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as salary FROM nba_roster WHERE COLLEGE!= '--' GROUP BY team ORDER BY salary DESC LIMIT 1;"}
{"question": "Which team has the shortest average height among players 25 years old or younger", "sql": "SELECT team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height FROM nba_roster WHERE AGE <= 25 GROUP BY team ORDER BY height ASC LIMIT 1;"}
{"question": "Which three teams have the tallest players on average", "sql": "SELECT team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as average_height FROM nba_roster WHERE HT!= 'NA' GROUP BY team ORDER BY average_height DESC LIMIT 3;"}
{"question": "Who are the top 3 players in the league by salary, excluding those who did not attend college", "sql": "SELECT name, SALARY FROM nba_roster WHERE COLLEGE!= '--' ORDER BY CAST(SUBSTRING(SALARY, 2) AS INTEGER) DESC LIMIT 3;"}
{"question": "Which five teams have the oldest average age among their players", "sql": "SELECT TEAM, AVG(AGE) as avg_age FROM nba_roster WHERE POS!= '--' GROUP BY TEAM ORDER BY avg_age DESC LIMIT 5;"}
{"question": "Which three teams in the NBA have the highest average salary among their players", "sql": "SELECT team, AVG(CAST(SUBSTRING(SALARY, 2, LENGTH(SALARY)-2) AS INTEGER)) AS avg_salary FROM nba_roster WHERE SALARY!= '--' GROUP BY team ORDER BY avg_salary DESC LIMIT 3;"}
{"question": "Who is the highest-paid player in the NBA who did not attend college", "sql": "SELECT name, SALARY FROM nba_roster WHERE SALARY!= '--' AND COLLEGE = '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "What is the average age of players in the Toronto Raptors", "sql": "SELECT AVG(AGE) FROM nba_roster WHERE TEAM = 'Toronto Raptors';"}
{"question": "What is the player with the highest jersey number that is not 'NA'", "sql": "SELECT MAX(Jersey) as jersey_num, name FROM nba_roster WHERE Jersey!= 'NA' GROUP BY name ORDER BY jersey_num DESC LIMIT 1;"}
{"question": "Who is the youngest player in the NBA", "sql": "SELECT name FROM nba_roster ORDER BY AGE ASC LIMIT 1;"}
{"question": "What is the number of players in the NBA who are older than 5 years old", "sql": "SELECT COUNT(*) AS num_players FROM nba_roster WHERE AGE > 5;"}
{"question": "Who is the highest-paid player on the Los Angeles Lakers", "sql": "SELECT name, salary FROM nba_roster WHERE team='Los Angeles Lakers' AND SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "Which colleges tend to produce the oldest players in the NBA", "sql": "SELECT COLLEGE, AVG(AGE) AS average_age FROM nba_roster WHERE COLLEGE!= '--' GROUP BY COLLEGE ORDER BY average_age DESC;"}
{"question": "What percentage of players in the NBA play each position", "sql": "SELECT POS, COUNT(*) as count, ROUND(COUNT(*)*100.0/(SELECT COUNT(*) FROM nba_roster),2) as percentage FROM nba_roster WHERE POS!= '--' GROUP BY POS ORDER BY percentage DESC;"}
{"question": "What are the top 10 teams with the most players in the NBA", "sql": "SELECT Team, COUNT(*) as num_players FROM nba_roster GROUP BY Team ORDER BY num_players DESC LIMIT 10;"}
{"question": "What is the average age of players in the NBA who are older than the average age of all players in the league plus 5 years", "sql": "SELECT AVG(AGE) as average_age FROM nba_roster WHERE AGE > (SELECT AVG(AGE) FROM nba_roster) + 5;"}
{"question": "Which team has the most players who are older than the average age of all players in the NBA plus 5 years", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE AGE > (SELECT AVG(AGE) FROM nba_roster) + 5 GROUP BY team ORDER BY num_players DESC LIMIT 1;"}
{"question": "What are the average height and weight for each team in the NBA", "sql": "SELECT team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as avg_height, AVG(CAST(SUBSTR(WT, 1, INSTR(WT,' ')) as INTEGER)) as avg_weight FROM nba_roster GROUP BY team;"}
{"question": "What are the top 3 teams with the highest average salary", "sql": "SELECT Team, AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) AS avg_salary FROM nba_roster GROUP BY Team ORDER BY avg_salary DESC LIMIT 3;"}
{"question": "What position has the most players in the NBA roster", "sql": "SELECT POS, COUNT(*) AS count, POS FROM nba_roster GROUP BY POS ORDER BY count DESC LIMIT 1;"}
{"question": "What is the age of the 75th percentile of NBA players", "sql": "SELECT age FROM nba_roster WHERE AGE!= '--' ORDER BY age LIMIT 1 OFFSET (SELECT COUNT(*) FROM nba_roster WHERE AGE!= '--')*75/100-1;"}
{"question": "What is the average age and salary of NBA players, excluding those with unknown salaries", "sql": "SELECT AVG(AGE) AS average_age, AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) AS average_salary FROM nba_roster WHERE SALARY!= '--';"}
{"question": "What is the average age of players in each position group in the NBA", "sql": "SELECT POS, AVG(AGE) AS avg_age FROM nba_roster WHERE POS IN ('PG', 'SG', 'SF', 'PF', 'C') GROUP BY POS;"}
{"question": "What team has the most players at the point guard position", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE POS='PG' GROUP BY team ORDER BY num_players DESC LIMIT 1;"}
{"question": "What is the name of the heaviest player on the Los Angeles Lakers", "sql": "SELECT name FROM nba_roster WHERE team='Los Angeles Lakers' AND WT=(SELECT MAX(WT) FROM nba_roster WHERE team='Los Angeles Lakers');"}
{"question": "Who are the top 5 players in the NBA in terms of salary-to-age ratio", "sql": "SELECT name, CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) as salary, AGE FROM nba_roster WHERE SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)/AGE DESC LIMIT 5;"}
{"question": "Which NBA teams have the most players who attended college", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE COLLEGE!='--' GROUP BY team ORDER BY num_players DESC;"}
{"question": "What is the highest paid player for each position in the NBA", "sql": "SELECT pos, name, MAX(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as max_salary FROM nba_roster WHERE SALARY!= '--' GROUP BY pos ORDER BY pos;"}
{"question": "Which NBA teams have the most players", "sql": "SELECT Team, COUNT(*) as count FROM nba_roster GROUP BY Team ORDER BY count DESC;"}
{"question": "What is the position with the most players under the age of 25 in the NBA", "sql": "SELECT POS, COUNT(*) as count FROM nba_roster WHERE AGE <= 25 GROUP BY POS ORDER BY count DESC LIMIT 1;"}
{"question": "What players in the NBA have a height greater than or equal to 6 feet 7 inches", "sql": "SELECT NAME FROM nba_roster WHERE CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12 >= 6.67;"}
{"question": "Who are the top 3 highest-paid players under the age of 25 in the NBA", "sql": "SELECT NAME, SALARY FROM nba_roster WHERE AGE < 25 ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 3;"}
{"question": "What are the names of all the players on the Toronto Raptors who are 25 years or older", "sql": "SELECT name FROM nba_roster WHERE age >= 25 AND team = 'Toronto Raptors';"}
{"question": "What is the position with the shortest average height in the NBA", "sql": "SELECT pos, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height, COUNT(*) as count FROM nba_roster GROUP BY pos ORDER BY height ASC LIMIT 1;"}
{"question": "What is the average age of the players on the Memphis Grizzlies", "sql": "SELECT AVG(AGE) FROM nba_roster WHERE team='Memphis Grizzlies';"}
{"question": "What are the average ages of the players on each NBA team, listed from youngest to oldest", "sql": "SELECT team, AVG(AGE) as average_age FROM nba_roster GROUP BY team ORDER BY average_age ASC;"}
{"question": "What is the average age and height for each position in the NBA", "sql": "SELECT POS, AVG(AGE) AS avg_age, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) AS avg_height FROM nba_roster GROUP BY POS;"}
{"question": "What is the highest-paid player in the NBA", "sql": "SELECT name, SALARY FROM nba_roster WHERE SALARY!= '--' ORDER BY CAST(SUBSTR(SALARY, 2) AS INTEGER) DESC LIMIT 1;"}
{"question": "Which team has the most players 25 or older", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE AGE >= 25 GROUP BY team ORDER BY num_players DESC LIMIT 1;"}
{"question": "What is the average age of NBA players who are at least 6 feet 7 inches tall", "sql": "SELECT AVG(AGE) FROM nba_roster WHERE CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12 >= 6.67;"}
{"question": "What are all the players in the NBA whose last name is Johnson", "sql": "SELECT * FROM nba_roster WHERE NAME LIKE '%Johnson';"}
{"question": "What is the average salary for players from each college, and which colleges produce the most highly paid NBA players", "sql": "SELECT COLLEGE, AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as avg_salary FROM nba_roster WHERE COLLEGE!= '--' GROUP BY COLLEGE ORDER BY avg_salary DESC;"}
{"question": "Who are the top 3 highest-paid players on the Los Angeles Lakers", "sql": "SELECT name, SALARY FROM nba_roster WHERE team='Los Angeles Lakers' ORDER BY CAST(SUBSTRING(SALARY, 2) AS INTEGER) DESC LIMIT 3;"}
{"question": "What is the average height of all NBA players who are 25 years old or younger", "sql": "SELECT AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)) as average_height FROM nba_roster WHERE AGE <= 25;"}
{"question": "What college has the most players in the NBA", "sql": "SELECT COLLEGE, COUNT(*) AS COUNT FROM nba_roster WHERE COLLEGE!= '--' GROUP BY COLLEGE ORDER BY COUNT(*) DESC LIMIT 1;"}
{"question": "Who are the 25-year-old players on the Toronto Raptors", "sql": "SELECT name FROM nba_roster WHERE team='Toronto Raptors' AND age=25;"}
{"question": "Who is the highest-paid player in the NBA who attended college", "sql": "SELECT name, SALARY FROM nba_roster WHERE COLLEGE!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "What college and position combination has the most players in the NBA", "sql": "SELECT COLLEGE, POS, COUNT(*) as count FROM nba_roster WHERE COLLEGE!= '--' GROUP BY COLLEGE, POS ORDER BY count DESC LIMIT 1;"}
{"question": "Who is the heaviest player in the NBA roster", "sql": "SELECT name, WT, CAST(SUBSTR(WT, 1, INSTR(WT,' ')-1) AS INTEGER) as weight FROM nba_roster WHERE WT!= 'NA' ORDER BY weight DESC LIMIT 1;"}
{"question": "What is the average height of players on each team, excluding those under 25 and with unknown heights", "sql": "SELECT team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER) + CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as avg_height FROM nba_roster WHERE HT!= 'NA' AND age > 25 GROUP BY team;"}
{"question": "What is the average salary of NBA players over the age of 25", "sql": "SELECT AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as average_salary FROM nba_roster WHERE AGE > 25 AND SALARY!= '--';"}
{"question": "What are the 5 oldest players in the NBA", "sql": "SELECT NAME, AGE FROM nba_roster WHERE AGE != '--' ORDER BY AGE DESC LIMIT 5;"}
{"question": "Which team has the most players over the age of 5 in the NBA", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE age > 5 GROUP BY team ORDER BY num_players DESC LIMIT 1;"}
{"question": "Who is the highest-paid player in the NBA, excluding those under the age of 6 and those with unknown salaries", "sql": "SELECT name, team FROM nba_roster WHERE age > 5 AND SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "What is the average height and weight of players on each NBA team", "sql": "SELECT team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as avg_height, AVG(CAST(SUBSTR(WT, 1, INSTR(WT,' ')) AS INTEGER)) as avg_weight FROM nba_roster GROUP BY team;"}
{"question": "Which positions in the NBA have the most players and which positions have the oldest players on average", "sql": "SELECT POS, COUNT(*) as count, AVG(AGE) as average_age FROM nba_roster GROUP BY POS ORDER BY count DESC;"}
{"question": "What is the position with the tallest players in the NBA", "sql": "SELECT POS, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)) as avg_height FROM nba_roster GROUP BY POS ORDER BY avg_height DESC LIMIT 1;"}
{"question": "What are the top 3 tallest players in the NBA", "sql": "SELECT NAME, HT, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height FROM nba_roster GROUP BY NAME, HT ORDER BY height DESC LIMIT 3;"}
{"question": "Who is the highest-paid player on the Toronto Raptors with a jersey number greater than 10", "sql": "SELECT name, salary FROM nba_roster WHERE team='Toronto Raptors' AND CAST(Jersey AS INTEGER) > 10 AND SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "Which teams have the most players in their roster", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster GROUP BY team ORDER BY num_players DESC;"}
{"question": "What is the average salary of all NBA players, excluding those who are not paid or have an unknown position", "sql": "SELECT AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as average_salary FROM nba_roster WHERE SALARY!= '--' AND POS!= 'NA';"}
{"question": "Which team has invested the most in young talent, with an average salary for players 5 years or less younger than the average age of all players", "sql": "SELECT team, AVG(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as average_salary FROM nba_roster WHERE AGE <= (SELECT AVG(AGE) FROM nba_roster) * 5 GROUP BY team ORDER BY average_salary DESC LIMIT 1;"}
{"question": "Which 5 teams have the most players who have publicly disclosed their college information", "sql": "SELECT team, COUNT(*) as num_players FROM nba_roster WHERE COLLEGE!= '--' GROUP BY team ORDER BY num_players DESC LIMIT 5;"}
{"question": "What is the average age of players by position in the NBA", "sql": "SELECT POS, AVG(AGE) as average_age FROM nba_roster GROUP BY POS ORDER BY average_age ASC;"}
{"question": "What is the average height of the tallest positions in the NBA", "sql": "SELECT POS, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)) as avg_height FROM nba_roster GROUP BY POS ORDER BY avg_height DESC;"}
{"question": "What is the number of players on the Chicago Bulls who are 25 years old or younger", "sql": "SELECT COUNT(*) FROM nba_roster WHERE team='Chicago Bulls' AND AGE <= 25;"}
{"question": "What are the average heights for each position in the NBA, and which position has the tallest players on average", "sql": "SELECT pos, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)) as avg_height, COUNT(*) as count FROM nba_roster WHERE HT!= 'NA' GROUP BY pos ORDER BY avg_height DESC;"}
{"question": "Which team has the oldest average age among its guards and forwards", "sql": "SELECT team, AVG(AGE) AS average_age FROM nba_roster WHERE POS IN ('PG', 'SG', 'SF', 'PF', 'C') GROUP BY team ORDER BY average_age DESC LIMIT 1;"}
{"question": "Who is the pointguard for the Golden State Warriors?", "sql": "select name from nba_roster where team='Golden State Warriors' and POS='PG';"}
{"question": "What is the number of players on the Chicago Bulls who are 25 years old or younger", "sql": "SELECT COUNT(*) FROM nba_roster WHERE team='Chicago Bulls' AND AGE <= 25;"}
{"question": "Who is the highest-paid player on the Los Angeles Lakers", "sql": "SELECT NAME, SALARY FROM nba_roster WHERE team='Los Angeles Lakers' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "Who is the highest paid player in the NBA?", "sql": "SELECT NAME, salary FROM nba_roster WHERE SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "What team is LaMelo Ball on?", "sql": "select team from nba_roster where name='LaMelo Ball';"}
{"question": "How much does Lonzo Ball weigh?", "sql": "select wt from nba_roster where name='Lonzo Ball';"}
{"question": "What college sent the most players to the current NBA?", "sql": "select college from nba_roster where college != '--'  group by college order by count(*) desc limit 1;"}
{"question": "How old is Lebron James?", "sql": "select age from nba_roster where name='LeBron James';"}
{"question": "What is the most popular jersey number in the current NBA?", "sql": "select Jersey from nba_roster where Jersey != 'NA' group by Jersey order by count(*) desc limit 1;"}
{"question": "Can you give me a list of all the players without college data?", "sql": "SELECT name FROM nba_roster WHERE COLLEGE IS NULL OR COLLEGE = '--';"}
{"question": "What team has the smallest roster?", "sql": "select team from nba_roster group by team order by count(*) asc limit 1;"}
{"question": "What team has the largest roster?", "sql": "select team, count(*) from nba_roster group by team order by count(*) desc limit 1;"}
{"question": "What team is paying its players the most in total?", "sql": "select team, sum(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) from nba_roster group by team order by sum(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) desc limit 1;"}
{"question": "Which team is paying its players the least?", "sql": "select team from nba_roster group by team order by sum(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) asc limit 1;"}
{"question": "Which team is on average the tallest?", "sql": "select team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height from nba_roster group by team order by height desc limit 1;"}
{"question": "Which team is on average the shortest?", "sql": "select team, AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height from nba_roster group by team order by height asc limit 1;"}
{"question": "Who are the tallest 5 centers in the league?", "sql": "SELECT name, HT FROM nba_roster WHERE POS = 'C' ORDER BY HT DESC LIMIT 5;"}
{"question": "Who are the top 5 highest paid power forwards in the league?", "sql": "SELECT NAME, salary FROM nba_roster WHERE POS = 'PF' AND SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 5;"}
{"question": "What is the median salary in the NBA?", "sql": "SELECT (CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as percentile FROM nba_roster WHERE SALARY!= '--' order by percentile limit 1 offset (select count(*) from nba_roster where SALARY != '--')*50/100-1;"}
{"question": "What is the average salary in the NBA?", "sql": "SELECT avg(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as percentile FROM nba_roster WHERE SALARY!= '--';"}
{"question": "What is the 99th percentile salary in the NBA?", "sql": "SELECT (CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as percentile FROM nba_roster WHERE SALARY!= '--' order by percentile limit 1 offset (select count(*) from nba_roster where SALARY != '--')*99/100-1;"}
{"question": "What is the 75th percentile salary in the NBA?", "sql": "SELECT (CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as percentile FROM nba_roster WHERE SALARY!= '--' order by percentile limit 1 offset (select count(*) from nba_roster where SALARY != '--')*75/100-1;"}
{"question": "What is the 25th percentile salary in the NBA?", "sql": "SELECT (CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as percentile FROM nba_roster WHERE SALARY!= '--' order by percentile limit 1 offset (select count(*) from nba_roster where SALARY != '--')*25/100-1;"}
{"question": "What is the median weight in the NBA?", "sql": "select CAST(SUBSTR(WT, 1, INSTR(WT,' ')) as INTEGER) as percentile from nba_roster order by percentile limit 1 offset (select count(*) from nba_roster)*50/100-1;"}
{"question": "What is the average weight in the NBA?", "sql": "SELECT AVG(CAST(SUBSTR(WT, 1, INSTR(WT,' ')) as INTEGER)) FROM nba_roster;"}
{"question": "What is the median height in the NBA?", "sql": "select CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12 as percentile from nba_roster order by percentile limit 1 offset (select count(*) from nba_roster)*50/100-1;"}
{"question": "What is the average height in the NBA?", "sql": "select AVG(CAST(SUBSTR(HT, 1, INSTR(HT,' ')-1) AS INTEGER)+ CAST(SUBSTR(HT, INSTR(HT,' ')+1) AS FLOAT)/12) as height from nba_roster;"}
{"question": "Can you tell me how many players are in the NBA?", "sql": "select count(*) from nba_roster;"}
{"question": "Would you please let me know what the highest paid players are for each position?", "sql": "SELECT name, pos, MAX(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as max_salary FROM nba_roster WHERE SALARY!= '--' GROUP BY POS;"}
{"question": "Is Jalen Johnson 23 years old?", "sql" : "Select name, age from nba_roster where name='Jalen Johnson';"}
{"question": "Who is the oldest player on the Brooklyn Nets?", "sql" : "SELECT NAME FROM nba_roster WHERE TEAM = 'Brooklyn Nets' AND AGE = (SELECT MAX(AGE) FROM nba_roster WHERE TEAM = 'Brooklyn Nets');"}
{"question": "Who has the highest salary on the Memphis Grizzlies?", "sql" : "select salary, name from nba_roster where team='Memphis Grizzlies' and SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "Which player has the highest salary on the Cleveland Cavaliers?", "sql" : "select salary, name from nba_roster where team='Cleveland Cavaliers' and SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "Who is the highest paid center on the Dallas Mavericks?", "sql" : "select salary, name from nba_roster where team='Dallas Mavericks' and POS='C' and SALARY!= '--' ORDER BY CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER) DESC LIMIT 1;"}
{"question": "How much is Marcus Smart getting paid?", "sql" : "select salary from nba_roster where name='Marcus Smart';"}
{"question": "What's the average age of the Trail Blazers?", "sql" : "select avg(age) from nba_roster where team='Portland Trail Blazers';"}
{"question": "What's the median age of the NBA?", "sql": "select CAST(AGE as INTEGER) as percentile from nba_roster order by percentile limit 1 offset (select count(*) from nba_roster)*50/100-1;"}
{"question": "What's the median age of the Miami Heat?", "sql": "select CAST(AGE as INTEGER) as percentile from nba_roster where team='Miami Heat' order by percentile limit 1 offset (select count(*) from nba_roster where team='Miami Heat')*50/100-1;"}
{"question": "What are the 5 teams with the oldest average age in the NBA", "sql": "SELECT team, AVG(AGE) AS average_age FROM nba_roster GROUP BY team ORDER BY average_age DESC LIMIT 5;"}
{"question": "What is the average salary of Power Forward players in the NBA", "sql": "select avg(CAST(REPLACE(REPLACE(SALARY, '$', ''), ',','') AS INTEGER)) as average_salary from nba_roster where POS = 'PF';"}