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 \"400_w_sub_bands\" (\n \"band\" real,\n \"frequency_m_hz\" text,\n \"wavelength\" text,\n \"type\" text,\n \"power_w\" real\n);\n\nQuestion: What is the Wavelength of Frequency (MHz) 14.050\u201314.150?" }, { "role": "assistant", "content": "SELECT \"wavelength\" FROM \"400_w_sub_bands\" WHERE \"frequency_m_hz\"='14.050\u201314.150';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"satellite_awards\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: Who are the recipients in 1994?" }, { "role": "assistant", "content": "SELECT \"recipients_and_nominees\" FROM \"satellite_awards\" WHERE \"year\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"satellite_awards\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: Who are the recipients that won for David Duchovny role/episode?" }, { "role": "assistant", "content": "SELECT \"recipients_and_nominees\" FROM \"satellite_awards\" WHERE \"role_episode\"='david duchovny' AND \"result\"='won';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"satellite_awards\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: What's the category in 1998 with the role/episode of David Duchovny?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"satellite_awards\" WHERE \"year\"=1998 AND \"role_episode\"='david duchovny';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: Which network has more than 31.4 channels with a 4:3 aspect?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"digital_channels\" WHERE \"aspect\"='4:3' AND \"channel\">31.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: Which video is on channel 31.2 with a 4:3 aspect?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"aspect\"='4:3' AND \"channel\"=31.2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: Which video has a 16:9 aspect?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"aspect\"='16:9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What's the constituency number of the Seoni district and has none reserved?" }, { "role": "assistant", "content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"reserved_for_sc_st_none\"='none' AND \"district\"='seoni';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the district of Paraswada with none reserved?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"reserved_for_sc_st_none\"='none' AND \"name\"='paraswada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What's the reserved number for constituency number 108?" }, { "role": "assistant", "content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"constituency_number\"='108';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What's the name of Constituency number 108?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"constituency_number\"='108';" } ]
[ { "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 lowest total medals when there were 0 gold medals, 0 silver medals, and more than 1 bronze medal?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"silver\"=0 AND \"gold\"<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 sum of the bronze medals when there were less than 8 total medals, 0 silver medals and a rank of 9?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"total\"<8 AND \"rank\"=9 AND \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation had a rank higher than 4, a total of 2 medals and more than 0 silver medals?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"rank\">4 AND \"total\"=2 AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the average rank for the team that had more than 5 medals and more than 6 gold medals?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"medal_table\" WHERE \"total\">5 AND \"gold\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"result_of_national_final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: Which artist has a draw higher than 4 and fewer than 5 points?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"result_of_national_final\" WHERE \"draw\">4 AND \"points\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"result_of_national_final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: Which artist has 13 points?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"result_of_national_final\" WHERE \"points\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"floor_event_final_qualifiers\" (\n \"position\" text,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the greatest B score when the A score was less than 6.5?" }, { "role": "assistant", "content": "SELECT MAX(\"b_score\") FROM \"floor_event_final_qualifiers\" WHERE \"a_score\"<6.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Time of the Great Britain players with Notes of SA/B?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"repechage_2\" WHERE \"notes\"='sa/b' AND \"country\"='great britain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Rowers of the race with a Time of 7:41.97 and Notes of FC?" }, { "role": "assistant", "content": "SELECT \"rowers\" FROM \"repechage_2\" WHERE \"notes\"='fc' AND \"time\"='7:41.97';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Week of the game against the Minnesota Vikings?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"opponent\"='minnesota vikings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Week of the game against Green Bay Packers?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"opponent\"='green bay packers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Attendance of the game with a Result of L 20-14?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l 20-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Week number on October 5, 2003?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='october 5, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Week number with an Attendance of 62,123?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='62,123';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"oklahoma_counties_ranked_by_per_capita_i\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: How many households are in Ottawa?" }, { "role": "assistant", "content": "SELECT SUM(\"number_of_households\") FROM \"oklahoma_counties_ranked_by_per_capita_i\" WHERE \"county\"='ottawa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"oklahoma_counties_ranked_by_per_capita_i\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What county has a population more than 603,403 and a mediuan family income of $61,694?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"oklahoma_counties_ranked_by_per_capita_i\" WHERE \"population\">'603,403' AND \"median_family_income\"='$61,694';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school_ihsaa_i_dnum\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real\n);\n\nQuestion: What is the sum of enrollments for schools located in Culver?" }, { "role": "assistant", "content": "SELECT SUM(\"enrollment\") FROM \"membership\" WHERE \"location\"='culver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school_ihsaa_i_dnum\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real\n);\n\nQuestion: Which year did the school with enrollment of 413 join?" }, { "role": "assistant", "content": "SELECT \"year_joined\" FROM \"membership\" WHERE \"enrollment\"=413;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: How many years was Reasons to be Pretty nominated for best play?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"original_broadway_production\" WHERE \"category\"='best play';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is the first year that Reasons to be Pretty had a nominee for best performance by a leading actor in a play?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"original_broadway_production\" WHERE \"category\"='best performance by a leading actor in a play';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_and_fixtures\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the match report from the game played on 28 february 2009?" }, { "role": "assistant", "content": "SELECT \"match_report\" FROM \"results_and_fixtures\" WHERE \"date\"='28 february 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_and_fixtures\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the match report from the game played on 25 april 2009?" }, { "role": "assistant", "content": "SELECT \"match_report\" FROM \"results_and_fixtures\" WHERE \"date\"='25 april 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_and_fixtures\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: Where was the game played on 3 january 2009 against east fife?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"results_and_fixtures\" WHERE \"opponents\"='east fife' AND \"date\"='3 january 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_and_fixtures\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the match report for the game that was played on 23 august 2008 in stark's park during the second division competition?" }, { "role": "assistant", "content": "SELECT \"match_report\" FROM \"results_and_fixtures\" WHERE \"venue\"='stark''s park' AND \"competition\"='second division' AND \"date\"='23 august 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_and_fixtures\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the match report for the game played at forthbank stadium against stirling albion?" }, { "role": "assistant", "content": "SELECT \"match_report\" FROM \"results_and_fixtures\" WHERE \"opponents\"='stirling albion' AND \"venue\"='forthbank stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"narrow_gauge_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"drg_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement_uic_bauart\" text\n);\n\nQuestion: What is average quantity, when DRG number is 99 011?" }, { "role": "assistant", "content": "SELECT AVG(\"quantity\") FROM \"narrow_gauge_locomotives\" WHERE \"drg_number_s\"='99 011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"narrow_gauge_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"drg_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement_uic_bauart\" text\n);\n\nQuestion: Which railway number has 3 quantity?" }, { "role": "assistant", "content": "SELECT \"railway_number_s\" FROM \"narrow_gauge_locomotives\" WHERE \"quantity\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"narrow_gauge_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"drg_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement_uic_bauart\" text\n);\n\nQuestion: Which DRG number has xxx railway number?" }, { "role": "assistant", "content": "SELECT \"drg_number_s\" FROM \"narrow_gauge_locomotives\" WHERE \"railway_number_s\"='xxx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"narrow_gauge_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"drg_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement_uic_bauart\" text\n);\n\nQuestion: Which quantity has Axle arrangement (UIC)bauart of c n2t, and DRG number 99 093?" }, { "role": "assistant", "content": "SELECT \"quantity\" FROM \"narrow_gauge_locomotives\" WHERE \"axle_arrangement_uic_bauart\"='c n2t' AND \"drg_number_s\"='99 093';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dsds_performances\" (\n \"date\" text,\n \"topic_of_the_show\" text,\n \"song\" text,\n \"original_artist\" text,\n \"place_percentage\" text\n);\n\nQuestion: What song came out on March 8, 2008?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"dsds_performances\" WHERE \"date\"='march 8, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dsds_performances\" (\n \"date\" text,\n \"topic_of_the_show\" text,\n \"song\" text,\n \"original_artist\" text,\n \"place_percentage\" text\n);\n\nQuestion: What was the topic of the show on March 15, 2008?" }, { "role": "assistant", "content": "SELECT \"topic_of_the_show\" FROM \"dsds_performances\" WHERE \"date\"='march 15, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1939_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: When against is more than 1244 with less than 8 losses, what is the average of wins?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"1939_ladder\" WHERE \"against\">1244 AND \"losses\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_historic_textile_mills\" (\n \"refnum\" real,\n \"name\" text,\n \"built\" real,\n \"location\" text,\n \"construction\" text\n);\n\nQuestion: What is the name of the mill located on Anawan Street with a reference number larger than 8?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"existing_historic_textile_mills\" WHERE \"refnum\">8 AND \"location\"='anawan street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_historic_textile_mills\" (\n \"refnum\" real,\n \"name\" text,\n \"built\" real,\n \"location\" text,\n \"construction\" text\n);\n\nQuestion: What is the name of the mill constructed of red brick in 1910 with a reference number lower than 55?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"existing_historic_textile_mills\" WHERE \"refnum\"<55 AND \"built\"=1910 AND \"construction\"='red brick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_historic_textile_mills\" (\n \"refnum\" real,\n \"name\" text,\n \"built\" real,\n \"location\" text,\n \"construction\" text\n);\n\nQuestion: What is the location of the Durfee Mill No. 1, built before 1872 ?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"existing_historic_textile_mills\" WHERE \"built\"<1872 AND \"name\"='durfee mill no. 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_historic_textile_mills\" (\n \"refnum\" real,\n \"name\" text,\n \"built\" real,\n \"location\" text,\n \"construction\" text\n);\n\nQuestion: What is the location of the mill with a reference number of 44?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"existing_historic_textile_mills\" WHERE \"refnum\"=44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"name_pinyin\" text,\n \"name_wade_giles\" text,\n \"characters\" text,\n \"type\" text,\n \"construction\" text\n);\n\nQuestion: Which Construction is named of fu-hsing?" }, { "role": "assistant", "content": "SELECT \"construction\" FROM \"composition\" WHERE \"name_wade_giles\"='fu-hsing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"name_pinyin\" text,\n \"name_wade_giles\" text,\n \"characters\" text,\n \"type\" text,\n \"construction\" text\n);\n\nQuestion: which Construction is named heng-hai?" }, { "role": "assistant", "content": "SELECT \"construction\" FROM \"composition\" WHERE \"name_wade_giles\"='heng-hai';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"name_pinyin\" text,\n \"name_wade_giles\" text,\n \"characters\" text,\n \"type\" text,\n \"construction\" text\n);\n\nQuestion: Who has a Construction of 1873, foochow navy yard?" }, { "role": "assistant", "content": "SELECT \"characters\" FROM \"composition\" WHERE \"construction\"='1873, foochow navy yard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"name_pinyin\" text,\n \"name_wade_giles\" text,\n \"characters\" text,\n \"type\" text,\n \"construction\" text\n);\n\nQuestion: Which Name (pinyin) is named fu-ching?" }, { "role": "assistant", "content": "SELECT \"name_pinyin\" FROM \"composition\" WHERE \"name_wade_giles\"='fu-ching';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"name_pinyin\" text,\n \"name_wade_giles\" text,\n \"characters\" text,\n \"type\" text,\n \"construction\" text\n);\n\nQuestion: Who has a Construction of 1870, foochow navy yard, and a Name (Wade Giles) of fu-hsing?" }, { "role": "assistant", "content": "SELECT \"characters\" FROM \"composition\" WHERE \"construction\"='1870, foochow navy yard' AND \"name_wade_giles\"='fu-hsing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"release\" text,\n \"track\" text,\n \"format\" text,\n \"label\" text,\n \"year\" real\n);\n\nQuestion: Which Label has a Release of liebesgr\u00fcsse aus ost-berlin?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"discography\" WHERE \"release\"='liebesgr\u00fcsse aus ost-berlin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_scorers\" (\n \"rank\" real,\n \"player\" text,\n \"games_played\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: What is the rank of the person with more than 5 games played?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"leading_scorers\" WHERE \"games_played\">5;" } ]
[ { "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 golds have a bronze greater than 1, a silver greater than 1, with total as the rank?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medals_table\" WHERE \"bronze\">1 AND \"silver\">1 AND \"rank\"='total';" } ]
[ { "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 golds have a bronze greater than 1, total as the nation, and a silver less than 18?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medals_table\" WHERE \"bronze\">1 AND \"nation\"='total' AND \"silver\"<18;" } ]
[ { "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 west germany as the nation?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medals_table\" WHERE \"nation\"='west germany';" } ]
[ { "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 golds have denmark as the nation, with a total less than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medals_table\" WHERE \"nation\"='denmark' AND \"total\"<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: How many totals have 1 for the gold, 12 for the rank, and a sliver greater than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medals_table\" WHERE \"gold\"=1 AND \"rank\"='12' AND \"silver\">0;" } ]
[ { "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 1 for the bronze, 1 as the total, 17 as the rank, with a gold less than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medals_table\" WHERE \"bronze\"=1 AND \"total\"=1 AND \"rank\"='17' AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"japanese_title\" text,\n \"english_title\" text,\n \"year\" real,\n \"first_publisher\" text,\n \"isbn\" text\n);\n\nQuestion: What is the First Publisher prior to 1999?" }, { "role": "assistant", "content": "SELECT \"first_publisher\" FROM \"bibliography\" WHERE \"year\"<1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"japanese_title\" text,\n \"english_title\" text,\n \"year\" real,\n \"first_publisher\" text,\n \"isbn\" text\n);\n\nQuestion: What is the ISBN in 1999?" }, { "role": "assistant", "content": "SELECT \"isbn\" FROM \"bibliography\" WHERE \"year\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"japanese_title\" text,\n \"english_title\" text,\n \"year\" real,\n \"first_publisher\" text,\n \"isbn\" text\n);\n\nQuestion: What is the ISBN of Japanese Title of \u9727\u306e\u8a2a\u554f\u8005 (kiri no h\u014dmonsha)?" }, { "role": "assistant", "content": "SELECT \"isbn\" FROM \"bibliography\" WHERE \"japanese_title\"='\u9727\u306e\u8a2a\u554f\u8005 (kiri no h\u014dmonsha)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"japanese_title\" text,\n \"english_title\" text,\n \"year\" real,\n \"first_publisher\" text,\n \"isbn\" text\n);\n\nQuestion: What is the First Publisher in 2007?" }, { "role": "assistant", "content": "SELECT \"first_publisher\" FROM \"bibliography\" WHERE \"year\"=2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"japanese_title\" text,\n \"english_title\" text,\n \"year\" real,\n \"first_publisher\" text,\n \"isbn\" text\n);\n\nQuestion: What is the Year of Kodansha Novels' Tokyo Nightmare?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"bibliography\" WHERE \"first_publisher\"='kodansha novels' AND \"english_title\"='tokyo nightmare';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"japanese_title\" text,\n \"english_title\" text,\n \"year\" real,\n \"first_publisher\" text,\n \"isbn\" text\n);\n\nQuestion: What Year has an ISBN OF ISBN 4-06-182042-7?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"bibliography\" WHERE \"isbn\"='isbn 4-06-182042-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the bronze number for the nation with less than 0 gold?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city\" text,\n \"region\" text,\n \"july\" text,\n \"january\" text,\n \"annual_precipitation\" text,\n \"plant_hardiness_zone\" text\n);\n\nQuestion: What is the January climate figure for Eastman?" }, { "role": "assistant", "content": "SELECT \"january\" FROM \"climate\" WHERE \"region\"='eastman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city\" text,\n \"region\" text,\n \"july\" text,\n \"january\" text,\n \"annual_precipitation\" text,\n \"plant_hardiness_zone\" text\n);\n\nQuestion: In what city is the July temperature 23/9\u00b0c (73/48\u00b0f)?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"climate\" WHERE \"july\"='23/9\u00b0c (73/48\u00b0f)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city\" text,\n \"region\" text,\n \"july\" text,\n \"january\" text,\n \"annual_precipitation\" text,\n \"plant_hardiness_zone\" text\n);\n\nQuestion: What is the July temperature where the annual precipitation is 514mm (20.2in)?" }, { "role": "assistant", "content": "SELECT \"july\" FROM \"climate\" WHERE \"annual_precipitation\"='514mm (20.2in)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city\" text,\n \"region\" text,\n \"july\" text,\n \"january\" text,\n \"annual_precipitation\" text,\n \"plant_hardiness_zone\" text\n);\n\nQuestion: What is the July temperature where plant hardiness zone is 2B and January figure is \u221212/\u221223\u00b0c (10-9\u00b0f)?" }, { "role": "assistant", "content": "SELECT \"july\" FROM \"climate\" WHERE \"plant_hardiness_zone\"='2b' AND \"january\"='\u221212/\u221223\u00b0c (10-9\u00b0f)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city\" text,\n \"region\" text,\n \"july\" text,\n \"january\" text,\n \"annual_precipitation\" text,\n \"plant_hardiness_zone\" text\n);\n\nQuestion: What is the plant hardiness zone in the Northern region where the annual precipitation is 443mm (17.4in)?" }, { "role": "assistant", "content": "SELECT \"plant_hardiness_zone\" FROM \"climate\" WHERE \"region\"='northern' AND \"annual_precipitation\"='443mm (17.4in)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city\" text,\n \"region\" text,\n \"july\" text,\n \"january\" text,\n \"annual_precipitation\" text,\n \"plant_hardiness_zone\" text\n);\n\nQuestion: In what city is the plant hardiness zone 2B and January temp is \u221212/\u221223\u00b0c (10/-9\u00b0f)?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"climate\" WHERE \"plant_hardiness_zone\"='2b' AND \"january\"='\u221212/\u221223\u00b0c (10/-9\u00b0f)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the Total Apps listing for Paul Wilson?" }, { "role": "assistant", "content": "SELECT \"total_apps\" FROM \"appearances_and_goals\" WHERE \"name\"='paul wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"route_and_stages\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner at Milan Circuit Race?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"route_and_stages\" WHERE \"course\"='milan circuit race';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"route_and_stages\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner at Rest Day course?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"route_and_stages\" WHERE \"course\"='rest day';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"route_and_stages\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What's the type on Sestri Levante to Riomaggiore?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"route_and_stages\" WHERE \"course\"='sestri levante to riomaggiore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season_rankings\" (\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"events\" real,\n \"reset_points\" real\n);\n\nQuestion: Which player competed in 12 events?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"regular_season_rankings\" WHERE \"events\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"points\" real\n);\n\nQuestion: what is the highest finishes when the points is less than 337, the stage wins is 2 and the wins is more than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"finishes\") FROM \"constructors\" WHERE \"points\"<337 AND \"stage_wins\"=2 AND \"wins\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"points\" real\n);\n\nQuestion: what is the average starts when the chassis is focus rs wrc 08 and finishes is more than 27?" }, { "role": "assistant", "content": "SELECT AVG(\"starts\") FROM \"constructors\" WHERE \"chassis\"='focus rs wrc 08' AND \"finishes\">27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"points\" real\n);\n\nQuestion: what is the finishes when points is more than 337 and starts is more than 26?" }, { "role": "assistant", "content": "SELECT SUM(\"finishes\") FROM \"constructors\" WHERE \"points\">337 AND \"starts\">26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"points\" real\n);\n\nQuestion: what is the average starts when the podiums is more than 0, stage wins is more than 39 and points is more than 456?" }, { "role": "assistant", "content": "SELECT AVG(\"starts\") FROM \"constructors\" WHERE \"podiums\">0 AND \"stage_wins\">39 AND \"points\">456;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Which School has a Mascot of squires?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='squires';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Which School has a #/ County of 85 wabash, and an IHSAA Football Class of A, and a Mascot of norsemen?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"num_county\"='85 wabash' AND \"ihsaa_football_class\"='a' AND \"mascot\"='norsemen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Which IHSAA Football Class has a School of whitko?" }, { "role": "assistant", "content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='whitko';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Which IHSAA Football Class has a Location of wabash, and a School of wabash?" }, { "role": "assistant", "content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='wabash' AND \"school\"='wabash';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: With a Total of more than 149, what is Davis Love III's To par?" }, { "role": "assistant", "content": "SELECT AVG(\"to_par\") FROM \"missed_the_cut\" WHERE \"player\"='davis love iii' AND \"total\">149;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the Total of the Player with a To par of 6 and Year won after 1993?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"missed_the_cut\" WHERE \"year_won\">1993 AND \"to_par\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the Year won of Davis Love III with a Total of less than 149?" }, { "role": "assistant", "content": "SELECT COUNT(\"year_won\") FROM \"missed_the_cut\" WHERE \"player\"='davis love iii' AND \"total\"<149;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" text,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the genre of the Mass Effect game?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"list_of_game_of_the_year_awards\" WHERE \"game\"='mass effect';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" text,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the genre of the game from 2006?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"list_of_game_of_the_year_awards\" WHERE \"year\"='2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" text,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the genre of the game developed by Nintendo EAD?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"list_of_game_of_the_year_awards\" WHERE \"developer_s\"='nintendo ead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" text,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the platform of the game built in 2006?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"list_of_game_of_the_year_awards\" WHERE \"year\"='2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" text,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What game was developed by Ubisoft Montreal?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"list_of_game_of_the_year_awards\" WHERE \"developer_s\"='ubisoft montreal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ign\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the genre for Portal 2?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"ign\" WHERE \"game\"='portal 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ign\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Which platforms can you play Portal 2 on?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"ign\" WHERE \"game\"='portal 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What event had the 1500m freestyle?" }, { "role": "assistant", "content": "SELECT \"meet\" FROM \"men\" WHERE \"event\"='1500m freestyle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_records\" (\n \"rank\" text,\n \"name\" text,\n \"country\" text,\n \"maglia_rosa\" real,\n \"giro_wins\" real,\n \"points\" real,\n \"young_rider\" real\n);\n\nQuestion: Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"individual_records\" WHERE \"country\"='italy' AND \"giro_wins\"=0 AND \"young_rider\"=0 AND \"maglia_rosa\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_records\" (\n \"rank\" text,\n \"name\" text,\n \"country\" text,\n \"maglia_rosa\" real,\n \"giro_wins\" real,\n \"points\" real,\n \"young_rider\" real\n);\n\nQuestion: what is the least maglia rosa when the rank is 108=, the country is united kingdom and young rider is less than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"maglia_rosa\") FROM \"individual_records\" WHERE \"rank\"='108=' AND \"country\"='united kingdom' AND \"young_rider\"<0;" } ]
[ { "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 bronze medals for the United Kingdom when the silver was less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medals_table\" WHERE \"nation\"='united kingdom' AND \"silver\"<0;" } ]