chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Name the lowest Rank of carmelita jeter with a Time smaller than 11.08?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"heat_2\" WHERE \"name\"='carmelita jeter' AND \"time\"<11.08;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: When the points are 98 what is the draw?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"results\" WHERE \"points\"=98;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What is the TOTAL Time in Office with a rank smaller than 18, and premier is Joh Bjelke-Petersen?" }, { "role": "assistant", "content": "SELECT \"total_time_in_office\" FROM \"rank_by_time_in_office\" WHERE \"rank\"<18 AND \"premier\"='joh bjelke-petersen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What is the assumed Office date when the TOTAL Time in Office is 5years, 316days?" }, { "role": "assistant", "content": "SELECT \"assumed_office\" FROM \"rank_by_time_in_office\" WHERE \"total_time_in_office\"='5years, 316days';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"akakios_kakiasvilis_gre\" text,\n \"188kg\" text,\n \"athens_greece\" text\n);\n\nQuestion: What Akakios Kakiasvilis (GRE) is 187kg the 188kg?" }, { "role": "assistant", "content": "SELECT \"akakios_kakiasvilis_gre\" FROM \"records\" WHERE \"188kg\"='187kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"akakios_kakiasvilis_gre\" text,\n \"188kg\" text,\n \"athens_greece\" text\n);\n\nQuestion: What world record has the 188kg as 187kg?" }, { "role": "assistant", "content": "SELECT \"world_record\" FROM \"records\" WHERE \"188kg\"='187kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"akakios_kakiasvilis_gre\" text,\n \"188kg\" text,\n \"athens_greece\" text\n);\n\nQuestion: For what 188kg is the world record clean & jerk?" }, { "role": "assistant", "content": "SELECT \"188kg\" FROM \"records\" WHERE \"world_record\"='clean & jerk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_16_4_titles_12_runner_ups\" (\n \"outcome\" text,\n \"year\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What year had a score of 6\u20137(5), 2\u20136 and opponent of Brenda Schultz-Mccarthy?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"singles_16_4_titles_12_runner_ups\" WHERE \"opponent_in_the_final\"='brenda schultz-mccarthy' AND \"score\"='6\u20137(5), 2\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_16_4_titles_12_runner_ups\" (\n \"outcome\" text,\n \"year\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What year had a score of 4\u20136, 7\u20136, 7\u20135?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"singles_16_4_titles_12_runner_ups\" WHERE \"score\"='4\u20136, 7\u20136, 7\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_second_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: Who was the away team for the match with a home team of Citizen Team A?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"a_b_second_round\" WHERE \"home_team\"='citizen team a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_second_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the score for the match with a home team of Citizen Team A?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"a_b_second_round\" WHERE \"home_team\"='citizen team a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_second_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: Who was the home team in the match that had an away team of Convoy Sun Hei Team B?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"a_b_second_round\" WHERE \"away_team\"='convoy sun hei team b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_second_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What time did the match with an away team of Happy Valley Team B start?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"a_b_second_round\" WHERE \"away_team\"='happy valley team b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg when second team is Sumykhimprom?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"first_qualifying_round\" WHERE \"team_num2\"='sumykhimprom';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the agg when the seconf leg is 58-75?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"first_qualifying_round\" WHERE \"2nd_leg\"='58-75';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the first team when the 2nd leg is 100-113?" }, { "role": "assistant", "content": "SELECT \"team_num1\" FROM \"first_qualifying_round\" WHERE \"2nd_leg\"='100-113';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is team 1 when the 1st leg is 92-82?" }, { "role": "assistant", "content": "SELECT \"team_num1\" FROM \"first_qualifying_round\" WHERE \"1st_leg\"='92-82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is team number 1 when then 2nd leg is 64-97?" }, { "role": "assistant", "content": "SELECT \"team_num1\" FROM \"first_qualifying_round\" WHERE \"2nd_leg\"='64-97';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg when team number 1 is CSU SIBIU?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"first_qualifying_round\" WHERE \"team_num1\"='csu sibiu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"duration\" (\n \"term_abroad\" text,\n \"2000_01\" real,\n \"2001_02\" real,\n \"2002_03\" real,\n \"2003_04\" real,\n \"2004_05\" real,\n \"2005_06\" real,\n \"2006_07\" real,\n \"2007_08\" real,\n \"2008_09\" real\n);\n\nQuestion: What is the average duration in 2007/08 with more than 3.8 in 2002/03, more than 8.9 in 2003/04, and less than 34.4 in 2001/02?" }, { "role": "assistant", "content": "SELECT AVG(\"2007_08\") FROM \"duration\" WHERE \"2002_03\">3.8 AND \"2003_04\">8.9 AND \"2001_02\"<34.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"duration\" (\n \"term_abroad\" text,\n \"2000_01\" real,\n \"2001_02\" real,\n \"2002_03\" real,\n \"2003_04\" real,\n \"2004_05\" real,\n \"2005_06\" real,\n \"2006_07\" real,\n \"2007_08\" real,\n \"2008_09\" real\n);\n\nQuestion: What is the total duration in 2006/07 with 191,321 in 2003/04 and less than 160,920 in 2001/02?" }, { "role": "assistant", "content": "SELECT COUNT(\"2006_07\") FROM \"duration\" WHERE \"2003_04\"='191,321' AND \"2001_02\"<'160,920';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Time/Retired has Laps smaller than 100, and Points larger than 0?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"<100 AND \"points\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Laps have a Time/Retired of + 4 laps, and a Grid larger than 18?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"time_retired\"='+ 4 laps' AND \"grid\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Team has Laps of 100, and a Time/Retired of +8.6 secs?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race\" WHERE \"laps\"=100 AND \"time_retired\"='+8.6 secs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_runs\" (\n \"player\" text,\n \"matches\" text,\n \"runs\" text,\n \"balls\" text,\n \"strike_rate\" text,\n \"average\" text,\n \"100s\" text\n);\n\nQuestion: What runs has 11 matches, and 2 as the 100s?" }, { "role": "assistant", "content": "SELECT \"runs\" FROM \"most_runs\" WHERE \"matches\"='11' AND \"100s\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_runs\" (\n \"player\" text,\n \"matches\" text,\n \"runs\" text,\n \"balls\" text,\n \"strike_rate\" text,\n \"average\" text,\n \"100s\" text\n);\n\nQuestion: What matches is 2 the 100s?" }, { "role": "assistant", "content": "SELECT \"matches\" FROM \"most_runs\" WHERE \"100s\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_runs\" (\n \"player\" text,\n \"matches\" text,\n \"runs\" text,\n \"balls\" text,\n \"strike_rate\" text,\n \"average\" text,\n \"100s\" text\n);\n\nQuestion: What strike rate is 9 the matches?" }, { "role": "assistant", "content": "SELECT \"strike_rate\" FROM \"most_runs\" WHERE \"matches\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_runs\" (\n \"player\" text,\n \"matches\" text,\n \"runs\" text,\n \"balls\" text,\n \"strike_rate\" text,\n \"average\" text,\n \"100s\" text\n);\n\nQuestion: Which player has 79.62 as the strike rate?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"most_runs\" WHERE \"strike_rate\"='79.62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_runs\" (\n \"player\" text,\n \"matches\" text,\n \"runs\" text,\n \"balls\" text,\n \"strike_rate\" text,\n \"average\" text,\n \"100s\" text\n);\n\nQuestion: With 10 as matches, and 469 runs, what is the strike rate?" }, { "role": "assistant", "content": "SELECT \"strike_rate\" FROM \"most_runs\" WHERE \"matches\"='10' AND \"runs\"='469';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_runs\" (\n \"player\" text,\n \"matches\" text,\n \"runs\" text,\n \"balls\" text,\n \"strike_rate\" text,\n \"average\" text,\n \"100s\" text\n);\n\nQuestion: When the strike rate is 70.10, what is the balls?" }, { "role": "assistant", "content": "SELECT \"balls\" FROM \"most_runs\" WHERE \"strike_rate\"='70.10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"event\" text,\n \"heat_semifinal_final\" text,\n \"nation\" text,\n \"time\" text\n);\n\nQuestion: What nation has a time of 51.35 in the final heat?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"records\" WHERE \"time\"='51.35' AND \"heat_semifinal_final\"='final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"event\" text,\n \"heat_semifinal_final\" text,\n \"nation\" text,\n \"time\" text\n);\n\nQuestion: Which heat, semifinal or final has a time of 48.97?" }, { "role": "assistant", "content": "SELECT \"heat_semifinal_final\" FROM \"records\" WHERE \"time\"='48.97';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"event\" text,\n \"heat_semifinal_final\" text,\n \"nation\" text,\n \"time\" text\n);\n\nQuestion: What heat, semifinal or final has a time of 25.00?" }, { "role": "assistant", "content": "SELECT \"heat_semifinal_final\" FROM \"records\" WHERE \"time\"='25.00';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"event\" text,\n \"heat_semifinal_final\" text,\n \"nation\" text,\n \"time\" text\n);\n\nQuestion: What date was the men's 100m breaststroke in heat 6?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"records\" WHERE \"event\"='men''s 100m breaststroke' AND \"heat_semifinal_final\"='heat 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"4_00\" text,\n \"result\" text\n);\n\nQuestion: Marion Buisson with a 4.00 of o had what result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"qualifying_round\" WHERE \"4_00\"='o' AND \"name\"='marion buisson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"4_00\" text,\n \"result\" text\n);\n\nQuestion: Anastasija Reiberger from Germany had what 4.00?" }, { "role": "assistant", "content": "SELECT \"4_00\" FROM \"qualifying_round\" WHERE \"nationality\"='germany' AND \"name\"='anastasija reiberger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"4_00\" text,\n \"result\" text\n);\n\nQuestion: Alana Boyd of group B with a 4.30 result has what nationality?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"qualifying_round\" WHERE \"group\"='b' AND \"result\"='4.30' AND \"name\"='alana boyd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"4_00\" text,\n \"result\" text\n);\n\nQuestion: Roslinda Samsu has what nationality?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"qualifying_round\" WHERE \"name\"='roslinda samsu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"4_00\" text,\n \"result\" text\n);\n\nQuestion: What nation is Marion Buisson playing for?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"qualifying_round\" WHERE \"name\"='marion buisson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who is the rower from Canada?" }, { "role": "assistant", "content": "SELECT \"rowers\" FROM \"heat_1\" WHERE \"country\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the sum of the rank of the rower with an r note from Australia?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"heat_1\" WHERE \"notes\"='r' AND \"country\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the country with a rank less than 2?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"heat_1\" WHERE \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_1\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What notes did Gabriella Bascelli receive?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"quarterfinal_1\" WHERE \"athlete\"='gabriella bascelli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_1\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What rank did the time of 7:31.90 receive?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"quarterfinal_1\" WHERE \"time\"='7:31.90';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2005_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Romaji Title has a Japanese Title of \u5973\u738b\u306e\u6559\u5ba4?" }, { "role": "assistant", "content": "SELECT \"romaji_title\" FROM \"2005_summer_season\" WHERE \"japanese_title\"='\u5973\u738b\u306e\u6559\u5ba4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2005_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: How many Episodes have a Romaji Title of slow dance?" }, { "role": "assistant", "content": "SELECT SUM(\"episodes\") FROM \"2005_summer_season\" WHERE \"romaji_title\"='slow dance';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2005_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: How many Episodes have a Romaji Title of dragon zakura?" }, { "role": "assistant", "content": "SELECT COUNT(\"episodes\") FROM \"2005_summer_season\" WHERE \"romaji_title\"='dragon zakura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" real\n);\n\nQuestion: Which Format has a Label of columbia, and a Catalog smaller than 88697411432, and a Date of october 24, 2008?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='columbia' AND \"catalog\"<88697411432 AND \"date\"='october 24, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" real\n);\n\nQuestion: Which Catalog has a Date of july 15, 2011?" }, { "role": "assistant", "content": "SELECT AVG(\"catalog\") FROM \"release_history\" WHERE \"date\"='july 15, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which opponent was on July 21, 2008?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_5\" WHERE \"date\"='july 21, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the date of the tournament with a clay surface and an opponent of Irina Falconi?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_5\" WHERE \"surface\"='clay' AND \"opponent\"='irina falconi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent on May 10, 2009?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_5\" WHERE \"date\"='may 10, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score of the home team, bath city?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='bath city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score for the away team southport?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"away_team\"='southport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the home team that had an away team of lincoln city?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"away_team\"='lincoln city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date had a game with wycombe wanderers as the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"away_team\"='wycombe wanderers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarter_final_1_10_january_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: How many places have an Artist of august\u0117, and a Draw smaller than 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"quarter_final_1_10_january_2009\" WHERE \"artist\"='august\u0117' AND \"draw\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_men\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What is the latest year the world championships were held in Thun?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"world_championships_men\" WHERE \"place\"='thun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_men\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won gold when the world championships were held in Phoenix?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"world_championships_men\" WHERE \"place\"='phoenix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the smallest ANSI code for adler township when Longitude is more than -101.333926, GEO ID is less than 3806700900, and Land ( sqmi ) is more than 35.84?" }, { "role": "assistant", "content": "SELECT MIN(\"ansi_code\") FROM \"a\" WHERE \"longitude\">-101.333926 AND \"geo_id\"<3806700900 AND \"township\"='adler' AND \"land_sqmi\">35.84;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: Cass county has 0.008 Water (sqmi), less than 35.874 Land (sqmi), more than 35 Pop. (2010), and what average latitude?" }, { "role": "assistant", "content": "SELECT AVG(\"latitude\") FROM \"a\" WHERE \"land_sqmi\"<35.874 AND \"pop_2010\">35 AND \"county\"='cass' AND \"water_sqmi\"=0.008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: In what county is the latitude less than 46.935364 and GEO ID is 3801700500?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"a\" WHERE \"latitude\"<46.935364 AND \"geo_id\"=3801700500;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game with a score of 35-14?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"score\"='35-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the result of the game when the record was 5-1?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"record\"='5-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the result of the game against the Los Angeles Dons?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='los angeles dons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: Which Year has a Venue of bydgoszcz, poland, and an Event of junior team?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"venue\"='bydgoszcz, poland' AND \"event\"='junior team';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: Which Venue has a Year smaller than 2009, and an Event of 3000 m, and a Competition of world youth championships?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"<2009 AND \"event\"='3000 m' AND \"competition\"='world youth championships';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: Which Year has a Competition of commonwealth youth games?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"competition\"='commonwealth youth games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the total for 1986?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"references\" WHERE \"year\"=1986;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the name before 1954 with more than 15 floors?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"references\" WHERE \"year\"<1954 AND \"floors\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the lowest rank for El Paso Natural Gas Company Building?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"references\" WHERE \"name\"='el paso natural gas company building';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_data\" (\n \"rank\" text,\n \"province\" text,\n \"population_2011\" real,\n \"percentage\" real,\n \"population_estimate_2013\" real\n);\n\nQuestion: What is the lowest 2013 population estimate of south africa, which has a percentage greater than 19.8 and a 2011 population greater than 51,770,561?" }, { "role": "assistant", "content": "SELECT MIN(\"population_estimate_2013\") FROM \"historical_data\" WHERE \"percentage\">19.8 AND \"province\"='south africa' AND \"population_2011\">'51,770,561';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_data\" (\n \"rank\" text,\n \"province\" text,\n \"population_2011\" real,\n \"percentage\" real,\n \"population_estimate_2013\" real\n);\n\nQuestion: What is the rank of the gauteng province?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"historical_data\" WHERE \"province\"='gauteng';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_data\" (\n \"rank\" text,\n \"province\" text,\n \"population_2011\" real,\n \"percentage\" real,\n \"population_estimate_2013\" real\n);\n\nQuestion: What is the lowest 2013 population estimate of the province with a 23.7 percentage?" }, { "role": "assistant", "content": "SELECT MIN(\"population_estimate_2013\") FROM \"historical_data\" WHERE \"percentage\"=23.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_teams\" (\n \"team\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"years_won\" text,\n \"years_runner_up\" text\n);\n\nQuestion: What year(s) was Duisburg runner-up?" }, { "role": "assistant", "content": "SELECT \"years_runner_up\" FROM \"by_teams\" WHERE \"team\"='duisburg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What was the earliest year with a note of 18.04 m wl?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"major_competition_record\" WHERE \"notes\"='18.04 m wl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What venue had a competition of World Junior Championships before 2011?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"major_competition_record\" WHERE \"year\"<2011 AND \"competition\"='world junior championships';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"readers_choice\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who was the developer of Call of Duty: Black Ops?" }, { "role": "assistant", "content": "SELECT \"developer_s\" FROM \"readers_choice\" WHERE \"game\"='call of duty: black ops';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"readers_choice\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the platform for the game of the third-person shooter genre?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"readers_choice\" WHERE \"genre\"='third-person shooter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"readers_choice\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the platform of the game from 2007?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"readers_choice\" WHERE \"year\"=2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"readers_choice\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who was the developer of Resident Evil 4?" }, { "role": "assistant", "content": "SELECT \"developer_s\" FROM \"readers_choice\" WHERE \"game\"='resident evil 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What was the rank of flori lang when his time was less than 22.27" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"heats\" WHERE \"name\"='flori lang' AND \"time\"<22.27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What lane had a heat after 12, a rank of 38 and a time larger than 22.67?" }, { "role": "assistant", "content": "SELECT AVG(\"lane\") FROM \"heats\" WHERE \"heat\">12 AND \"rank\"=38 AND \"time\">22.67;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What game has 27-12 record?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"game_log\" WHERE \"record\"='27-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What date was the record 21-11?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='21-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location/attendance for the w 95-93 score?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"score\"='w 95-93';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location/attendance with a 26-11 record?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"record\"='26-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which opponent has a 26-12 record?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='26-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rower\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is Lee Ka Man's Time?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heat_2\" WHERE \"rower\"='lee ka man';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rower\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Rank of the rower with a Time of 8:23.02?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"heat_2\" WHERE \"time\"='8:23.02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most gold when the rank is 7 and bronze is less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"rank\"='7' AND \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the most gold when the total is 7?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"total\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the least gold when the rank is 10 and silver is less than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"rank\"='10' AND \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the lowest total when the nation is sweden (swe) and silver is less than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"nation\"='sweden (swe)' AND \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the average total when silver is more than 2, bronze is 12 and gold is less than 12?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"silver\">2 AND \"bronze\"=12 AND \"gold\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"n\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the longitude with a latitude of 48.930222 with a Geo ID smaller than 3806755660?" }, { "role": "assistant", "content": "SELECT COUNT(\"longitude\") FROM \"n\" WHERE \"latitude\"=48.930222 AND \"geo_id\"<3806755660;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"n\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the latitude that has a sqmi smaller than 34.401, a Geo ID smaller than 3807157722, and a Longitude of -98.475995?" }, { "role": "assistant", "content": "SELECT \"latitude\" FROM \"n\" WHERE \"land_sqmi\"<34.401 AND \"geo_id\"<3807157722 AND \"longitude\"=-98.475995;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"n\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the total longitude of Nogosek and a GEO ID larger than 3809357060?" }, { "role": "assistant", "content": "SELECT COUNT(\"longitude\") FROM \"n\" WHERE \"township\"='nogosek' AND \"geo_id\">3809357060;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"400_w_sub_bands\" (\n \"band\" real,\n \"frequency_m_hz\" text,\n \"wavelength\" text,\n \"type\" text,\n \"power_w\" real\n);\n\nQuestion: What Band number has a Power (W) of 400 or less?" }, { "role": "assistant", "content": "SELECT SUM(\"band\") FROM \"400_w_sub_bands\" WHERE \"power_w\"<400;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"400_w_sub_bands\" (\n \"band\" real,\n \"frequency_m_hz\" text,\n \"wavelength\" text,\n \"type\" text,\n \"power_w\" real\n);\n\nQuestion: What Band's Power (W) is 400 or less?" }, { "role": "assistant", "content": "SELECT MAX(\"band\") FROM \"400_w_sub_bands\" WHERE \"power_w\">400;" } ]