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 \"other_picks\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: What is the nationality for milwaukee hawks?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"other_picks\" WHERE \"team\"='milwaukee hawks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"borough_or_census_area\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the name of the superfund that was proposed on 06/24/1988?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"superfund_sites\" WHERE \"proposed\"='06/24/1988';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Which team was played against in game 4?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"playoffs\" WHERE \"game\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the location attendance of the game with A. Horford (10) as the highest rebounds and J. Johnson (21) as the highest points?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"playoffs\" WHERE \"high_rebounds\"='a. horford (10)' AND \"high_points\"='j. johnson (21)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_8_titles_10_runner_ups\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: During what Championship was the Opponent Jeff Borowiak?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"singles_18_8_titles_10_runner_ups\" WHERE \"opponent\"='jeff borowiak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_8_titles_10_runner_ups\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: On what Date was the Score of 3\u20136, 6\u20134, 3\u20136, 6\u20131, 6\u20132" }, { "role": "assistant", "content": "SELECT SUM(\"date\") FROM \"singles_18_8_titles_10_runner_ups\" WHERE \"score\"='3\u20136, 6\u20134, 3\u20136, 6\u20131, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest rank for gene littler with under 3 wins and under $962,133?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"earnings\"<'962,133' AND \"player\"='gene littler' AND \"wins\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: What tyre is on the talbot-lago and an Entrant of automobiles talbot-darracq sa, and a Chassis of talbot-lago t26c-da?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"entries\" WHERE \"constructor\"='talbot-lago' AND \"entrant\"='automobiles talbot-darracq sa' AND \"chassis\"='talbot-lago t26c-da';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: What is the Entrant with a Engine of talbot l6, and Eug\u00e8ne Chaboud was the driver?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"entries\" WHERE \"engine\"='talbot l6' AND \"driver\"='eug\u00e8ne chaboud';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: What entrant has a P tyre and was constructed by Alfa Romeo?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"entries\" WHERE \"tyre\"='p' AND \"constructor\"='alfa romeo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winner_s_share\" text\n);\n\nQuestion: I want the country for score of 274 and runner-up of virginie lagoutte-cl\u00e9ment" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"winners\" WHERE \"score\"='274' AND \"runner_s_up\"='virginie lagoutte-cl\u00e9ment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winner_s_share\" text\n);\n\nQuestion: Tell me the date for 2004" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"winners\" WHERE \"year\"='2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"date\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winner_s_share\" text\n);\n\nQuestion: What is the margin of victory for nikki garrett?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"winners\" WHERE \"winner\"='nikki garrett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: I want to see the result for venue of n and attendance more than 20,664" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"scottish_cup\" WHERE \"venue\"='n' AND \"attendance\">'20,664';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Tell me the result for venue of a" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"scottish_cup\" WHERE \"venue\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: I want to know the average attendance for n venue and f round" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"scottish_cup\" WHERE \"venue\"='n' AND \"round\"='f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: In grid 15, how many laps were there before ending with a time of exhaust?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"time_retired\"='exhaust' AND \"grid\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1850_1871\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_withdrawn\" text\n);\n\nQuestion: What year was class of undine?" }, { "role": "assistant", "content": "SELECT \"year_made\" FROM \"1850_1871\" WHERE \"class\"='undine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1850_1871\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_withdrawn\" text\n);\n\nQuestion: What was the quantity preserved for quantity made of 15?" }, { "role": "assistant", "content": "SELECT \"quantity_preserved\" FROM \"1850_1871\" WHERE \"quantity_made\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1850_1871\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_withdrawn\" text\n);\n\nQuestion: Name the year for hercules" }, { "role": "assistant", "content": "SELECT \"year_made\" FROM \"1850_1871\" WHERE \"class\"='hercules';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"locomotive_type\" text,\n \"wheel_arrangement\" text,\n \"builder\" text,\n \"entered_service\" real,\n \"withdrawn\" real\n);\n\nQuestion: When did the tom smith built train enter service with a number under 7007?" }, { "role": "assistant", "content": "SELECT AVG(\"entered_service\") FROM \"locomotives\" WHERE \"builder\"='tom smith' AND \"number\"<7007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_20_9\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Who is the opponent for the 1985 World Group i edition?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_20_9\" WHERE \"edition\"='1985 world group i';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_3_q\" text,\n \"loans_received_3_q\" text,\n \"money_spent_3_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text,\n \"after_debt\" text\n);\n\nQuestion: What is the amount of cash on hand that has an after debt of $327,094" }, { "role": "assistant", "content": "SELECT \"cash_on_hand\" FROM \"democrats\" WHERE \"after_debt\"='$327,094';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_3_q\" text,\n \"loans_received_3_q\" text,\n \"money_spent_3_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text,\n \"after_debt\" text\n);\n\nQuestion: How many receipts does Mike Gravel have?" }, { "role": "assistant", "content": "SELECT \"total_receipts\" FROM \"democrats\" WHERE \"candidate\"='mike gravel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_3_q\" text,\n \"loans_received_3_q\" text,\n \"money_spent_3_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text,\n \"after_debt\" text\n);\n\nQuestion: What After debt has raised 3Q of $5,358,585?" }, { "role": "assistant", "content": "SELECT \"after_debt\" FROM \"democrats\" WHERE \"money_raised_3_q\"='$5,358,585';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_3_q\" text,\n \"loans_received_3_q\" text,\n \"money_spent_3_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text,\n \"after_debt\" text\n);\n\nQuestion: How much money has been raised that has $5,821,587 cash on hand?" }, { "role": "assistant", "content": "SELECT \"money_raised_3_q\" FROM \"democrats\" WHERE \"cash_on_hand\"='$5,821,587';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_3_q\" text,\n \"loans_received_3_q\" text,\n \"money_spent_3_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text,\n \"after_debt\" text\n);\n\nQuestion: What is the after debt has receipts of $379,794?" }, { "role": "assistant", "content": "SELECT \"after_debt\" FROM \"democrats\" WHERE \"total_receipts\"='$379,794';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_3_q\" text,\n \"loans_received_3_q\" text,\n \"money_spent_3_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text,\n \"after_debt\" text\n);\n\nQuestion: How much money has Candidate Dennis Kucinich spent?" }, { "role": "assistant", "content": "SELECT \"money_spent_3_q\" FROM \"democrats\" WHERE \"candidate\"='dennis kucinich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the crowd size when the away team was South Melbourne?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_1\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd size at Junction Oval?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_1\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date of the game at Junction Oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_1\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away score for Carlton?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at MCG?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 48 when the D 50 is d 30?" }, { "role": "assistant", "content": "SELECT \"d_48\" FROM \"senate_composition_before_the_elections\" WHERE \"d_50\"='d 30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 47 when the D 49 is r 32?" }, { "role": "assistant", "content": "SELECT \"d_47\" FROM \"senate_composition_before_the_elections\" WHERE \"d_49\"='r 32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 50 when the D 43 is r 43?" }, { "role": "assistant", "content": "SELECT \"d_50\" FROM \"senate_composition_before_the_elections\" WHERE \"d_43\"='r 43';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 42 when the D 50 is d 31?" }, { "role": "assistant", "content": "SELECT \"d_42\" FROM \"senate_composition_before_the_elections\" WHERE \"d_50\"='d 31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 50 when the D 41 is d 41?" }, { "role": "assistant", "content": "SELECT \"d_50\" FROM \"senate_composition_before_the_elections\" WHERE \"d_41\"='d 41';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 50 when the D 41 is d 41?" }, { "role": "assistant", "content": "SELECT \"d_50\" FROM \"senate_composition_before_the_elections\" WHERE \"d_41\"='d 41';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yards_on_the_gulf_coast\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"ship_types_delivered\" text,\n \"total_number_of_ways\" text,\n \"total_vessels_built_for_usmc\" text\n);\n\nQuestion: what is the total vessels built for usmc when the 1st ship delivery date is january 1943?" }, { "role": "assistant", "content": "SELECT \"total_vessels_built_for_usmc\" FROM \"yards_on_the_gulf_coast\" WHERE \"1st_ship_delivery_date\"='january 1943';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yards_on_the_gulf_coast\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"ship_types_delivered\" text,\n \"total_number_of_ways\" text,\n \"total_vessels_built_for_usmc\" text\n);\n\nQuestion: what is the yard name when the ship types delivered is n3 type, v4 type and the total vessels built for usmc is 13 ships for usmc?" }, { "role": "assistant", "content": "SELECT \"yard_name\" FROM \"yards_on_the_gulf_coast\" WHERE \"ship_types_delivered\"='n3 type, v4 type' AND \"total_vessels_built_for_usmc\"='13 ships for usmc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yards_on_the_gulf_coast\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"ship_types_delivered\" text,\n \"total_number_of_ways\" text,\n \"total_vessels_built_for_usmc\" text\n);\n\nQuestion: what is the ship types delivered when the total vessels built for usmc is 13 ships for usmc (plus 37 more for usn)?" }, { "role": "assistant", "content": "SELECT \"ship_types_delivered\" FROM \"yards_on_the_gulf_coast\" WHERE \"total_vessels_built_for_usmc\"='13 ships for usmc (plus 37 more for usn)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yards_on_the_gulf_coast\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"ship_types_delivered\" text,\n \"total_number_of_ways\" text,\n \"total_vessels_built_for_usmc\" text\n);\n\nQuestion: what is the ship types delivered when the location is panama city, florida?" }, { "role": "assistant", "content": "SELECT \"ship_types_delivered\" FROM \"yards_on_the_gulf_coast\" WHERE \"location_city_state\"='panama city, florida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who were the co drivers past 1994 in the WSC class?" }, { "role": "assistant", "content": "SELECT \"co_drivers\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"year\">1994 AND \"class\"='wsc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team scored 9.15 (69)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"home_team_score\"='9.15 (69)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which venue did the home team score 14.23 (107)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_8\" WHERE \"home_team_score\"='14.23 (107)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day did Footscray play as the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_18\" WHERE \"home_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the report for 10 october?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"season_review\" WHERE \"date\"='10 october';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who was the race winner with a pole position james hunt, and a Fastest Lap of james hunt, and a Date of 15 august?" }, { "role": "assistant", "content": "SELECT \"race_winner\" FROM \"season_review\" WHERE \"pole_position\"='james hunt' AND \"fastest_lap\"='james hunt' AND \"date\"='15 august';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What race has a Pole Position of Jacques Laffite?" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"season_review\" WHERE \"pole_position\"='jacques laffite';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the Pole Position of the Swedish Grand Prix?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"race\"='swedish grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the date when the location was Zandvoort?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"location\"='zandvoort';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_film_serials_by_studio\" (\n \"number\" real,\n \"serial_title\" text,\n \"year\" real,\n \"chapters\" real,\n \"genre\" text,\n \"director\" text,\n \"cast\" text\n);\n\nQuestion: How many chapters did Elmer Clifton direct?" }, { "role": "assistant", "content": "SELECT COUNT(\"chapters\") FROM \"list_of_film_serials_by_studio\" WHERE \"director\"='elmer clifton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_bohemian_consorts\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_queen\" text,\n \"ceased_to_be_queen\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Who is the spouse of the queen who is the daughter of Ferdinand I of the two sicilies?" }, { "role": "assistant", "content": "SELECT \"spouse\" FROM \"list_of_bohemian_consorts\" WHERE \"father\"='ferdinand i of the two sicilies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"name\" text,\n \"serial_no\" text,\n \"entered_service\" text,\n \"owner\" text\n);\n\nQuestion: What is the entered service date for serial number 85-1222?" }, { "role": "assistant", "content": "SELECT \"entered_service\" FROM \"locomotives\" WHERE \"serial_no\"='85-1222';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"name\" text,\n \"serial_no\" text,\n \"entered_service\" text,\n \"owner\" text\n);\n\nQuestion: What is the locomotive for the city of Benalla?" }, { "role": "assistant", "content": "SELECT \"locomotive\" FROM \"locomotives\" WHERE \"name\"='city of benalla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"name\" text,\n \"serial_no\" text,\n \"entered_service\" text,\n \"owner\" text\n);\n\nQuestion: What is the name for the locomotive n464?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"locomotives\" WHERE \"locomotive\"='n464';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"name\" text,\n \"serial_no\" text,\n \"entered_service\" text,\n \"owner\" text\n);\n\nQuestion: What is the name for the locomotive n474?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"locomotives\" WHERE \"locomotive\"='n474';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team has a Crowd greater than 28,000, and an Away team of st kilda?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"crowd\">'28,000' AND \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team has an Away team score of 18.21 (129)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"away_team_score\"='18.21 (129)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team score at windy hill?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which date has a Crowd greater than 28,000, and a Home team of geelong?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_13\" WHERE \"crowd\">'28,000' AND \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd for an Away team of st kilda?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_13\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: Where was the match that had 119 points for played?" }, { "role": "assistant", "content": "SELECT \"played_in\" FROM \"summary\" WHERE \"points_for\"='119';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: Where were 16 matches played?" }, { "role": "assistant", "content": "SELECT \"played_in\" FROM \"summary\" WHERE \"matches\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"played_in\" text,\n \"matches\" text,\n \"lost\" text,\n \"drawn\" text,\n \"points_for\" text,\n \"points_against\" text\n);\n\nQuestion: What match had 240 points for?" }, { "role": "assistant", "content": "SELECT \"matches\" FROM \"summary\" WHERE \"points_for\"='240';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"round\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score on 26 July 1930?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='26 july 1930';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps did Innes Ireland make when he had a grid more than 15?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"classification\" WHERE \"grid\">15 AND \"driver\"='innes ireland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid for Jack Brabham with more than 65 laps?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"driver\"='jack brabham' AND \"laps\">65;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drove grid 5?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the game with the Rockets as the visitor team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"visitor\"='rockets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"no_s\" real,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What was the position of the player who played for the Rockets during 1981?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"s\" WHERE \"years_for_rockets\"='1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"no_s\" real,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What school, club team, or country did the player with a number smaller than 4 come from?" }, { "role": "assistant", "content": "SELECT \"school_club_team_country\" FROM \"s\" WHERE \"no_s\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"player\" text,\n \"no_s\" real,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What is the number of the player who came from Virginia?" }, { "role": "assistant", "content": "SELECT \"no_s\" FROM \"s\" WHERE \"school_club_team_country\"='virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which place has a home team score of 18.19 (127)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_6\" WHERE \"home_team_score\"='18.19 (127)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Time/Retired with over 56 laps and a grid of 5?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"laps\">56 AND \"grid\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: Who is the driver when the tyre is p and the entrant is officine alfieri maserati?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"entries\" WHERE \"tyre\"='p' AND \"entrant\"='officine alfieri maserati';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: Who is the constructor when the chassis is talbot-lago t26c and the driver is charles pozzi?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"entries\" WHERE \"chassis\"='talbot-lago t26c' AND \"driver\"='charles pozzi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: What is the tyre when the entrant is sa alfa romeo and the driver is luigi fagioli?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"entries\" WHERE \"entrant\"='sa alfa romeo' AND \"driver\"='luigi fagioli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: Who is the entrant when the engine is talbot l6 and the driver is pierre levegh?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"entries\" WHERE \"engine\"='talbot l6' AND \"driver\"='pierre levegh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: Who is the entrant when the chassis is ferrari 125?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"entries\" WHERE \"chassis\"='ferrari 125';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: what is the engine when the tyre is d, the constructor is era and the driver is bob gerard?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"entries\" WHERE \"tyre\"='d' AND \"constructor\"='era' AND \"driver\"='bob gerard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the score when the record was 39-62?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='39-62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the date when the record was 35-57?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='35-57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the loss when the record was 34-56?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='34-56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score of the away team who played the home team who scored 7.14 (56)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"home_team_score\"='7.14 (56)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the venue where the away team scored 7.6 (48) and the home team scored 21.27 (153)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_3\" WHERE \"away_team_score\"='7.6 (48)' AND \"home_team_score\"='21.27 (153)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the home team score 5.15 (45)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_3\" WHERE \"home_team_score\"='5.15 (45)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score of the away team whose opponent scored 7.14 (56) in front of a crowd was larger than 24,000?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"crowd\">'24,000' AND \"home_team_score\"='7.14 (56)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the away team that played Geelong?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_3\" WHERE \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the smallest crowd size for away team Fitzroy?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_3\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_scotch_arthurs\" (\n \"br_no\" real,\n \"sr_no\" real,\n \"sr_name\" text,\n \"builder\" text,\n \"built\" text,\n \"withdrawn\" text\n);\n\nQuestion: Which Builder has BR No. 30782?" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"the_scotch_arthurs\" WHERE \"br_no\"=30782;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_3_1996_1997\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the title of the episode with a production code of K1504?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"season_3_1996_1997\" WHERE \"production_code\"='k1504';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_3_1996_1997\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the average of the Series #s that were directed by Matthew Penn?" }, { "role": "assistant", "content": "SELECT AVG(\"series_num\") FROM \"season_3_1996_1997\" WHERE \"directed_by\"='matthew penn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_3_1996_1997\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: How many episodes did Matthew Penn direct before season 22?" }, { "role": "assistant", "content": "SELECT COUNT(\"series_num\") FROM \"season_3_1996_1997\" WHERE \"season_num\"<22 AND \"directed_by\"='matthew penn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What Visiting Team(s) had an Attendance of over 18,680" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"attendance\">'18,680';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When Nashville was the visiting team what was the lowest Attendance shown?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"game_log\" WHERE \"visitor\"='nashville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired for the driver with 16 grids?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the smallest grid for a time/retired of 1:56:18.22?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"time_retired\"='1:56:18.22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Who was the opponent on September 28?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='september 28';" } ]