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 \"table1_17802778_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What was the average speed (mph) for the racer who finished in 1:45:00?"
},
{
"role": "assistant",
"content": "SELECT \"average_speed_mph\" FROM \"table1_17802778_1\" WHERE \"race_time\"='1:45:00';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17802778_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: How many total miles recorded for the racer who finished in 1:05:33?"
},
{
"role": "assistant",
"content": "SELECT \"miles_km\" FROM \"table1_17802778_1\" WHERE \"race_time\"='1:05:33';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17810099_3\" (\n \"episode_num\" text,\n \"season_num\" real,\n \"title\" text,\n \"writer_s\" text,\n \"director\" text,\n \"originalairdate\" text\n);\n\nQuestion: what episode # was titled \"SWAT Kats Unplugged\"?"
},
{
"role": "assistant",
"content": "SELECT \"episode_num\" FROM \"table1_17810099_3\" WHERE \"title\"='\\\"SWAT Kats Unplugged\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17810099_3\" (\n \"episode_num\" text,\n \"season_num\" real,\n \"title\" text,\n \"writer_s\" text,\n \"director\" text,\n \"originalairdate\" text\n);\n\nQuestion: what was the title of the episode 21a?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_17810099_3\" WHERE \"episode_num\"='21a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17810099_3\" (\n \"episode_num\" text,\n \"season_num\" real,\n \"title\" text,\n \"writer_s\" text,\n \"director\" text,\n \"originalairdate\" text\n);\n\nQuestion: who wrote episode 14?"
},
{
"role": "assistant",
"content": "SELECT \"writer_s\" FROM \"table1_17810099_3\" WHERE \"episode_num\"='14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17810099_3\" (\n \"episode_num\" text,\n \"season_num\" real,\n \"title\" text,\n \"writer_s\" text,\n \"director\" text,\n \"originalairdate\" text\n);\n\nQuestion: on what date did the episode titled \"A Bright and Shiny Future\" originally air?"
},
{
"role": "assistant",
"content": "SELECT \"originalairdate\" FROM \"table1_17810099_3\" WHERE \"title\"='\\\"A Bright and Shiny Future\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Who many votes did E. Greenberg receive in Morris County?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"e_greenberg\") FROM \"u_s_house_district_11\" WHERE \"county\"='Morris';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: How many precincts are in the county where G. Hager received 19 (20%) votes?"
},
{
"role": "assistant",
"content": "SELECT \"precincts\" FROM \"u_s_house_district_11\" WHERE \"g_hager\"='19 (20%)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skilift_system\" (\n \"name_or_route\" text,\n \"type\" text,\n \"elevation_groundstation\" real,\n \"elevation_mountainstation\" real,\n \"slope_length\" real,\n \"capacity_in_persons_hour\" real,\n \"construction_year_s\" text\n);\n\nQuestion: Name the slope length for 1966 groundstation"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"slope_length\") FROM \"skilift_system\" WHERE \"elevation_groundstation\"=1966;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skilift_system\" (\n \"name_or_route\" text,\n \"type\" text,\n \"elevation_groundstation\" real,\n \"elevation_mountainstation\" real,\n \"slope_length\" real,\n \"capacity_in_persons_hour\" real,\n \"construction_year_s\" text\n);\n\nQuestion: Name the name or route for slope length being 336"
},
{
"role": "assistant",
"content": "SELECT \"name_or_route\" FROM \"skilift_system\" WHERE \"slope_length\"=336;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skilift_system\" (\n \"name_or_route\" text,\n \"type\" text,\n \"elevation_groundstation\" real,\n \"elevation_mountainstation\" real,\n \"slope_length\" real,\n \"capacity_in_persons_hour\" real,\n \"construction_year_s\" text\n);\n\nQuestion: Name the slope length for gondola"
},
{
"role": "assistant",
"content": "SELECT MIN(\"slope_length\") FROM \"skilift_system\" WHERE \"type\"='gondola';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skilift_system\" (\n \"name_or_route\" text,\n \"type\" text,\n \"elevation_groundstation\" real,\n \"elevation_mountainstation\" real,\n \"slope_length\" real,\n \"capacity_in_persons_hour\" real,\n \"construction_year_s\" text\n);\n\nQuestion: Name the least capacity for persons hour for 1983"
},
{
"role": "assistant",
"content": "SELECT MIN(\"capacity_in_persons_hour\") FROM \"skilift_system\" WHERE \"construction_year_s\"='1983';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: Who is the player of the round with 80 fixtures? "
},
{
"role": "assistant",
"content": "SELECT \"player_of_the_round\" FROM \"calendar\" WHERE \"number_of_fixtures\"=80;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: How many categories of new entries this round are there for the fourth round proper? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"new_entries_this_round\") FROM \"calendar\" WHERE \"round\"='Fourth Round Proper';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_7\" (\n \"season\" text,\n \"the_mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"international_destination\" text\n);\n\nQuestion: How many runner-ups were there when the show went to Japan?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"runner_up\") FROM \"table1_178242_7\" WHERE \"international_destination\"='Japan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_7\" (\n \"season\" text,\n \"the_mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"international_destination\" text\n);\n\nQuestion: How many won the prize when Regina was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"winner\") FROM \"table1_178242_7\" WHERE \"runner_up\"='Regina';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_7\" (\n \"season\" text,\n \"the_mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"international_destination\" text\n);\n\nQuestion: Which season is it when Milouska was the show's mole ?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"table1_178242_7\" WHERE \"the_mole\"='Milouska';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"actor_in_original_production\" text,\n \"actor_required\" text,\n \"game_plan\" text,\n \"flat_spin\" text,\n \"role_play\" text\n);\n\nQuestion: What were the requirements for the role played by Robert Austin in the original production?"
},
{
"role": "assistant",
"content": "SELECT \"actor_required\" FROM \"characters\" WHERE \"actor_in_original_production\"='Robert Austin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"actor_in_original_production\" text,\n \"actor_required\" text,\n \"game_plan\" text,\n \"flat_spin\" text,\n \"role_play\" text\n);\n\nQuestion: What actor played the \"female, older\" role in the original production?"
},
{
"role": "assistant",
"content": "SELECT \"actor_in_original_production\" FROM \"characters\" WHERE \"actor_required\"='Female, older';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"actor_in_original_production\" text,\n \"actor_required\" text,\n \"game_plan\" text,\n \"flat_spin\" text,\n \"role_play\" text\n);\n\nQuestion: What FlatSpin actor played the same role as Robert Austin?"
},
{
"role": "assistant",
"content": "SELECT \"flat_spin\" FROM \"characters\" WHERE \"actor_in_original_production\"='Robert Austin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"actor_in_original_production\" text,\n \"actor_required\" text,\n \"game_plan\" text,\n \"flat_spin\" text,\n \"role_play\" text\n);\n\nQuestion: How many RolePlay actors played the role requiring a \"male, younger\" actor?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"role_play\") FROM \"characters\" WHERE \"actor_required\"='Male, younger';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"actor_in_original_production\" text,\n \"actor_required\" text,\n \"game_plan\" text,\n \"flat_spin\" text,\n \"role_play\" text\n);\n\nQuestion: How many RolePlay actors played the same role as FlatSpin's Tracy Taylor?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"role_play\") FROM \"characters\" WHERE \"flat_spin\"='Tracy Taylor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"actor_in_original_production\" text,\n \"actor_required\" text,\n \"game_plan\" text,\n \"flat_spin\" text,\n \"role_play\" text\n);\n\nQuestion: What RolePlay actor played the same role Alison Pargeter played in the original production?"
},
{
"role": "assistant",
"content": "SELECT \"role_play\" FROM \"characters\" WHERE \"actor_in_original_production\"='Alison Pargeter';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: What's the name of the church in Stavang?"
},
{
"role": "assistant",
"content": "SELECT \"church_name\" FROM \"churches_in_flora\" WHERE \"location_of_the_church\"='Stavang';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: What's the name of the church in Stavang?"
},
{
"role": "assistant",
"content": "SELECT \"church_name\" FROM \"churches_in_flora\" WHERE \"location_of_the_church\"='Stavang';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: What's the sub-parish (sokn) of Eikefjord?"
},
{
"role": "assistant",
"content": "SELECT \"sub_parish_sokn\" FROM \"churches_in_flora\" WHERE \"location_of_the_church\"='Eikefjord';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: On how many locations is there a church named Askrova Bedehuskapell, built in 1957?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"location_of_the_church\") FROM \"churches_in_flora\" WHERE \"year_built\"='1957' AND \"church_name\"='Askrova bedehuskapell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: In what parish is the Askrova Bedehuskapell church?"
},
{
"role": "assistant",
"content": "SELECT \"parish_prestegjeld\" FROM \"churches_in_flora\" WHERE \"church_name\"='Askrova bedehuskapell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_1\" (\n \"country_region\" text,\n \"name\" text,\n \"host_s\" text,\n \"channel\" text,\n \"premiere_aired\" text,\n \"seasons\" text\n);\n\nQuestion: Which channel has the host Art Rooijakkers?"
},
{
"role": "assistant",
"content": "SELECT \"channel\" FROM \"table1_178242_1\" WHERE \"host_s\"='Art Rooijakkers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_1\" (\n \"country_region\" text,\n \"name\" text,\n \"host_s\" text,\n \"channel\" text,\n \"premiere_aired\" text,\n \"seasons\" text\n);\n\nQuestion: When did the program air on Vier?"
},
{
"role": "assistant",
"content": "SELECT \"premiere_aired\" FROM \"table1_178242_1\" WHERE \"channel\"='VIER';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_1\" (\n \"country_region\" text,\n \"name\" text,\n \"host_s\" text,\n \"channel\" text,\n \"premiere_aired\" text,\n \"seasons\" text\n);\n\nQuestion: What is the title that aired from 17 may 2008 \u2013 21 june 2008 on Nederland 3?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"table1_178242_1\" WHERE \"channel\"='Nederland 3' AND \"premiere_aired\"='17 May 2008 \u2013 21 June 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178242_1\" (\n \"country_region\" text,\n \"name\" text,\n \"host_s\" text,\n \"channel\" text,\n \"premiere_aired\" text,\n \"seasons\" text\n);\n\nQuestion: How many seasons did the show run in Poland?"
},
{
"role": "assistant",
"content": "SELECT \"seasons\" FROM \"table1_178242_1\" WHERE \"country_region\"='Poland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17839_1\" (\n \"name\" text,\n \"map_colour\" text,\n \"first_operated\" real,\n \"type\" text,\n \"length\" text,\n \"no_sta\" real,\n \"current_stock\" text,\n \"future_stock\" text,\n \"trips_per_annum_1000\" real,\n \"avg_trips_per_mile_1000\" real\n);\n\nQuestion: When 4744 is the avg. trips per mile (x1000) what is the current stock?"
},
{
"role": "assistant",
"content": "SELECT \"current_stock\" FROM \"table1_17839_1\" WHERE \"avg_trips_per_mile_1000\"=4744;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17839_1\" (\n \"name\" text,\n \"map_colour\" text,\n \"first_operated\" real,\n \"type\" text,\n \"length\" text,\n \"no_sta\" real,\n \"current_stock\" text,\n \"future_stock\" text,\n \"trips_per_annum_1000\" real,\n \"avg_trips_per_mile_1000\" real\n);\n\nQuestion: When green is the map colour what is the future stock?"
},
{
"role": "assistant",
"content": "SELECT \"future_stock\" FROM \"table1_17839_1\" WHERE \"map_colour\"='Green';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17839_1\" (\n \"name\" text,\n \"map_colour\" text,\n \"first_operated\" real,\n \"type\" text,\n \"length\" text,\n \"no_sta\" real,\n \"current_stock\" text,\n \"future_stock\" text,\n \"trips_per_annum_1000\" real,\n \"avg_trips_per_mile_1000\" real\n);\n\nQuestion: When turquoise is the map colour how many avg. trips per mile (\u00d71000) are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"avg_trips_per_mile_1000\") FROM \"table1_17839_1\" WHERE \"map_colour\"='Turquoise';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17839_1\" (\n \"name\" text,\n \"map_colour\" text,\n \"first_operated\" real,\n \"type\" text,\n \"length\" text,\n \"no_sta\" real,\n \"current_stock\" text,\n \"future_stock\" text,\n \"trips_per_annum_1000\" real,\n \"avg_trips_per_mile_1000\" real\n);\n\nQuestion: When turquoise is the map colour what is the length?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"table1_17839_1\" WHERE \"map_colour\"='Turquoise';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1784514_1\" (\n \"voivodeship_after_1569\" text,\n \"capital\" text,\n \"year_established\" real,\n \"number_of_powiats\" text,\n \"area_km_in_1590_lithuanian_category_articles_with_lithuanian_language_external_links\" real\n);\n\nQuestion: What is the latest year a division was established?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_established\") FROM \"table1_1784514_1\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1784514_1\" (\n \"voivodeship_after_1569\" text,\n \"capital\" text,\n \"year_established\" real,\n \"number_of_powiats\" text,\n \"area_km_in_1590_lithuanian_category_articles_with_lithuanian_language_external_links\" real\n);\n\nQuestion: How many powiats have mstsislaw as a capital?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_powiats\" FROM \"table1_1784514_1\" WHERE \"capital\"='Mstsislaw';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1784514_1\" (\n \"voivodeship_after_1569\" text,\n \"capital\" text,\n \"year_established\" real,\n \"number_of_powiats\" text,\n \"area_km_in_1590_lithuanian_category_articles_with_lithuanian_language_external_links\" real\n);\n\nQuestion: How many capitals had brest litovsk voivodeship as voivodeship after 1569?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"capital\") FROM \"table1_1784514_1\" WHERE \"voivodeship_after_1569\"='Brest Litovsk Voivodeship';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1784514_1\" (\n \"voivodeship_after_1569\" text,\n \"capital\" text,\n \"year_established\" real,\n \"number_of_powiats\" text,\n \"area_km_in_1590_lithuanian_category_articles_with_lithuanian_language_external_links\" real\n);\n\nQuestion: What is the latest year established that had 5 powiats?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_established\") FROM \"table1_1784514_1\" WHERE \"number_of_powiats\"='5 powiats';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_luster\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sogn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: In what parish is the sub-parish fortun? "
},
{
"role": "assistant",
"content": "SELECT \"parish_prestegjeld\" FROM \"churches_in_luster\" WHERE \"sub_parish_sogn\"='Fortun';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_luster\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sogn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: What is the sub-parish of the church located in Fortun? "
},
{
"role": "assistant",
"content": "SELECT \"sub_parish_sogn\" FROM \"churches_in_luster\" WHERE \"location_of_the_church\"='Fortun';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_luster\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sogn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: What is the year that the oldest church was built in Jostedal? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"year_built\") FROM \"churches_in_luster\" WHERE \"location_of_the_church\"='Jostedal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_luster\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sogn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: What parishes are in Solvorn? "
},
{
"role": "assistant",
"content": "SELECT \"parish_prestegjeld\" FROM \"churches_in_luster\" WHERE \"location_of_the_church\"='Solvorn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178399_1\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: Name the number of parish for vilnes kyrkje"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"parish_prestegjeld\") FROM \"table1_178399_1\" WHERE \"church_name\"='Vilnes kyrkje';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178399_1\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: Name the parish for 1908"
},
{
"role": "assistant",
"content": "SELECT \"parish_prestegjeld\" FROM \"table1_178399_1\" WHERE \"year_built\"=1908;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_178399_1\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" real,\n \"location_of_the_church\" text\n);\n\nQuestion: Name the maximum year built for holmedal kyrkje"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_built\") FROM \"table1_178399_1\" WHERE \"church_name\"='Holmedal kyrkje';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the week where the game site is Shea Stadium?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"game_site\"='Shea Stadium';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: For week 6, what were the results?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=6;"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: In how many weeks was the game played on November 3 played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='November 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What is the broadcast date when 8.3 million viewers watched?"
},
{
"role": "assistant",
"content": "SELECT \"broadcast_date\" FROM \"serial_details_by_episode\" WHERE \"viewers_in_millions\"='8.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What is the broadcast date of the episode with run time 25:12?"
},
{
"role": "assistant",
"content": "SELECT \"broadcast_date\" FROM \"serial_details_by_episode\" WHERE \"run_time\"='25:12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: How many million viewers watched the episode that runs 25:55 minutes?"
},
{
"role": "assistant",
"content": "SELECT \"viewers_in_millions\" FROM \"serial_details_by_episode\" WHERE \"run_time\"='25:55';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: How many dances did Warren & Kym have?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_dances\" FROM \"average_score_chart\" WHERE \"couple\"='Warren & Kym';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: What are the total points for the team that averages 17.8?"
},
{
"role": "assistant",
"content": "SELECT \"total_points\" FROM \"average_score_chart\" WHERE \"average\"='17.8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: What is average for Cody & Julianne?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"average_score_chart\" WHERE \"couple\"='Cody & Julianne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"division_north\" text,\n \"division_south\" text,\n \"division_east\" text,\n \"division_west\" text,\n \"division_southwest\" text\n);\n\nQuestion: what is the division southwest when division south was ko\u017euf and division east was osogovo"
},
{
"role": "assistant",
"content": "SELECT \"division_southwest\" FROM \"winners\" WHERE \"division_south\"='Ko\u017euf' AND \"division_east\"='Osogovo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"division_north\" text,\n \"division_south\" text,\n \"division_east\" text,\n \"division_west\" text,\n \"division_southwest\" text\n);\n\nQuestion: what is the division north in 2007\u201308"
},
{
"role": "assistant",
"content": "SELECT \"division_north\" FROM \"winners\" WHERE \"season\"='2007\u201308';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"division_north\" text,\n \"division_south\" text,\n \"division_east\" text,\n \"division_west\" text,\n \"division_southwest\" text\n);\n\nQuestion: what is the division north when division south was ko\u017euf and division southwest was ilinden velmej"
},
{
"role": "assistant",
"content": "SELECT \"division_north\" FROM \"winners\" WHERE \"division_south\"='Ko\u017euf' AND \"division_southwest\"='Ilinden Velmej';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"division_north\" text,\n \"division_south\" text,\n \"division_east\" text,\n \"division_west\" text,\n \"division_southwest\" text\n);\n\nQuestion: how many division southwest was there when division east was babi"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"division_southwest\") FROM \"winners\" WHERE \"division_east\"='Babi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"division_north\" text,\n \"division_south\" text,\n \"division_east\" text,\n \"division_west\" text,\n \"division_southwest\" text\n);\n\nQuestion: what is the division east when division north was milano"
},
{
"role": "assistant",
"content": "SELECT \"division_east\" FROM \"winners\" WHERE \"division_north\"='Milano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17901155_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text,\n \"viewers_millions\" text\n);\n\nQuestion: who co-wrote Season 2, Episode 3?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_17901155_3\" WHERE \"no_in_season\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17901155_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text,\n \"viewers_millions\" text\n);\n\nQuestion: what is the series # for the episode directed by Kelly Sandefur?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"no_in_series\") FROM \"table1_17901155_3\" WHERE \"directed_by\"='Kelly Sandefur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17901155_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" text,\n \"viewers_millions\" text\n);\n\nQuestion: how many production codes were there for the episode that was 32 in the series?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"prod_code\") FROM \"table1_17901155_3\" WHERE \"no_in_series\"=32;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What year was the film Milagros submitted?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"original_title\"='Milagros';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: How many years was the film The Blossoming of Maximo Oliveros entered?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year_ceremony\") FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='The Blossoming of Maximo Oliveros';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: How many directors were there for the film with the original title of The Moises Padilla Story?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"director\") FROM \"submissions\" WHERE \"original_title\"='The Moises Padilla Story';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What spacecraft was launched from the LC34 launch complex? "
},
{
"role": "assistant",
"content": "SELECT \"spacecraft\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"launch_complex\"='LC34';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What spacecrafts had 22 orbital flights? "
},
{
"role": "assistant",
"content": "SELECT \"spacecraft\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"flights\"='22 Orbital';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What launcher had spacecrafts that did 37 orbital flights? "
},
{
"role": "assistant",
"content": "SELECT \"launcher\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"flights\"='37 Orbital';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What launcher had spacecrafts that did 37 orbital flights? "
},
{
"role": "assistant",
"content": "SELECT \"launcher\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"flights\"='37 Orbital';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What years had 134 orbital flights? "
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"flights\"='134 Orbital';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1792122_11\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"country\" text,\n \"project\" text,\n \"status_at_production\" text,\n \"original_air_date\" text\n);\n\nQuestion: In what country did the \"amsterdam's futuristic floating city\" project take place?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"table1_1792122_11\" WHERE \"title\"='\\\"Amsterdam''s Futuristic Floating City\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1792122_11\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"country\" text,\n \"project\" text,\n \"status_at_production\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the status of the London Aquatics Centre project at the time of production?"
},
{
"role": "assistant",
"content": "SELECT \"status_at_production\" FROM \"table1_1792122_11\" WHERE \"project\"='London Aquatics Centre';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1792122_11\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"country\" text,\n \"project\" text,\n \"status_at_production\" text,\n \"original_air_date\" text\n);\n\nQuestion: What was the original are date of series number 71?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_1792122_11\" WHERE \"no_in_series\"=71;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1792122_11\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"country\" text,\n \"project\" text,\n \"status_at_production\" text,\n \"original_air_date\" text\n);\n\nQuestion: What series number was the \"rebuilding new york city's subway\" project?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_series\") FROM \"table1_1792122_11\" WHERE \"title\"='\\\"Rebuilding New York City''s Subway\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1792122_11\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"country\" text,\n \"project\" text,\n \"status_at_production\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the status of the \"azerbaijan's amazing transformation\" project at the time of production?"
},
{
"role": "assistant",
"content": "SELECT \"status_at_production\" FROM \"table1_1792122_11\" WHERE \"title\"='\\\"Azerbaijan''s Amazing Transformation\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: What is the length for a diameter totaling 450 mm?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"onshore_pipelines\" WHERE \"maximum_diameter\"='450 mm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: What is Esperance pipeline co total diameter?"
},
{
"role": "assistant",
"content": "SELECT \"maximum_diameter\" FROM \"onshore_pipelines\" WHERE \"owner_operator\"='Esperance Pipeline Co';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the opponent for december 8"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='December 8';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the number of weeks for october 26"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='October 26';"
}
]
|
[
{
"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 \"game_site\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance record for week 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\"=6;"
}
]
|
[
{
"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 \"game_site\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: For game site Schaefer Stadium, what were the results?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"game_site\"='Schaefer Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manage\" text,\n \"manner\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: Who was the outgoing manager when the incoming manager was jo\u00e3o pereira?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manage\" FROM \"managerial_changes\" WHERE \"incoming_manager\"='Jo\u00e3o Pereira';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manage\" text,\n \"manner\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What team(s) had an outgoing manager of jo\u00e3o alves?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"outgoing_manage\"='Jo\u00e3o Alves';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manage\" text,\n \"manner\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What day did the job open up when bogi\u0107evi\u0107 was outgoing?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"outgoing_manage\"='Bogi\u0107evi\u0107';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"name\" text,\n \"volume\" text,\n \"engine\" text,\n \"fuel\" text,\n \"output\" text,\n \"torque\" text,\n \"engine_id_code_s\" text,\n \"0_100km_h_s\" text,\n \"top_speed\" text,\n \"co_2\" text,\n \"years\" text\n);\n\nQuestion: Name the 0-100 km/hs for name of 2.0 8v"
},
{
"role": "assistant",
"content": "SELECT \"0_100km_h_s\" FROM \"engines\" WHERE \"name\"='2.0 8v';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"name\" text,\n \"volume\" text,\n \"engine\" text,\n \"fuel\" text,\n \"output\" text,\n \"torque\" text,\n \"engine_id_code_s\" text,\n \"0_100km_h_s\" text,\n \"top_speed\" text,\n \"co_2\" text,\n \"years\" text\n);\n\nQuestion: Name the top speed for 0-100 km/hs for 12.7"
},
{
"role": "assistant",
"content": "SELECT \"top_speed\" FROM \"engines\" WHERE \"0_100km_h_s\"='12.7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"name\" text,\n \"volume\" text,\n \"engine\" text,\n \"fuel\" text,\n \"output\" text,\n \"torque\" text,\n \"engine_id_code_s\" text,\n \"0_100km_h_s\" text,\n \"top_speed\" text,\n \"co_2\" text,\n \"years\" text\n);\n\nQuestion: Name the total number for co 2 for atd/axr"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"co_2\") FROM \"engines\" WHERE \"engine_id_code_s\"='ATD/AXR';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"name\" text,\n \"volume\" text,\n \"engine\" text,\n \"fuel\" text,\n \"output\" text,\n \"torque\" text,\n \"engine_id_code_s\" text,\n \"0_100km_h_s\" text,\n \"top_speed\" text,\n \"co_2\" text,\n \"years\" text\n);\n\nQuestion: Name the volume for co 2 for 168 g/km"
},
{
"role": "assistant",
"content": "SELECT \"volume\" FROM \"engines\" WHERE \"co_2\"='168 g/km';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When 60 is the tries against what is the tries for?"
},
{
"role": "assistant",
"content": "SELECT \"tries_for\" FROM \"league_table\" WHERE \"tries_against\"='60';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When 22 is the tries for what is the lost?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"tries_for\"='22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When 98 is the points what is the club?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"league_table\" WHERE \"points\"='98';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When 80 is the tries for what is the try bonus?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"league_table\" WHERE \"tries_for\"='80';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When 55 is the tries for what is the lost?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"tries_for\"='55';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When 17 is the tries for what is the points against?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"league_table\" WHERE \"tries_for\"='17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many draws were there in played games?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"league_table\" WHERE \"played\"='Played';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Which club had 2 wins and 1 draw?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"league_table\" WHERE \"drawn\"='1' AND \"won\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many times were there plays with a try of 56?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"league_table\" WHERE \"tries_for\"='56';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many tries against were there with points of 150?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"league_table\" WHERE \"points_for\"='150';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.