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 \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Can you tell me the Opponent that has the Round of 3?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_550_a\" (\n \"pinnacle_height\" text,\n \"year\" real,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What is the main use for the structure listed in walker city, iowa?" }, { "role": "assistant", "content": "SELECT \"main_use\" FROM \"structures_past_or_present_between_550_a\" WHERE \"town\"='walker city, iowa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_550_a\" (\n \"pinnacle_height\" text,\n \"year\" real,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What year was the structure in greensboro, north carolina considered tallest?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"structures_past_or_present_between_550_a\" WHERE \"town\"='greensboro, north carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_550_a\" (\n \"pinnacle_height\" text,\n \"year\" real,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What was the earliest year that a structure was located in gray court, south carolina?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"structures_past_or_present_between_550_a\" WHERE \"town\"='gray court, south carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_550_a\" (\n \"pinnacle_height\" text,\n \"year\" real,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What is the main use of the structure that was in redfield, arkansas before 2004?" }, { "role": "assistant", "content": "SELECT \"main_use\" FROM \"structures_past_or_present_between_550_a\" WHERE \"year\"<2004 AND \"town\"='redfield, arkansas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_4_5_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: How far did the pilot go when averaging 124.1km/h?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"race_4_5_01_2010\" WHERE \"speed\"='124.1km/h';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_4_5_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What was sebastian kawa's average speed with Diana 2?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"race_4_5_01_2010\" WHERE \"glider\"='diana 2' AND \"pilot\"='sebastian kawa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_4_5_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What glider did thomas gostner pilot?" }, { "role": "assistant", "content": "SELECT \"glider\" FROM \"race_4_5_01_2010\" WHERE \"pilot\"='thomas gostner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"athletes\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: Which Run 4 has a Final of 8:16.28?" }, { "role": "assistant", "content": "SELECT \"run_4\" FROM \"results\" WHERE \"final\"='8:16.28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"athletes\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: Which Run 4 has Athletes of hubert stevens & curtis stevens?" }, { "role": "assistant", "content": "SELECT \"run_4\" FROM \"results\" WHERE \"athletes\"='hubert stevens & curtis stevens';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"athletes\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: Which Run 2 has a Rank of 4?" }, { "role": "assistant", "content": "SELECT \"run_2\" FROM \"results\" WHERE \"rank\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"athletes\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: Which Athletes have a Rank of bronze?" }, { "role": "assistant", "content": "SELECT \"athletes\" FROM \"results\" WHERE \"rank\"='bronze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"athletes\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: Which Athletes have a Run 2 of 2:21.82?" }, { "role": "assistant", "content": "SELECT \"athletes\" FROM \"results\" WHERE \"run_2\"='2:21.82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"athletes\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: Which Run 3 has a Run 1 of 2:20.10?" }, { "role": "assistant", "content": "SELECT \"run_3\" FROM \"results\" WHERE \"run_1\"='2:20.10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_tom_harkin\" text,\n \"republican_christopher_reed\" text,\n \"lead_margin\" real\n);\n\nQuestion: What were the dates administered in the Survey USA poll source where Republican Christopher Reed received 37%?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"poll_source\"='survey usa' AND \"republican_christopher_reed\"='37%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_tom_harkin\" text,\n \"republican_christopher_reed\" text,\n \"lead_margin\" real\n);\n\nQuestion: What percentage did Republish Christopher Reed receive when the lead margin was smaller than 16?" }, { "role": "assistant", "content": "SELECT \"republican_christopher_reed\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"lead_margin\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_tom_harkin\" text,\n \"republican_christopher_reed\" text,\n \"lead_margin\" real\n);\n\nQuestion: What were the dates administered when the lead margin was smaller than 39 with Republican Christopher Reed at 37% and Democrat Tom Harkin at 53%?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"lead_margin\"<39 AND \"republican_christopher_reed\"='37%' AND \"democrat_tom_harkin\"='53%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_tom_harkin\" text,\n \"republican_christopher_reed\" text,\n \"lead_margin\" real\n);\n\nQuestion: What was Democrat: Tom Harkin's percentage when the poll source was Rasmussen Reports and the lead margin was 14?" }, { "role": "assistant", "content": "SELECT \"democrat_tom_harkin\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"poll_source\"='rasmussen reports' AND \"lead_margin\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_tom_harkin\" text,\n \"republican_christopher_reed\" text,\n \"lead_margin\" real\n);\n\nQuestion: What were the dates administered when the lead margin was larger than 14 and the poll source was Research 2000?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"lead_margin\">14 AND \"poll_source\"='research 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is Olivier Jacque's Time/Retired?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"rider\"='olivier jacque';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which manufacturer is grid 11?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"grid\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which manufacturer does Loris Capirossi ride for?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"rider\"='loris capirossi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which manufacturer has 8 laps?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"laps\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: How many laps does grid 4 have?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"moto_gp_classification\" WHERE \"grid\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which rider's manufacturer is Honda and has 28 laps and a grid of 1?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"laps\"='28' AND \"manufacturer\"='honda' AND \"grid\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_over_1_000_000_population\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real,\n \"1996\" real,\n \"1986\" real,\n \"1976\" real,\n \"1966\" real,\n \"1956\" real\n);\n\nQuestion: What is the 2006 sum with a rank 1 and more than 6758845 in 1996?" }, { "role": "assistant", "content": "SELECT SUM(\"2006\") FROM \"cities_over_1_000_000_population\" WHERE \"rank\"=1 AND \"1996\">6758845;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_over_1_000_000_population\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real,\n \"1996\" real,\n \"1986\" real,\n \"1976\" real,\n \"1966\" real,\n \"1956\" real\n);\n\nQuestion: What is the total number in 2006, which has an official foundation of municipality of 1918?" }, { "role": "assistant", "content": "SELECT COUNT(\"2006\") FROM \"cities_over_1_000_000_population\" WHERE \"date_of_official_foundation_of_municipality\"=1918;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_over_1_000_000_population\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real,\n \"1996\" real,\n \"1986\" real,\n \"1976\" real,\n \"1966\" real,\n \"1956\" real\n);\n\nQuestion: What is teh average rank of the city of mashhad, which had less than 667770 in 1976?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"cities_over_1_000_000_population\" WHERE \"city\"='mashhad' AND \"1976\"<667770;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_over_1_000_000_population\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real,\n \"1996\" real,\n \"1986\" real,\n \"1976\" real,\n \"1966\" real,\n \"1956\" real\n);\n\nQuestion: What is the average rank of the province alborz, which had more than 14526 in 1956?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"cities_over_1_000_000_population\" WHERE \"province\"='alborz' AND \"1956\">14526;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"400_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: Which World Rank happened in 1977?" }, { "role": "assistant", "content": "SELECT \"world_rank\" FROM \"400_meters\" WHERE \"year\"=1977;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nielsen_ratings_broadcast_history\" (\n \"season\" real,\n \"premiere\" text,\n \"finale\" text,\n \"rank\" text,\n \"rating\" text\n);\n\nQuestion: What is the rank for the episode that premiered on September 12, 1979?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"nielsen_ratings_broadcast_history\" WHERE \"premiere\"='september 12, 1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nielsen_ratings_broadcast_history\" (\n \"season\" real,\n \"premiere\" text,\n \"finale\" text,\n \"rank\" text,\n \"rating\" text\n);\n\nQuestion: What was the date of the finale for the season that premiered on September 22, 1976?" }, { "role": "assistant", "content": "SELECT \"finale\" FROM \"nielsen_ratings_broadcast_history\" WHERE \"premiere\"='september 22, 1976';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nielsen_ratings_broadcast_history\" (\n \"season\" real,\n \"premiere\" text,\n \"finale\" text,\n \"rank\" text,\n \"rating\" text\n);\n\nQuestion: What is the rank for the episode that premiered on September 13, 1978?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"nielsen_ratings_broadcast_history\" WHERE \"premiere\"='september 13, 1978';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nielsen_ratings_broadcast_history\" (\n \"season\" real,\n \"premiere\" text,\n \"finale\" text,\n \"rank\" text,\n \"rating\" text\n);\n\nQuestion: What was the date of the finale for Season 3?" }, { "role": "assistant", "content": "SELECT \"finale\" FROM \"nielsen_ratings_broadcast_history\" WHERE \"season\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nielsen_ratings_broadcast_history\" (\n \"season\" real,\n \"premiere\" text,\n \"finale\" text,\n \"rank\" text,\n \"rating\" text\n);\n\nQuestion: What was the date of the premiere that had a 20.9 rating?" }, { "role": "assistant", "content": "SELECT \"premiere\" FROM \"nielsen_ratings_broadcast_history\" WHERE \"rating\"='20.9';" } ]
[ { "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: What was Herdez Competition's total points with a grid larger than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"race\" WHERE \"team\"='herdez competition' AND \"grid\">1;" } ]
[ { "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: What was the highest lap count for Walker Racing with a grid larger than 15?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"team\"='walker racing' AND \"grid\">15;" } ]
[ { "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 driver had 248 laps?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"=248;" } ]
[ { "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: What driver had a time/retired of + 10 laps and more than 6 points?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='+ 10 laps' AND \"points\">6;" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Game of 61?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"=61;" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which High points have a Record of 27\u201329?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"record\"='27\u201329';" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which High points has a Game larger than 58, and a High rebounds of francisco elson (7)?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"game\">58 AND \"high_rebounds\"='francisco elson (7)';" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Location Attendance has a Date of february 27?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='february 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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a High rebounds of luc mbah a moute (11)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"high_rebounds\"='luc mbah a moute (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\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Game has a Record of 27\u201330?" }, { "role": "assistant", "content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"record\"='27\u201330';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_18_7_10\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What Tournament had a Score in Final of 5\u20137, 4\u20136?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_18_7_10\" WHERE \"score_in_final\"='5\u20137, 4\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_18_7_10\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What is the Opponents in Final in the match with a Score in Final of 4\u20136, 1\u20136 played on Clay Surface?" }, { "role": "assistant", "content": "SELECT \"opponents_in_final\" FROM \"doubles_18_7_10\" WHERE \"score_in_final\"='4\u20136, 1\u20136' AND \"surface\"='clay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_18_7_10\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What is the Date of the match with Partner Steffi Graf with a Score in Final of 4\u20136, 1\u20136?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_18_7_10\" WHERE \"score_in_final\"='4\u20136, 1\u20136' AND \"partner\"='steffi graf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_18_7_10\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What is the Partner of the match with a Score in Final of 5\u20137, 4\u20136?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_18_7_10\" WHERE \"score_in_final\"='5\u20137, 4\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2001, when 1999 is \"2R\", and when 1992 is \"3R\"?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"1999\"='2r' AND \"1992\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 1990, when 1997 is \"1R\", and when Tournament is \"Hamburg\"?" }, { "role": "assistant", "content": "SELECT \"1990\" FROM \"singles_performance_timeline\" WHERE \"1997\"='1r' AND \"tournament\"='hamburg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2001, when 1989 is \"A\", and when Tournament is \"U.S. Open\"?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"1989\"='a' AND \"tournament\"='u.s. open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the goals against when the points is 43 and draws is more than 9?" }, { "role": "assistant", "content": "SELECT AVG(\"goals_against\") FROM \"group_i\" WHERE \"points\"=43 AND \"draws\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the goals when the goal difference is more than -3, the club is real avil\u00e9s cf and the goals against is more than 60?" }, { "role": "assistant", "content": "SELECT SUM(\"goals_for\") FROM \"group_i\" WHERE \"goal_difference\">-3 AND \"club\"='real avil\u00e9s cf' AND \"goals_against\">60;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the least draws when the position is lower than 5, the points is 62 and played is more than 38?" }, { "role": "assistant", "content": "SELECT MIN(\"draws\") FROM \"group_i\" WHERE \"position\"<5 AND \"points\"=62 AND \"played\">38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the played when the wins is 21 and the positions is higher than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"group_i\" WHERE \"wins\"=21 AND \"position\">3;" } ]
[ { "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 is the sum of Week, when Date is December 2, 2001?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"date\"='december 2, 2001';" } ]
[ { "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 is the total number of Week, when Opponent is At Cleveland Browns?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='at cleveland browns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What Country's ICAO is VOTR?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"destinations\" WHERE \"icao\"='votr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the City in the Maldives?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"destinations\" WHERE \"country\"='maldives';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO in India with IATA TRZ?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"destinations\" WHERE \"country\"='india' AND \"iata\"='trz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the Airport in Singapore?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"destinations\" WHERE \"country\"='singapore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the Airport with an IATA of TRZ?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"destinations\" WHERE \"iata\"='trz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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 opponent of the game with a w 87-64 score?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"score\"='w 87-64';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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 location/attendance of the game with a 3-1 record?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"regular_season\" WHERE \"record\"='3-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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: Who had the highest points of the game on May 27?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"regular_season\" WHERE \"date\"='may 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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the opponent on October 28, 2001?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='october 28, 2001';" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the lowest week at Ralph Wilson Stadium on October 7, 2001?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"game_site\"='ralph wilson stadium' AND \"date\"='october 7, 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: What is the sum of To Par, when Player is \"Bob Rosburg\"?" }, { "role": "assistant", "content": "SELECT SUM(\"to_par\") FROM \"third_round\" WHERE \"player\"='bob rosburg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: What is the total number of To Par, when Score is \"70-75-76=221\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"to_par\") FROM \"third_round\" WHERE \"score\"='70-75-76=221';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: What is Player, when Score is \"76-73-73=222\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='76-73-73=222';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: What is Score, when To Par is greater than 7, when Place is \"T4\", and when Player is \"Bob Rosburg\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round\" WHERE \"to_par\">7 AND \"place\"='t4' AND \"player\"='bob rosburg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which transfer window ends after 2006?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"in\" WHERE \"ends\">2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer fee for Paolo Vanoli?" }, { "role": "assistant", "content": "SELECT \"transfer_fee\" FROM \"in\" WHERE \"name\"='paolo vanoli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is the nationality of Gavin Rae?" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"in\" WHERE \"name\"='gavin rae';" } ]
[ { "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: How much Overall has a Position of ot, and a Round larger than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='ot' AND \"round\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for Bart Bryant?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"player\"='bart bryant';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who scored 68-73-66=207 in South Africa?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"country\"='south africa' AND \"score\"='68-73-66=207';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What year is Zhong from?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"vassal_states\" WHERE \"name\"='zhong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: Which Royal house has a name of ding?" }, { "role": "assistant", "content": "SELECT \"royal_house\" FROM \"vassal_states\" WHERE \"name\"='ding';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What type of state is bo qin?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"vassal_states\" WHERE \"name\"='bo qin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What year is the Royal house of ji from?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"vassal_states\" WHERE \"royal_house\"='ji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What type of state has a royal house of ji and has a ruler?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"vassal_states\" WHERE \"royal_house\"='ji' AND \"title\"='ruler';" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: what is the record when the game is 13?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"=13;" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: who had the high points on november 20?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='november 20';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What is the Score on November 23, 1946 with Washington Capitols Home team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"home\"='washington capitols' AND \"date\"='november 23, 1946';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: On what Date is the Detroit Falcons the Home team in a game with a Score of 63\u201366?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"regular_season\" WHERE \"home\"='detroit falcons' AND \"score\"='63\u201366';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What is the Home team on January 24, 1947?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='january 24, 1947';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What is the Home team on November 16, 1946?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='november 16, 1946';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What is the Home team on February 2, 1947?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='february 2, 1947';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Time of +23.002, and a Grid smaller than 11?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"125cc_classification\" WHERE \"time\"='+23.002' AND \"grid\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Manufacturer of aprilia, and a Rider of sergio gadea?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"rider\"='sergio gadea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid that has a Rider of mike di meglio, and Laps larger than 23?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"125cc_classification\" WHERE \"rider\"='mike di meglio' AND \"laps\">23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Manufacturer has a Grid smaller than 9, and a Time of +22.517?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"125cc_classification\" WHERE \"grid\"<9 AND \"time\"='+22.517';" } ]
[ { "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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What is Result, when Round is SF?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"league_cup\" WHERE \"round\"='sf';" } ]
[ { "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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What is Scorers, when Attendance is greater than 11,091, and when Round is R3?" }, { "role": "assistant", "content": "SELECT \"scorers\" FROM \"league_cup\" WHERE \"attendance\">'11,091' AND \"round\"='r3';" } ]
[ { "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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What is Result, when Date is 11 August 1992?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"league_cup\" WHERE \"date\"='11 august 1992';" } ]
[ { "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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What is Result, when Date is 19 August 1992?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"league_cup\" WHERE \"date\"='19 august 1992';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: Did he win or lose rof 32: respect?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='rof 32: respect';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What round did he win rof 29: aftershock in?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"event\"='rof 29: aftershock';" } ]