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 \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"green\" text\n);\n\nQuestion: What's the 2008 Status of Rosa Delauro?" }, { "role": "assistant", "content": "SELECT \"2008_status\" FROM \"match_up_summary\" WHERE \"democratic\"='rosa delauro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"green\" text\n);\n\nQuestion: Who was the incumbent when Bo Itshaky was the Republican?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"match_up_summary\" WHERE \"republican\"='bo itshaky';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"green\" text\n);\n\nQuestion: Who was the Republican in the district more than 4?" }, { "role": "assistant", "content": "SELECT \"republican\" FROM \"match_up_summary\" WHERE \"district\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"green\" text\n);\n\nQuestion: Who was the Republican when the green was Harold Burbank?" }, { "role": "assistant", "content": "SELECT \"republican\" FROM \"match_up_summary\" WHERE \"green\"='harold burbank';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"green\" text\n);\n\nQuestion: Who was the Democratic when then Incumbent was Christopher Shays?" }, { "role": "assistant", "content": "SELECT \"democratic\" FROM \"match_up_summary\" WHERE \"incumbent\"='christopher shays';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"title\" text,\n \"director\" text,\n \"studio_s\" text,\n \"notes\" text\n);\n\nQuestion: Who is the director of Antz?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1990s\" WHERE \"title\"='antz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"title\" text,\n \"director\" text,\n \"studio_s\" text,\n \"notes\" text\n);\n\nQuestion: What studio has the director Philip Frank Messina?" }, { "role": "assistant", "content": "SELECT \"studio_s\" FROM \"1990s\" WHERE \"director\"='philip frank messina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text\n);\n\nQuestion: What are the club number for the first round?" }, { "role": "assistant", "content": "SELECT \"clubs\" FROM \"calendar\" WHERE \"round\"='first round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text\n);\n\nQuestion: when there were 48 \u2192 32 clubs?" }, { "role": "assistant", "content": "SELECT \"new_entries_this_round\" FROM \"calendar\" WHERE \"clubs\"='48 \u2192 32';" } ]
[ { "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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where was the fight that took a time of 1:37?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:37';" } ]
[ { "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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the resolution of the fight against kiuma kunioku with a time of 15:00?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='15:00' AND \"opponent\"='kiuma kunioku';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_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 number of bronze medals won by Poland?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medals_table\" WHERE \"nation\"='poland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_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 number of gold medals Switzerland received when they ranked larger than 1st and received fewer than 10 bronze medals and more than 1 silver medal?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medals_table\" WHERE \"total\">1 AND \"bronze\"<10 AND \"nation\"='switzerland' AND \"silver\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"peak\" text,\n \"country\" text,\n \"island\" text,\n \"elevation_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the rank when the col is larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"col_m\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"peak\" text,\n \"country\" text,\n \"island\" text,\n \"elevation_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the rank when the elevation is 1,628, and Col (m) is larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"elevation_m\"='1,628' AND \"col_m\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"peak\" text,\n \"country\" text,\n \"island\" text,\n \"elevation_m\" real,\n \"col_m\" real\n);\n\nQuestion: What is the elevation of Vanuatu, when the rank is smaller than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"elevation_m\") FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"country\"='vanuatu' AND \"rank\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_selling_video_games_of_the_1990s_sa\" (\n \"rank\" real,\n \"title\" text,\n \"release_date\" text,\n \"franchise\" text,\n \"developer_s\" text,\n \"platform\" text,\n \"units_sold_in_millions\" real\n);\n\nQuestion: What's the platform of Super Mario All-Stars?" }, { "role": "assistant", "content": "SELECT \"platform\" FROM \"best_selling_video_games_of_the_1990s_sa\" WHERE \"title\"='super mario all-stars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1938_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average number of losses when there are more than 4 wins, and the against matches is more than 1728?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"1938_ladder\" WHERE \"wins\"<4 AND \"against\">1728;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1938_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of draws when there is 1 Win, and less than 1728 against matches?" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"1938_ladder\" WHERE \"wins\"=1 AND \"against\"<1728;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1938_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the highest number of wins when there are less than 2 losses?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"1938_ladder\" WHERE \"losses\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1938_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the highest number of losses for the Cobden club when there is less than 1 win?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"1938_ladder\" WHERE \"club\"='cobden' AND \"wins\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1938_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average number of wins for the Terang Club, when there are less than 0 draws?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"1938_ladder\" WHERE \"club\"='terang' AND \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_softball_congress_1947_to_1957\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What year was Clark-Smith Autos, Phoenix, AZ in 2nd place?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"national_softball_congress_1947_to_1957\" WHERE \"2nd_place_team\"='clark-smith autos, phoenix, az';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_softball_congress_1947_to_1957\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: Who was the 2nd place team when the location was Tulsa, OK before 1956?" }, { "role": "assistant", "content": "SELECT \"2nd_place_team\" FROM \"national_softball_congress_1947_to_1957\" WHERE \"host_location\"='tulsa, ok' AND \"year\"<1956;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locations\" (\n \"iteration\" text,\n \"year\" real,\n \"dates\" text,\n \"location\" text,\n \"theme\" text\n);\n\nQuestion: In what Year is the Location of the Festival Koror, Palau?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"locations\" WHERE \"location\"='koror, palau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locations\" (\n \"iteration\" text,\n \"year\" real,\n \"dates\" text,\n \"location\" text,\n \"theme\" text\n);\n\nQuestion: What is the Location of the 10th Iteration?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"locations\" WHERE \"iteration\"='10th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locations\" (\n \"iteration\" text,\n \"year\" real,\n \"dates\" text,\n \"location\" text,\n \"theme\" text\n);\n\nQuestion: What is the Location of the \"My Pacific\" Theme?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"locations\" WHERE \"theme\"='\\\"my pacific\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_councils\" (\n \"party\" text,\n \"county\" real,\n \"city\" real,\n \"borough\" real,\n \"town\" real,\n \"total\" real\n);\n\nQuestion: How many counties have people before profit as the party, and a borough greater than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"county\") FROM \"all_councils\" WHERE \"party\"='people before profit' AND \"borough\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_councils\" (\n \"party\" text,\n \"county\" real,\n \"city\" real,\n \"borough\" real,\n \"town\" real,\n \"total\" real\n);\n\nQuestion: How many counties have 2 as the total, 0 as the city with a town less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"county\") FROM \"all_councils\" WHERE \"total\"=2 AND \"city\"=0 AND \"town\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_councils\" (\n \"party\" text,\n \"county\" real,\n \"city\" real,\n \"borough\" real,\n \"town\" real,\n \"total\" real\n);\n\nQuestion: What average city has a total less than 2, with a borough greater than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"city\") FROM \"all_councils\" WHERE \"total\"<2 AND \"borough\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the rank # of the swimmer in Lane 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"semifinal_1\" WHERE \"lane\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the total fat with a smoke point of \u00b0c () and 37g of polyunsaturated fat?" }, { "role": "assistant", "content": "SELECT \"total_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"smoke_point\"='\u00b0c ()' AND \"polyunsaturated_fat\"='37g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the saturated fat with 28g of polyunsaturated fat?" }, { "role": "assistant", "content": "SELECT \"saturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"polyunsaturated_fat\"='28g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the monounsaturated fat with 15g of saturated fat?" }, { "role": "assistant", "content": "SELECT \"monounsaturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"saturated_fat\"='15g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the saturated fat with a total fat of 100g and 11g of polyunsaturated fat?" }, { "role": "assistant", "content": "SELECT \"saturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"total_fat\"='100g' AND \"polyunsaturated_fat\"='11g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the monounsaturated fat with a smoke point of \u00b0c (), a total fat of 100g, 11g of polyunsaturated fat, and 14g of saturated fat?" }, { "role": "assistant", "content": "SELECT \"monounsaturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"smoke_point\"='\u00b0c ()' AND \"total_fat\"='100g' AND \"polyunsaturated_fat\"='11g' AND \"saturated_fat\"='14g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the polyunsaturated fat with a smoke point of \u00b0c (), a total fat of 100g and 63g of monounsaturated fat?" }, { "role": "assistant", "content": "SELECT \"polyunsaturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"smoke_point\"='\u00b0c ()' AND \"total_fat\"='100g' AND \"monounsaturated_fat\"='63g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_timeline\" (\n \"tournament\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: What is the win % of the 2003 atp world tour finals?" }, { "role": "assistant", "content": "SELECT \"win_pct\" FROM \"grand_slam_timeline\" WHERE \"2003\"='atp world tour finals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_timeline\" (\n \"tournament\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: What is the 2006 value of the 2011 grand slam tournaments?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"grand_slam_timeline\" WHERE \"2011\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_timeline\" (\n \"tournament\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: What is the 2007 value with a 1r in 2009?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"grand_slam_timeline\" WHERE \"2009\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_timeline\" (\n \"tournament\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: What is the 2007 value with a 4r in 2006, a 1r in 2004, and a 4r in 2009?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"grand_slam_timeline\" WHERE \"2006\"='4r' AND \"2004\"='1r' AND \"2009\"='4r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"winner\" text,\n \"score\" text\n);\n\nQuestion: who is the home team when the away team is rivercity rage?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"year_by_year\" WHERE \"away_team\"='rivercity rage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"winner\" text,\n \"score\" text\n);\n\nQuestion: who is the winner when the score is 71-62?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"year_by_year\" WHERE \"score\"='71-62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"winner\" text,\n \"score\" text\n);\n\nQuestion: who is the winner when the home team is sioux falls storm and the year is earlier than 2012?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"year_by_year\" WHERE \"home_team\"='sioux falls storm' AND \"year\"<2012;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"winner\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the away team is rivercity rage?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"year_by_year\" WHERE \"away_team\"='rivercity rage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"winner\" text,\n \"score\" text\n);\n\nQuestion: what is the year when the score is 59-32?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"year_by_year\" WHERE \"score\"='59-32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sport\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"capacity\" real\n);\n\nQuestion: What is the venue established after 1948?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"sport\" WHERE \"established\">1948;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sport\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"capacity\" real\n);\n\nQuestion: What is the league established before 1930 with the rayo vallecano club?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"sport\" WHERE \"established\"<1930 AND \"club\"='rayo vallecano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sport\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"capacity\" real\n);\n\nQuestion: What sport is the rayo vallecano club in?" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"sport\" WHERE \"club\"='rayo vallecano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sport\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"capacity\" real\n);\n\nQuestion: What sport is the cb estudiantes club in?" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"sport\" WHERE \"club\"='cb estudiantes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the label for CAD 2014 CD?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalogue_num\"='cad 2014 cd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the format for the catalogue number GAD 2014 CD on July 6, 1998?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalogue_num\"='gad 2014 cd' AND \"date\"='july 6, 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many wins are there when the draws are less than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"1940_ladder\" WHERE \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the most losses when there are 5 wins and draws less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"1940_ladder\" WHERE \"wins\"=5 AND \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the most wins of Terang with the draws less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"1940_ladder\" WHERE \"club\"='terang' AND \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest against when the draws are more than 0 and the losses are less than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"against\") FROM \"1940_ladder\" WHERE \"losses\"<3 AND \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the least losses of Warrnambool with more than 6 wins and less than 630 against?" }, { "role": "assistant", "content": "SELECT MIN(\"losses\") FROM \"1940_ladder\" WHERE \"against\"<630 AND \"club\"='warrnambool' AND \"wins\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the draws of Cobden when there are more than 3 losses?" }, { "role": "assistant", "content": "SELECT AVG(\"draws\") FROM \"1940_ladder\" WHERE \"losses\">3 AND \"club\"='cobden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What average bronze has 0 as the silver, 17 as the rank, and a gold less than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medals_table\" WHERE \"silver\"=0 AND \"rank\"='17' AND \"gold\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest silver that has 2 as the bronze, with a total greater than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medals_table\" WHERE \"bronze\"=2 AND \"total\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes have a total less than 11, with 11 as the rank, and a gold less than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"medals_table\" WHERE \"total\"<11 AND \"rank\"='11' AND \"gold\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"cores\" real,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"i_o_bus\" text,\n \"mult\" text,\n \"memory\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the memory with a socket g1 and a 1/1/6/9 turbo?" }, { "role": "assistant", "content": "SELECT \"memory\" FROM \"45_nm\" WHERE \"socket\"='socket g1' AND \"turbo\"='1/1/6/9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"cores\" real,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"i_o_bus\" text,\n \"mult\" text,\n \"memory\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the release date of the 6 mb L3 cache with the part number by80607005259aabx80607i7740qm?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"45_nm\" WHERE \"l3_cache\"='6 mb' AND \"part_number_s\"='by80607005259aabx80607i7740qm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What was the lowest draw for Beathoven when the place was smaller than 16?" }, { "role": "assistant", "content": "SELECT MIN(\"draw\") FROM \"results\" WHERE \"artist\"='beathoven' AND \"place\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What Luca Barbarossa song had a draw smaller than 20?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"results\" WHERE \"draw\"<20 AND \"artist\"='luca barbarossa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_results\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"record\" text,\n \"rank\" text\n);\n\nQuestion: Who did they play at sec tournament?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"2012_results\" WHERE \"location\"='sec tournament';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_results\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"record\" text,\n \"rank\" text\n);\n\nQuestion: Where was the game played when their record was 9-1-0?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"2012_results\" WHERE \"record\"='9-1-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"children_of_earth\" text,\n \"run_time\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"viewers_including_hd_in_millions\" text\n);\n\nQuestion: Who is the writer of Children of Earth of \"day four\"?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"episodes\" WHERE \"children_of_earth\"='\\\"day four\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"children_of_earth\" text,\n \"run_time\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"viewers_including_hd_in_millions\" text\n);\n\nQuestion: How many viewers were there for Children of Earth of \"day one\"?" }, { "role": "assistant", "content": "SELECT \"viewers_including_hd_in_millions\" FROM \"episodes\" WHERE \"children_of_earth\"='\\\"day one\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"children_of_earth\" text,\n \"run_time\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"viewers_including_hd_in_millions\" text\n);\n\nQuestion: Who was the director of Children of Earth of \"day five\"?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"episodes\" WHERE \"children_of_earth\"='\\\"day five\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"children_of_earth\" text,\n \"run_time\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"viewers_including_hd_in_millions\" text\n);\n\nQuestion: Who was the director of the episode written by Russell T Davies and James Moran?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"episodes\" WHERE \"writer\"='russell t davies and james moran';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Points have Drawn of 1, and a Played larger than 14?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"relegation_round\" WHERE \"drawn\"=1 AND \"played\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Position has Drawn larger than 1, and a Played smaller than 14?" }, { "role": "assistant", "content": "SELECT MAX(\"position\") FROM \"relegation_round\" WHERE \"drawn\">1 AND \"played\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Lost has Drawn larger than 1, and a Played larger than 14?" }, { "role": "assistant", "content": "SELECT MIN(\"lost\") FROM \"relegation_round\" WHERE \"drawn\">1 AND \"played\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How much Lost has Points larger than 15, and a Name of ev pegnitz?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"relegation_round\" WHERE \"points\">15 AND \"name\"='ev pegnitz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the english translation when the artist is ann christine?" }, { "role": "assistant", "content": "SELECT \"english_translation\" FROM \"results\" WHERE \"artist\"='ann christine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sixteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player was picked earlier than 126 by the Houston Oilers?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"sixteenth_round\" WHERE \"pick\"<126 AND \"team\"='houston oilers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sixteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college was picked later than 122 by the Boston Patriots?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"sixteenth_round\" WHERE \"pick\">122 AND \"team\"='boston patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: what is the to par for geoff ogilvy?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"player\"='geoff ogilvy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: what is the country for geoff ogilvy?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"player\"='geoff ogilvy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: what is the to par for retief goosen?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"player\"='retief goosen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: how many times is the player jim furyk?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"made_the_cut\" WHERE \"player\"='jim furyk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the lowest lane in which an athlete got a time larger than 20.75 and a react smaller than 0.166?" }, { "role": "assistant", "content": "SELECT MIN(\"lane\") FROM \"heat_2\" WHERE \"time\">20.75 AND \"react\"<0.166;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is Christian Malcolm\u00b4s highest react when his time was below 20.58?" }, { "role": "assistant", "content": "SELECT MAX(\"react\") FROM \"heat_2\" WHERE \"time\"<20.58 AND \"athlete\"='christian malcolm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year_a\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what is the position when the year [A} is after 2011 and the pick is 28?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"player_selections\" WHERE \"year_a\">2011 AND \"pick\"='28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year_a\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the player when the pick is 22 and the year [A] is after 1979?" }, { "role": "assistant", "content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"pick\"='22' AND \"year_a\">1979;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year_a\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: who is the player when the pick is 15 and the year [A] is 2000?" }, { "role": "assistant", "content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"pick\"='15' AND \"year_a\"=2000;" } ]
[ { "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: Which country was the player from who scored 66-72-70=207?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='66-72-70=207';" } ]
[ { "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 place was the player who scored 70-69-68=207?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='70-69-68=207';" } ]
[ { "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 country was the player in t10 place with a score of 66-72-70=207?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"place\"='t10' AND \"score\"='66-72-70=207';" } ]
[ { "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 of United States' Cristie Kerr?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"country\"='united states' AND \"player\"='cristie kerr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"song\" text,\n \"performer\" text,\n \"original_artist\" text,\n \"length\" text,\n \"recorded\" text\n);\n\nQuestion: Who is the original artist of the 3:00 song?" }, { "role": "assistant", "content": "SELECT \"original_artist\" FROM \"track_listing\" WHERE \"length\"='3:00';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"song\" text,\n \"performer\" text,\n \"original_artist\" text,\n \"length\" text,\n \"recorded\" text\n);\n\nQuestion: How long is \"Harvest\"?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"track_listing\" WHERE \"song\"='\\\"harvest\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"song\" text,\n \"performer\" text,\n \"original_artist\" text,\n \"length\" text,\n \"recorded\" text\n);\n\nQuestion: Which song lasts 3:34?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"track_listing\" WHERE \"length\"='3:34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"song\" text,\n \"performer\" text,\n \"original_artist\" text,\n \"length\" text,\n \"recorded\" text\n);\n\nQuestion: Who is the original artist of \"Let's Dance\"?" }, { "role": "assistant", "content": "SELECT \"original_artist\" FROM \"track_listing\" WHERE \"song\"='\\\"let''s dance\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"song\" text,\n \"performer\" text,\n \"original_artist\" text,\n \"length\" text,\n \"recorded\" text\n);\n\nQuestion: Which song lasts 4:08?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"track_listing\" WHERE \"length\"='4:08';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals for Romania when the silver count is more than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='romania' AND \"silver\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"num_a\" text,\n \"manager\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"w_pct\" real\n);\n\nQuestion: Which manager had less than 287 losses, less than 80 wins, a win percentage of 0.296, and was employed in 1904?" }, { "role": "assistant", "content": "SELECT \"manager\" FROM \"managers\" WHERE \"losses\"<287 AND \"wins\"<80 AND \"years\"='1904' AND \"w_pct\"=0.296;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"solo_singles\" (\n \"year\" real,\n \"u_s_hot_100\" text,\n \"u_s_r_b\" text,\n \"u_s_rap\" text,\n \"album\" text\n);\n\nQuestion: Which U.S. Hot has 13 as the U.S. R&B?" }, { "role": "assistant", "content": "SELECT \"u_s_hot_100\" FROM \"solo_singles\" WHERE \"u_s_r_b\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"solo_singles\" (\n \"year\" real,\n \"u_s_hot_100\" text,\n \"u_s_r_b\" text,\n \"u_s_rap\" text,\n \"album\" text\n);\n\nQuestion: What U.S. Rap has life in the concrete jungle as the album?" }, { "role": "assistant", "content": "SELECT \"u_s_rap\" FROM \"solo_singles\" WHERE \"album\"='life in the concrete jungle';" } ]