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 \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the sum of Round, when Nationality is \"United States\", and when Pick is \"125\"?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"nationality\"='united states' AND \"pick\"=125;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is Round, when School/Club Team is \"Tennessee-Chattanooga\"?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"draft_picks\" WHERE \"school_club_team\"='tennessee-chattanooga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the average Pick, when Player is \"Willie White\",and when Round is less than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"draft_picks\" WHERE \"player\"='willie white' AND \"round\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"geography\" (\n \"name_of_peak\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"prominence_m\" real,\n \"prominence_ft\" real,\n \"nearest_higher_neighbor\" text\n);\n\nQuestion: What is the total height of the peak with a prominence of 12,867 ft and a prominence in m greater than 3,922?" }, { "role": "assistant", "content": "SELECT COUNT(\"height_m\") FROM \"geography\" WHERE \"prominence_ft\"='12,867' AND \"prominence_m\">'3,922';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"geography\" (\n \"name_of_peak\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"prominence_m\" real,\n \"prominence_ft\" real,\n \"nearest_higher_neighbor\" text\n);\n\nQuestion: What is the total prominence in ft of the peak of kangchenjunga central, which has a prominence in m less than 32?" }, { "role": "assistant", "content": "SELECT COUNT(\"prominence_ft\") FROM \"geography\" WHERE \"name_of_peak\"='kangchenjunga central' AND \"prominence_m\"<32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"geography\" (\n \"name_of_peak\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"prominence_m\" real,\n \"prominence_ft\" real,\n \"nearest_higher_neighbor\" text\n);\n\nQuestion: What is the total prominence in m of kangchenjunga west (yalung kang) peak, which has a height in m greater than 7,903 and a height in ft less than 27,904?" }, { "role": "assistant", "content": "SELECT COUNT(\"prominence_m\") FROM \"geography\" WHERE \"height_m\">'7,903' AND \"name_of_peak\"='kangchenjunga west (yalung kang)' AND \"height_ft\"<'27,904';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"geography\" (\n \"name_of_peak\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"prominence_m\" real,\n \"prominence_ft\" real,\n \"nearest_higher_neighbor\" text\n);\n\nQuestion: What is the highest prominence in ft of the peak with a prominence in m less than 103?" }, { "role": "assistant", "content": "SELECT MAX(\"prominence_ft\") FROM \"geography\" WHERE \"prominence_m\"<103;" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What was the result when the attendance was 78,793?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='78,793';" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What was the attendance when the result was a bye?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='bye';" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What was the attendance total for week 10?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=10;" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What's the game date for week 7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHAT IS THE ROUND WITH PICK OF 7?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"pick\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHAT IS THE PICK WITH K POSITION AND OVERALL SMALLER THAN 181?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='k' AND \"overall\"<181;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHAT IS THE ROUND FROM MICHIGAN COLLEGE, AND OVERALL LARGER THAN 37?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='michigan' AND \"overall\">37;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHAT IS THE LOWEST ROUND FOR CB POSITION?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='cb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1_2005\" (\n \"episode\" real,\n \"title\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who's the Writer with an Original Airdate of september 4, 2005 (hbo)?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"season_1_2005\" WHERE \"original_airdate\"='september 4, 2005 (hbo)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1_2005\" (\n \"episode\" real,\n \"title\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text\n);\n\nQuestion: Which Director has an Episode of 13?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"season_1_2005\" WHERE \"episode\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1_2005\" (\n \"episode\" real,\n \"title\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text\n);\n\nQuestion: Which Original Airdate has an Episode of 1?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"season_1_2005\" WHERE \"episode\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scottish_premier_division\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: On what date was the venue A with a result of 3\u20130?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"scottish_premier_division\" WHERE \"venue\"='a' AND \"result\"='3\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_2012_season\" (\n \"position\" real,\n \"driver_passenger\" text,\n \"equipment\" text,\n \"bike_no\" real,\n \"points\" real\n);\n\nQuestion: What is the most noteworthy Bike No that has a Position bigger than 1, and a Points bigger than 369, and an Equipment of zabel-wsp?" }, { "role": "assistant", "content": "SELECT MAX(\"bike_no\") FROM \"the_2012_season\" WHERE \"position\">1 AND \"points\">369 AND \"equipment\"='zabel-wsp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_2012_season\" (\n \"position\" real,\n \"driver_passenger\" text,\n \"equipment\" text,\n \"bike_no\" real,\n \"points\" real\n);\n\nQuestion: What is the aggregate number of Position that has a Bike No of 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"the_2012_season\" WHERE \"bike_no\"=4;" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: When was the result l 14\u201324?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 14\u201324';" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the first week when there was an attendance over 75,007 at Mile High Stadium?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"game_site\"='mile high stadium' AND \"attendance\">'75,007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Away team Swindon Town had a Tie no listing of Replay with what as an Attendance?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='replay' AND \"away_team\"='swindon town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Liverpool as a home team as listed what in the Tie no column?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"home_team\"='liverpool';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the score for the away team of Grimsby Town?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"away_team\"='grimsby town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Pick has a Round larger than 1, a School/Club Team of alcorn state, and a Position of defensive back?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"nfl_draft\" WHERE \"round\">1 AND \"school_club_team\"='alcorn state' AND \"position\"='defensive back';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Pick has a Position of offensive guard, a Player of reggie mckenzie, and a Round larger than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='offensive guard' AND \"player\"='reggie mckenzie' AND \"round\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which School/Club Team has a Round smaller than 5, a Pick larger than 1, and a Player of reggie mckenzie?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"nfl_draft\" WHERE \"round\"<5 AND \"pick\">1 AND \"player\"='reggie mckenzie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Player has a Round smaller than 2?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"round\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the record on march 26?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='march 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Who visited on march 26?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"date\"='march 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What were the lowest points on march 2?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"game_log\" WHERE \"date\"='march 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Record of 21\u201336\u20139, and an Attendance larger than 14,768?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"game_log\" WHERE \"record\"='21\u201336\u20139' AND \"attendance\">'14,768';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: which Name has a Loss larger than 2, and a Avg/G larger than -16, and a GP-GS of 11\u20137, and a Gain larger than 86?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"rushing\" WHERE \"loss\">2 AND \"avg_g\">-16 AND \"gp_gs\"='11\u20137' AND \"gain\">86;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Name the highest Long that has an Avg/G smaller than 8.4, and an GP-GS of 4\u20130?" }, { "role": "assistant", "content": "SELECT MAX(\"long\") FROM \"rushing\" WHERE \"avg_g\"<8.4 AND \"gp_gs\"='4\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Name the lowest Gain which has a Long of 0, and a GP-GS of 4\u20130, and a Loss smaller than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"gain\") FROM \"rushing\" WHERE \"long\"=0 AND \"gp_gs\"='4\u20130' AND \"loss\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Name the total of Loss which has an Avg/G of 8.4?" }, { "role": "assistant", "content": "SELECT COUNT(\"loss\") FROM \"rushing\" WHERE \"avg_g\"=8.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Which Team has Points of 15?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"classification\" WHERE \"points\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Which Laps has a Points of lead changes: 13 between 8 drivers?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"classification\" WHERE \"points\"='lead changes: 13 between 8 drivers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Which Driver has a Grid of 1?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: WHAT IS THE HIGHEST WINS WITH A SERIES OF BRITISH FORMULA THREE, SEASON 2005, POLES SMALLER THAN 0?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"career_summary\" WHERE \"series\"='british formula three' AND \"season\"='2005' AND \"poles\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: WHAT IS THE SUM OF RACES WITH 9 POINTS?" }, { "role": "assistant", "content": "SELECT SUM(\"races\") FROM \"career_summary\" WHERE \"points\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: WHAT IS THE AVERAGE POLES WITH POINTS N/A?" }, { "role": "assistant", "content": "SELECT AVG(\"poles\") FROM \"career_summary\" WHERE \"points\"='n/a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Who is that player from South Africa who had a total score under 293?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"<293 AND \"country\"='south africa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the best when the qual 2 is 1:47.042?" }, { "role": "assistant", "content": "SELECT \"best\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:47.042';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the team when the name is alex sperafico?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"name\"='alex sperafico';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 2 when the best is 1:45.172?" }, { "role": "assistant", "content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"best\"='1:45.172';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the name for the best of 1:45.361?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"best\"='1:45.361';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What name has a qual 2 of 1:43.374?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:43.374';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What name has a qual 2 of 1:46.025?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:46.025';" } ]
[ { "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\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"team_points\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the streak on March 27?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"game_log\" WHERE \"date\"='march 27';" } ]
[ { "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\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"team_points\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which streak before game 12 had a team points larger than 113 on November 16?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"game_log\" WHERE \"team_points\">113 AND \"game\"<12 AND \"date\"='november 16';" } ]
[ { "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: Who scored the lowest with 8 gold medals and less than 4 silver medals?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"gold\"=8 AND \"silver\"<4;" } ]
[ { "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 rank for the 3 silver medals?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"medal_table\" WHERE \"silver\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"young_classification\" text,\n \"sprint_classification\" text,\n \"aggressive_rider\" text,\n \"team_classification\" text\n);\n\nQuestion: Which young classification has an aggressive rider of Tim Johnson?" }, { "role": "assistant", "content": "SELECT \"young_classification\" FROM \"jersey_progress\" WHERE \"aggressive_rider\"='tim johnson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what was the overall pick number for rich dobbert?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='rich dobbert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of the rounds where the overall pick was more than 295 and the pick was smaller than 10 and the player was rich dobbert?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"overall\">295 AND \"name\"='rich dobbert' AND \"pick\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position did eric norri play who was the overall pick less than 322 on a round larger than 3?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"<322 AND \"round\">3 AND \"name\"='eric norri';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the report for the game with the home team of the Townsville Crocodiles?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"round_2\" WHERE \"home_team\"='townsville crocodiles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the venue that featured the Melbourne Tigers as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_2\" WHERE \"away_team\"='melbourne tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the report for the game played at the Hisense Arena?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"round_2\" WHERE \"venue\"='hisense arena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: When the Points 1 was 51 and the Goals Against was less than 66, what was the Goal Difference?" }, { "role": "assistant", "content": "SELECT \"goal_difference\" FROM \"final_table\" WHERE \"points_1\"='51' AND \"goals_against\"<66;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the total of Played where the Goals For is higher than 60, the Lost is 8, and the Position is less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"final_table\" WHERE \"goals_for\">60 AND \"lost\"=8 AND \"position\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What was the Goal Difference for Postion 22?" }, { "role": "assistant", "content": "SELECT \"goal_difference\" FROM \"final_table\" WHERE \"position\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: When Team Hyde United had more than 59 Goals For and fewer than 15 Drawn, what was the Lost?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"final_table\" WHERE \"goals_for\">59 AND \"drawn\"<15 AND \"team\"='hyde united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the average Lost for Team Matlock Town when the Goals Against is higher than 66?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"final_table\" WHERE \"team\"='matlock town' AND \"goals_against\">66;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pittsburgh_pirates_vs_atlanta_braves\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on October 17?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"pittsburgh_pirates_vs_atlanta_braves\" WHERE \"date\"='october 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pittsburgh_pirates_vs_atlanta_braves\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Where was the attendance more than 57,347?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pittsburgh_pirates_vs_atlanta_braves\" WHERE \"attendance\">'57,347';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pittsburgh_pirates_vs_atlanta_braves\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: When was the last game that had a time of 2:46 and attendance of more than 57,533?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"pittsburgh_pirates_vs_atlanta_braves\" WHERE \"time\"='2:46' AND \"attendance\">'57,533';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What place is South Africa?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"country\"='south africa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998\" (\n \"year\" real,\n \"name\" text,\n \"field\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: What was the average year when shri. shambu nath khajuria won the padma shri awards?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"1998\" WHERE \"name\"='shri. shambu nath khajuria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998\" (\n \"year\" real,\n \"name\" text,\n \"field\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: What is the total number of years that prof. aditya naraian purohit won?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"1998\" WHERE \"name\"='prof. aditya naraian purohit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998\" (\n \"year\" real,\n \"name\" text,\n \"field\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: What is the sum of the years when the winner was prof. priyambada mohanty hejmadi from orissa?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"1998\" WHERE \"state\"='orissa' AND \"name\"='prof. priyambada mohanty hejmadi';" } ]
[ { "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 event was part of the World Cross Country championships?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"competition\"='world cross country championships';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"college_code\" text,\n \"faculty_name\" text,\n \"designation\" text,\n \"qualification\" text,\n \"department\" text,\n \"experience\" text\n);\n\nQuestion: What department as 6 years experience?" }, { "role": "assistant", "content": "SELECT \"department\" FROM \"external_links\" WHERE \"experience\"='6 years';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"college_code\" text,\n \"faculty_name\" text,\n \"designation\" text,\n \"qualification\" text,\n \"department\" text,\n \"experience\" text\n);\n\nQuestion: What is the designation for the m.tech (e.c.e) qualification?" }, { "role": "assistant", "content": "SELECT \"designation\" FROM \"external_links\" WHERE \"qualification\"='m.tech (e.c.e)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"college_code\" text,\n \"faculty_name\" text,\n \"designation\" text,\n \"qualification\" text,\n \"department\" text,\n \"experience\" text\n);\n\nQuestion: What department has an m.phil (physics) qualification?" }, { "role": "assistant", "content": "SELECT \"department\" FROM \"external_links\" WHERE \"qualification\"='m.phil (physics)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: hat is the Result F\u2013 A when they played against Leeds United?" }, { "role": "assistant", "content": "SELECT \"result_f_a\" FROM \"league_cup\" WHERE \"opponents\"='leeds united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the round when they played against Middlesbrough, and the h/a was h?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"league_cup\" WHERE \"opponents\"='middlesbrough' AND \"h_a\"='h';" } ]
[ { "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\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: How many games have 61-16 as the record?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"record\"='61-16';" } ]
[ { "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\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What date has 104-113 as the score?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='104-113';" } ]
[ { "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\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What date has 113-115 (ot) as the score?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='113-115 (ot)';" } ]
[ { "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\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the mean game played on January 9?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"date\"='january 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which game number includes a record of 1-2?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"playoffs\" WHERE \"record\"='1-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: For the game where Joel Przybilla (4) received high assists, what was the final score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"high_assists\"='joel przybilla (4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: For the game that had an end record of 2-4, who was the high points scorer?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"record\"='2-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"falcons_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance of the game against the New Orleans Saints before game 11?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='new orleans saints' AND \"game\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"falcons_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: On what date was the streak at lost 7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"streak\"='lost 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What was the date for Round 2r?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_7\" WHERE \"round\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What date did the opponent George Khrikadze play?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_7\" WHERE \"opponent\"='george khrikadze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What round resulted in 6-0, 6-1, 6-2?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"singles_7\" WHERE \"result\"='6-0, 6-1, 6-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What round was the opponent Sergiy Stakhovsky?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"singles_7\" WHERE \"opponent\"='sergiy stakhovsky';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record on December 11?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='december 11';" } ]
[ { "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 \"attendance\" real\n);\n\nQuestion: What date was the game that resulted in L 30-27?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 30-27';" } ]
[ { "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 \"attendance\" real\n);\n\nQuestion: What was the highest attendance of games that resulted in L 23-20?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"result\"='l 23-20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result when the opponent was manchester united in venue h?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"fa_cup\" WHERE \"opponent\"='manchester united' AND \"venue\"='h';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What's the greatest 1st RU that has a 2nd RU less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"1st_ru\") FROM \"by_country_tally\" WHERE \"2nd_ru\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many semifinalists had a total less than 2, 1st RU greater than 0, 2nd RU was 0 and Miss United Continent of 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"semifinalists\") FROM \"by_country_tally\" WHERE \"miss_united_continent\"=0 AND \"2nd_ru\"=0 AND \"1st_ru\">0 AND \"total\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What rank was Peru with a total greater than 3?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"by_country_tally\" WHERE \"country\"='peru' AND \"total\">3;" } ]