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 \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: What is Run 1, when Run 4 is 1:56.59?" }, { "role": "assistant", "content": "SELECT \"run_1\" FROM \"results\" WHERE \"run_4\"='1:56.59';" } ]
[ { "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 \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: What is Rank, when Run 2 is 2:06.62?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"results\" WHERE \"run_2\"='2:06.62';" } ]
[ { "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 \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: What is Run 2, when Run 1 is 2:09.09?" }, { "role": "assistant", "content": "SELECT \"run_2\" FROM \"results\" WHERE \"run_1\"='2:09.09';" } ]
[ { "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 \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: What is Final, when Team is United States (USA) USA I?" }, { "role": "assistant", "content": "SELECT \"final\" FROM \"results\" WHERE \"team\"='united states (usa) usa i';" } ]
[ { "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 \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: What is Final, when Run 3 is 1:57.41?" }, { "role": "assistant", "content": "SELECT \"final\" FROM \"results\" WHERE \"run_3\"='1:57.41';" } ]
[ { "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 \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"run_4\" text,\n \"final\" text\n);\n\nQuestion: What is Run 3, when Team is United States (USA) USA I?" }, { "role": "assistant", "content": "SELECT \"run_3\" FROM \"results\" WHERE \"team\"='united states (usa) usa i';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"passenger\" text,\n \"equipment\" text,\n \"position\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Which position has 30 points and Reiner Stuyvenberg as a passenger?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"season_by_season\" WHERE \"points\"=30 AND \"passenger\"='reiner stuyvenberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"passenger\" text,\n \"equipment\" text,\n \"position\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Which passenger has a position of 21 and less than 49 points?" }, { "role": "assistant", "content": "SELECT \"passenger\" FROM \"season_by_season\" WHERE \"position\"='21' AND \"points\"<49;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"passenger\" text,\n \"equipment\" text,\n \"position\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What were the wins with more than 145 points, less than 17 races, and Sven Verbrugge as a passenger?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"season_by_season\" WHERE \"points\">145 AND \"passenger\"='sven verbrugge' AND \"races\"<17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"passenger\" text,\n \"equipment\" text,\n \"position\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Who is the passenger in 2009 season with 17 races?" }, { "role": "assistant", "content": "SELECT \"passenger\" FROM \"season_by_season\" WHERE \"season\"='2009' AND \"races\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"s_o_paulo_career\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: WHAT IS THE POSITION FOR BRAZIL, WITH 27 GOALS, AND FOR NECA?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"players\" WHERE \"nationality\"='brazil' AND \"goals\"=27 AND \"name\"='neca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"s_o_paulo_career\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: WHAT SAN PAULO CAREER HAD SMALLER THAN 201 APPEARANCES, SMALLER THAN 2 GOALS, AND FOR RICARDO ROCHA?" }, { "role": "assistant", "content": "SELECT \"s_o_paulo_career\" FROM \"players\" WHERE \"appearances\"<201 AND \"goals\"<2 AND \"name\"='ricardo rocha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_models\" (\n \"model\" text,\n \"released\" real,\n \"sensor_size\" text,\n \"resolution\" text,\n \"active_pixels\" text,\n \"iso_range\" text,\n \"dynamic_range_f_stops\" real,\n \"seconds_frame\" real,\n \"lens_conversion_factor\" real,\n \"display\" text,\n \"storage\" text\n);\n\nQuestion: Which display has an ISO range of 80-800, and 0.8 Seconds/Frame?" }, { "role": "assistant", "content": "SELECT \"display\" FROM \"current_models\" WHERE \"iso_range\"='80-800' AND \"seconds_frame\"=0.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"religious_group_breakdown\" (\n \"religion\" text,\n \"chester\" text,\n \"congleton\" text,\n \"crewe_and_nantwich\" text,\n \"ellesmere_port_and_neston\" text,\n \"macclesfield\" text,\n \"vale_royal\" text,\n \"total\" text\n);\n\nQuestion: WHAT IS THE VALE ROYAL WITH THE JEWISH RELIGION?" }, { "role": "assistant", "content": "SELECT \"vale_royal\" FROM \"religious_group_breakdown\" WHERE \"religion\"='jewish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"launch_history\" (\n \"date\" text,\n \"time_gmt\" text,\n \"serial\" text,\n \"apogee\" text,\n \"outcome\" text\n);\n\nQuestion: On 1959-01-27 when outcome was failure, what is the serial?" }, { "role": "assistant", "content": "SELECT \"serial\" FROM \"launch_history\" WHERE \"outcome\"='failure' AND \"date\"='1959-01-27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"launch_history\" (\n \"date\" text,\n \"time_gmt\" text,\n \"serial\" text,\n \"apogee\" text,\n \"outcome\" text\n);\n\nQuestion: Which date has serial of 11c?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"launch_history\" WHERE \"serial\"='11c';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"launch_history\" (\n \"date\" text,\n \"time_gmt\" text,\n \"serial\" text,\n \"apogee\" text,\n \"outcome\" text\n);\n\nQuestion: Which Apogee was on 1959-02-20?" }, { "role": "assistant", "content": "SELECT \"apogee\" FROM \"launch_history\" WHERE \"date\"='1959-02-20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"launch_history\" (\n \"date\" text,\n \"time_gmt\" text,\n \"serial\" text,\n \"apogee\" text,\n \"outcome\" text\n);\n\nQuestion: Which date has time (GMT) of 23:34?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"launch_history\" WHERE \"time_gmt\"='23:34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_league_championships\" (\n \"school_year\" text,\n \"volleyball\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"tennis\" text,\n \"golf\" text\n);\n\nQuestion: What is Cross Country, when Soccer is Ashland, when Volleyball is Wooster, and when School Year is 2006-07?" }, { "role": "assistant", "content": "SELECT \"cross_country\" FROM \"girls_league_championships\" WHERE \"soccer\"='ashland' AND \"volleyball\"='wooster' AND \"school_year\"='2006-07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_league_championships\" (\n \"school_year\" text,\n \"volleyball\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"tennis\" text,\n \"golf\" text\n);\n\nQuestion: What is School Year, when Cross Country is Wooster?" }, { "role": "assistant", "content": "SELECT \"school_year\" FROM \"girls_league_championships\" WHERE \"cross_country\"='wooster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_league_championships\" (\n \"school_year\" text,\n \"volleyball\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"tennis\" text,\n \"golf\" text\n);\n\nQuestion: What is Tennis, when School Year is 2004-05?" }, { "role": "assistant", "content": "SELECT \"tennis\" FROM \"girls_league_championships\" WHERE \"school_year\"='2004-05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_league_championships\" (\n \"school_year\" text,\n \"volleyball\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"tennis\" text,\n \"golf\" text\n);\n\nQuestion: What is Cross Country, when School Year is 2012-13?" }, { "role": "assistant", "content": "SELECT \"cross_country\" FROM \"girls_league_championships\" WHERE \"school_year\"='2012-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_league_championships\" (\n \"school_year\" text,\n \"volleyball\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"tennis\" text,\n \"golf\" text\n);\n\nQuestion: What is School Year, when Cross Country is Lexington, when Soccer is Ashland, and when Volleyball is Wooster?" }, { "role": "assistant", "content": "SELECT \"school_year\" FROM \"girls_league_championships\" WHERE \"cross_country\"='lexington' AND \"soccer\"='ashland' AND \"volleyball\"='wooster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_league_championships\" (\n \"school_year\" text,\n \"volleyball\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"tennis\" text,\n \"golf\" text\n);\n\nQuestion: What is Soccer, when Cross Country is Lexington, and when School Year is 2011-12?" }, { "role": "assistant", "content": "SELECT \"soccer\" FROM \"girls_league_championships\" WHERE \"cross_country\"='lexington' AND \"school_year\"='2011-12';" } ]
[ { "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 is the highest Attendance, when Result is l 26-16, and when Week is less than 12?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"result\"='l 26-16' AND \"week\"<12;" } ]
[ { "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 is the highest Week, when Result is W 34-21?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"result\"='w 34-21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What is the most recent year with a finish in 2nd position?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"season_to_season\" WHERE \"position\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What is the position in the 2004 season?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"season_to_season\" WHERE \"season\">2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What is the division for the season earlier than 2004?" }, { "role": "assistant", "content": "SELECT \"division\" FROM \"season_to_season\" WHERE \"season\"<2004;" } ]
[ { "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 Team, when Qual 1 is 1:16.417?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:16.417';" } ]
[ { "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 Team, when Qual 1 is 1:16.417?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:16.417';" } ]
[ { "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 Team when Qual 1 is 1:20.139?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:20.139';" } ]
[ { "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 Name when Qual 2 is 1:15.582?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:15.582';" } ]
[ { "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 Name, when Best is 1:15.673?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"best\"='1:15.673';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles_28\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Where was the tournament that happened in 1987 on a clay surface?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_titles_28\" WHERE \"date\"=1987 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_titles_28\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent before 1990 that had a score of 4\u20136, 6\u20133, 6\u20134 and Partnering of Yannick Noah?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"doubles_titles_28\" WHERE \"date\"<1990 AND \"partnering\"='yannick noah' AND \"score\"='4\u20136, 6\u20133, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_parties\" (\n \"name_english\" text,\n \"name_german\" text,\n \"abbr\" text,\n \"ideology\" text,\n \"position\" text,\n \"votes_2011\" text,\n \"seats_in_hamburgische_b_rgerschaft\" real\n);\n\nQuestion: WHAT IS THE SEATS IN Hamburgische B\u00fcrgerschaft THAT HAS GREEN POLITICS?" }, { "role": "assistant", "content": "SELECT \"seats_in_hamburgische_b_rgerschaft\" FROM \"political_parties\" WHERE \"ideology\"='green politics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_parties\" (\n \"name_english\" text,\n \"name_german\" text,\n \"abbr\" text,\n \"ideology\" text,\n \"position\" text,\n \"votes_2011\" text,\n \"seats_in_hamburgische_b_rgerschaft\" real\n);\n\nQuestion: WHAT IS THE ABBR WITH VOTES OF 11.2% IN 2011?" }, { "role": "assistant", "content": "SELECT \"abbr\" FROM \"political_parties\" WHERE \"votes_2011\"='11.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_parties\" (\n \"name_english\" text,\n \"name_german\" text,\n \"abbr\" text,\n \"ideology\" text,\n \"position\" text,\n \"votes_2011\" text,\n \"seats_in_hamburgische_b_rgerschaft\" real\n);\n\nQuestion: WHAT IS THE TOTAL NUMBER OF SEATS IN Hamburgische B\u00fcrgerschaft WITH AN ABBR OF b\u00fcndnis 90 / die gr\u00fcnen (gal)?" }, { "role": "assistant", "content": "SELECT COUNT(\"seats_in_hamburgische_b_rgerschaft\") FROM \"political_parties\" WHERE \"abbr\"='b\u00fcndnis 90 / die gr\u00fcnen (gal)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_parties\" (\n \"name_english\" text,\n \"name_german\" text,\n \"abbr\" text,\n \"ideology\" text,\n \"position\" text,\n \"votes_2011\" text,\n \"seats_in_hamburgische_b_rgerschaft\" real\n);\n\nQuestion: WHAT IS THE GERMAN NAME OF LIBERALISM?" }, { "role": "assistant", "content": "SELECT \"name_german\" FROM \"political_parties\" WHERE \"ideology\"='liberalism';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"political_parties\" (\n \"name_english\" text,\n \"name_german\" text,\n \"abbr\" text,\n \"ideology\" text,\n \"position\" text,\n \"votes_2011\" text,\n \"seats_in_hamburgische_b_rgerschaft\" real\n);\n\nQuestion: WHAT ARE THE SEATS IN Hamburgische B\u00fcrgerschaft WITH THE NAME alliance '90/the greens?" }, { "role": "assistant", "content": "SELECT \"seats_in_hamburgische_b_rgerschaft\" FROM \"political_parties\" WHERE \"name_english\"='alliance ''90/the greens';" } ]
[ { "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 is the earliest game played at the TD Waterhouse Centre?" }, { "role": "assistant", "content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"location\"='td waterhouse centre';" } ]
[ { "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: Who was the opponent on April 2?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 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 \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What was the highest game number when the opponent was the Miami Heat?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"opponent\"='miami heat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_information\" (\n \"source_version\" text,\n \"target_version\" text,\n \"last_release\" text,\n \"license\" text,\n \"website\" text\n);\n\nQuestion: What is Website, when License is Apache License 2.0?" }, { "role": "assistant", "content": "SELECT \"website\" FROM \"main_information\" WHERE \"license\"='apache license 2.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_information\" (\n \"source_version\" text,\n \"target_version\" text,\n \"last_release\" text,\n \"license\" text,\n \"website\" text\n);\n\nQuestion: What is Source Version, when Target Version is Java 7, 6, 5?" }, { "role": "assistant", "content": "SELECT \"source_version\" FROM \"main_information\" WHERE \"target_version\"='java 7, 6, 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_information\" (\n \"source_version\" text,\n \"target_version\" text,\n \"last_release\" text,\n \"license\" text,\n \"website\" text\n);\n\nQuestion: What is Source Version, when License is LGPL or MPL?" }, { "role": "assistant", "content": "SELECT \"source_version\" FROM \"main_information\" WHERE \"license\"='lgpl or mpl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_information\" (\n \"source_version\" text,\n \"target_version\" text,\n \"last_release\" text,\n \"license\" text,\n \"website\" text\n);\n\nQuestion: What is Target Version, when Last Release is 2009-08-09, 1.2.9?" }, { "role": "assistant", "content": "SELECT \"target_version\" FROM \"main_information\" WHERE \"last_release\"='2009-08-09, 1.2.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_information\" (\n \"source_version\" text,\n \"target_version\" text,\n \"last_release\" text,\n \"license\" text,\n \"website\" text\n);\n\nQuestion: What is Website, when Last Release is 2009-08-09, 1.2.9?" }, { "role": "assistant", "content": "SELECT \"website\" FROM \"main_information\" WHERE \"last_release\"='2009-08-09, 1.2.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_information\" (\n \"source_version\" text,\n \"target_version\" text,\n \"last_release\" text,\n \"license\" text,\n \"website\" text\n);\n\nQuestion: What is Target Version, when License is LGPL or MPL?" }, { "role": "assistant", "content": "SELECT \"target_version\" FROM \"main_information\" WHERE \"license\"='lgpl or mpl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_kjjj\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the class for the ERP W of 500?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"broadcast_translators_of_kjjj\" WHERE \"erp_w\"=500;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_kjjj\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the ERP W for the station whose call sign is K248BJ and whose frequency MHz is higher than 97.5?" }, { "role": "assistant", "content": "SELECT AVG(\"erp_w\") FROM \"broadcast_translators_of_kjjj\" WHERE \"call_sign\"='k248bj' AND \"frequency_m_hz\">97.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_kjjj\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: In which city is the station licensed whose frequency MHz is higher than 102.3 and the ERP W is lower than 1,000?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"broadcast_translators_of_kjjj\" WHERE \"frequency_m_hz\"=102.3 AND \"erp_w\"<'1,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_kjjj\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: In which city is the station licensed whose frequency MHz is higher than 102.3 and whose call sign is K292EU?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"broadcast_translators_of_kjjj\" WHERE \"frequency_m_hz\">102.3 AND \"call_sign\"='k292eu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"purse_us\" real,\n \"winner_s_share\" text\n);\n\nQuestion: What was sweden's purse in USD?" }, { "role": "assistant", "content": "SELECT SUM(\"purse_us\") FROM \"winners\" WHERE \"country\"='sweden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"purse_us\" real,\n \"winner_s_share\" text\n);\n\nQuestion: What was 2003's To Par?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"winners\" WHERE \"year\"=2003;" } ]
[ { "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 is the highest laps for the grid of 7?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\"=7;" } ]
[ { "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 are the average Laps for the time/retired of +16.874 secs, and a grid less than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"time_retired\"='+16.874 secs' AND \"grid\"<5;" } ]
[ { "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 are the greatest points for a time/retired of +32.256 secs, and a a grid larger than 12?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"race\" WHERE \"time_retired\"='+32.256 secs' AND \"grid\">12;" } ]
[ { "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 is biggest grid when the laps are 65?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"laps\"=65;" } ]
[ { "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 team has a grid of 15?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race\" WHERE \"grid\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"council_composition\" (\n \"party\" text,\n \"previous_council\" real,\n \"staying_councillors\" real,\n \"seats_up_for_election\" real,\n \"election_result\" real,\n \"new_council\" real\n);\n\nQuestion: What is the average new council number when the election result is smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"new_council\") FROM \"council_composition\" WHERE \"election_result\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"council_composition\" (\n \"party\" text,\n \"previous_council\" real,\n \"staying_councillors\" real,\n \"seats_up_for_election\" real,\n \"election_result\" real,\n \"new_council\" real\n);\n\nQuestion: How many seats were up for election during the vote where the election result was 9 and the new council 27?" }, { "role": "assistant", "content": "SELECT SUM(\"seats_up_for_election\") FROM \"council_composition\" WHERE \"election_result\"=9 AND \"new_council\">27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"council_composition\" (\n \"party\" text,\n \"previous_council\" real,\n \"staying_councillors\" real,\n \"seats_up_for_election\" real,\n \"election_result\" real,\n \"new_council\" real\n);\n\nQuestion: How many staying councillors were there when the election result was larger than 0, the new council less than 27 and the party conservatives?" }, { "role": "assistant", "content": "SELECT AVG(\"staying_councillors\") FROM \"council_composition\" WHERE \"election_result\">0 AND \"party\"='conservatives' AND \"new_council\"<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\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text\n);\n\nQuestion: What opponent did the Broncos play on November 16?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text\n);\n\nQuestion: What was the Bronco's record when they played the Detroit Lions at Mile High Stadium?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"game_site\"='mile high stadium' AND \"opponent\"='detroit lions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game on November 22?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='november 22';" } ]
[ { "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\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest number of points scored when there were 1,500 in attendance?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"regular_season\" WHERE \"attendance\"='1,500';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"financial_data_in_millions_of_euro\" (\n \"year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real\n);\n\nQuestion: what is the average 2011 when 2012 is 65,000 and 2010 is more than 75,680?" }, { "role": "assistant", "content": "SELECT AVG(\"2011\") FROM \"financial_data_in_millions_of_euro\" WHERE \"2012\"='65,000' AND \"2010\">'75,680';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"financial_data_in_millions_of_euro\" (\n \"year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real\n);\n\nQuestion: what is 2001 when the year is ebitda and 2009 is less than 3,600?" }, { "role": "assistant", "content": "SELECT SUM(\"2001\") FROM \"financial_data_in_millions_of_euro\" WHERE \"year\"='ebitda' AND \"2009\"<'3,600';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"financial_data_in_millions_of_euro\" (\n \"year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real\n);\n\nQuestion: what is the lowest 2003 when 2009 is less than 15,884, 2006 is less than 9,845 and 2004 is less than 868?" }, { "role": "assistant", "content": "SELECT MIN(\"2003\") FROM \"financial_data_in_millions_of_euro\" WHERE \"2009\"<'15,884' AND \"2006\"<'9,845' AND \"2004\"<868;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"odyssey_award_winners_and_honor_audioboo\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"narrator\" text,\n \"author\" text,\n \"citation\" text\n);\n\nQuestion: who is the author for harry potter and the deathly hallows?" }, { "role": "assistant", "content": "SELECT \"author\" FROM \"odyssey_award_winners_and_honor_audioboo\" WHERE \"title\"='harry potter and the deathly hallows';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"odyssey_award_winners_and_honor_audioboo\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"narrator\" text,\n \"author\" text,\n \"citation\" text\n);\n\nQuestion: what is the title when the citation is honor and the narrator is lincoln hoppe?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"odyssey_award_winners_and_honor_audioboo\" WHERE \"citation\"='honor' AND \"narrator\"='lincoln hoppe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"odyssey_award_winners_and_honor_audioboo\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"narrator\" text,\n \"author\" text,\n \"citation\" text\n);\n\nQuestion: who is the producer when the narrator is katherine kellgren, the year is before 2013 and the author is karen cushman?" }, { "role": "assistant", "content": "SELECT \"producer\" FROM \"odyssey_award_winners_and_honor_audioboo\" WHERE \"narrator\"='katherine kellgren' AND \"year\"<2013 AND \"author\"='karen cushman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"odyssey_award_winners_and_honor_audioboo\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"narrator\" text,\n \"author\" text,\n \"citation\" text\n);\n\nQuestion: what is the year when the citation is honor and the author is kadir nelson?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"odyssey_award_winners_and_honor_audioboo\" WHERE \"citation\"='honor' AND \"author\"='kadir nelson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pro_slam\" (\n \"outcome\" text,\n \"year\" real,\n \"pro_slam_championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Opponent In The Final, when Year is \"1942\"?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"pro_slam\" WHERE \"year\"=1942;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pro_slam\" (\n \"outcome\" text,\n \"year\" real,\n \"pro_slam_championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the average Year, when Outcome is \"Winner\"?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"pro_slam\" WHERE \"outcome\"='winner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_10_7_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What tournament did Pemra \u00d6zgen play against julia kimmelmann in the finals?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_10_7_3\" WHERE \"opponent_in_the_final\"='julia kimmelmann';" } ]
[ { "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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Home has a Visitor of nashville?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"game_log\" WHERE \"visitor\"='nashville';" } ]
[ { "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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Visitor has a Decision of osgood, and a Date of february 15?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"decision\"='osgood' AND \"date\"='february 15';" } ]
[ { "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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Date has a Record of 36\u201311\u20137?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='36\u201311\u20137';" } ]
[ { "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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Date has a Visitor of edmonton?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='edmonton';" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Bronze, when Gold is less than 1, when Total is greater than 1, and when Rank is 10?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<1 AND \"total\">1 AND \"rank\"=10;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Bronze, when Rank is greater than 6, when Nation is Italy (ITA), and when Total is less than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"rank\">6 AND \"nation\"='italy (ita)' AND \"total\"<1;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Total, when Silver is greater than 1, when Rank is 9, and when Bronze is greater than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"silver\">1 AND \"rank\"=9 AND \"bronze\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Gold, when Total is 2, when Silver is less than 1, and when Rank is greater than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"total\"=2 AND \"silver\"<1 AND \"rank\">5;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Rank, when Bronze is less than 1, when Nation is Switzerland (SUI), and when Total is less than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"medal_table\" WHERE \"bronze\"<1 AND \"nation\"='switzerland (sui)' AND \"total\"<2;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Total, when Silver is greater than 1, when Nation is Germany (GER), and when Gold is less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"silver\">1 AND \"nation\"='germany (ger)' AND \"gold\"<1;" } ]
[ { "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\" real,\n \"money\" real\n);\n\nQuestion: What is Player, when To Par is \"7\", and when Score is \"73-72-67-75=287\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_round\" WHERE \"to_par\"=7 AND \"score\"='73-72-67-75=287';" } ]
[ { "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\" real,\n \"money\" real\n);\n\nQuestion: What is the average To Par, when Player is \"Billy Casper\"?" }, { "role": "assistant", "content": "SELECT AVG(\"to_par\") FROM \"final_round\" WHERE \"player\"='billy casper';" } ]
[ { "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\" real,\n \"money\" real\n);\n\nQuestion: What is the highest Money ( $ ), when To Par is less than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"money\") FROM \"final_round\" WHERE \"to_par\"<2;" } ]
[ { "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 \"location\" text\n);\n\nQuestion: What event in guam did Tetsuji Kato win against patrick madayag?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"location\"='guam' AND \"opponent\"='patrick madayag';" } ]
[ { "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 \"location\" text\n);\n\nQuestion: What was the result of the fight when Tetsuji Kato's record was 19-9?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='19-9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"games\" real,\n \"reception\" real,\n \"yards\" real,\n \"long\" real\n);\n\nQuestion: How many receptions were smaller than 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"reception\") FROM \"receiving\" WHERE \"long\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"games\" real,\n \"reception\" real,\n \"yards\" real,\n \"long\" real\n);\n\nQuestion: What is the average yards for Jimmie Giles in a game larger than 15 and reception larger than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"yards\") FROM \"receiving\" WHERE \"games\">15 AND \"reception\">2 AND \"player\"='jimmie giles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_records\" (\n \"year\" text,\n \"league_position\" text,\n \"league\" text,\n \"domestic_cup\" text,\n \"cup_position\" text\n);\n\nQuestion: What year had a league position of 8/12?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"domestic_records\" WHERE \"league_position\"='8/12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_records\" (\n \"year\" text,\n \"league_position\" text,\n \"league\" text,\n \"domestic_cup\" text,\n \"cup_position\" text\n);\n\nQuestion: What league has a position of 8/13?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"domestic_records\" WHERE \"league_position\"='8/13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_records\" (\n \"year\" text,\n \"league_position\" text,\n \"league\" text,\n \"domestic_cup\" text,\n \"cup_position\" text\n);\n\nQuestion: What year did the malaysia premier league get a position of 8/12?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"domestic_records\" WHERE \"league\"='malaysia premier league' AND \"league_position\"='8/12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_records\" (\n \"year\" text,\n \"league_position\" text,\n \"league\" text,\n \"domestic_cup\" text,\n \"cup_position\" text\n);\n\nQuestion: What year had a cup position of round 1 and a league position of 5/12?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"domestic_records\" WHERE \"cup_position\"='round 1' AND \"league_position\"='5/12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_records\" (\n \"year\" text,\n \"league_position\" text,\n \"league\" text,\n \"domestic_cup\" text,\n \"cup_position\" text\n);\n\nQuestion: What year had a domestic cup of singapore cup?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"domestic_records\" WHERE \"domestic_cup\"='singapore cup';" } ]