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 \"belarusian_clubs_in_euporean_cups\" (\n \"round\" text,\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg of the 1st team in the 2007 uefa intertoto cup?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"belarusian_clubs_in_euporean_cups\" WHERE \"team_num1\"='2007 uefa intertoto cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belarusian_clubs_in_euporean_cups\" (\n \"round\" text,\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg of dinamo minsk team #2?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"belarusian_clubs_in_euporean_cups\" WHERE \"team_num2\"='dinamo minsk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belarusian_clubs_in_euporean_cups\" (\n \"round\" text,\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg of the second team in the 2007 uefa intertoto cup?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"belarusian_clubs_in_euporean_cups\" WHERE \"team_num2\"='2007 uefa intertoto cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the 10 against?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"matches\" WHERE \"against\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Who was the opposing team in the test match?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_team\" FROM \"matches\" WHERE \"status\"='test match';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Where was the 05/09/1973 venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"matches\" WHERE \"date\"='05/09/1973';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall has a Position of te, and a Round larger than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='te' AND \"round\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a Round larger than 14, and an Overall smaller than 419?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\">14 AND \"overall\"<419;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall has a Round smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"washington_redskins_draft_history\" WHERE \"round\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Name has a Round larger than 4, an Overall smaller than 338, a Pick smaller than 11, and a College of virginia tech?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"washington_redskins_draft_history\" WHERE \"round\">4 AND \"overall\"<338 AND \"pick\"<11 AND \"college\"='virginia tech';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_records\" (\n \"event\" text,\n \"score\" real,\n \"name\" text,\n \"nation\" text,\n \"games\" text,\n \"date\" text\n);\n\nQuestion: Who has the event of 36 arrow finals?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"men_s_records\" WHERE \"event\"='36 arrow finals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_records\" (\n \"event\" text,\n \"score\" real,\n \"name\" text,\n \"nation\" text,\n \"games\" text,\n \"date\" text\n);\n\nQuestion: What is the total score for the 36 arrow finals event?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"men_s_records\" WHERE \"event\"='36 arrow finals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Who is moving with the nationality of Tri?"
},
{
"role": "assistant",
"content": "SELECT \"moving_to\" FROM \"out\" WHERE \"nat\"='tri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is the sSpec Number of the model with a 1ghz frequency?"
},
{
"role": "assistant",
"content": "SELECT \"s_spec_number\" FROM \"180_nm\" WHERE \"frequency\"='1ghz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is the part number of the model that has a frequency of 933mhz?"
},
{
"role": "assistant",
"content": "SELECT \"part_number_s\" FROM \"180_nm\" WHERE \"frequency\"='933mhz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What date was part number rk80533pz933256 released?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"180_nm\" WHERE \"part_number_s\"='rk80533pz933256';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is the frequency of the model with sSpec number sl5qj?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"180_nm\" WHERE \"s_spec_number\"='sl5qj';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches\" (\n \"tenure\" text,\n \"coach\" text,\n \"years\" text,\n \"record\" text,\n \"pct\" real\n);\n\nQuestion: How many years does coach Jim Berryman have?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"head_coaches\" WHERE \"coach\"='jim berryman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Location has a Method of submission (rear naked choke), a Round of 1, and an Event of ufc 127?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (rear naked choke)' AND \"round\"=1 AND \"event\"='ufc 127';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Record has a Time of n/a?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Opponent has a Location of gold coast , australia, and a Method of submission (punches)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='gold coast , australia' AND \"method\"='submission (punches)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"date\" text,\n \"race\" text,\n \"circuit\" text,\n \"location\" text,\n \"winner\" text\n);\n\nQuestion: what is the location when the circuit is lowood circuit and the race is lowood trophy?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"calendar\" WHERE \"circuit\"='lowood circuit' AND \"race\"='lowood trophy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"date\" text,\n \"race\" text,\n \"circuit\" text,\n \"location\" text,\n \"winner\" text\n);\n\nQuestion: what is the race on 23 october?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"calendar\" WHERE \"date\"='23 october';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"date\" text,\n \"race\" text,\n \"circuit\" text,\n \"location\" text,\n \"winner\" text\n);\n\nQuestion: what is the circuit when the winner is stan jones and the race is phillip island trophy race?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"calendar\" WHERE \"winner\"='stan jones' AND \"race\"='phillip island trophy race';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"car_model\" text,\n \"displacement_configuration\" text,\n \"max_motive_power_rpm\" text,\n \"max_torque_rpm\" text,\n \"max_speed\" text,\n \"emissions_co2\" text\n);\n\nQuestion: What is the displacement and configuration with a max speed of km/h (mph) and the car model Panamera 4s?"
},
{
"role": "assistant",
"content": "SELECT \"displacement_configuration\" FROM \"engines\" WHERE \"max_speed\"='km/h (mph)' AND \"car_model\"='panamera 4s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"car_model\" text,\n \"displacement_configuration\" text,\n \"max_motive_power_rpm\" text,\n \"max_torque_rpm\" text,\n \"max_speed\" text,\n \"emissions_co2\" text\n);\n\nQuestion: What is the displacement & configuration with CO2 of 204 g/km emissions?"
},
{
"role": "assistant",
"content": "SELECT \"displacement_configuration\" FROM \"engines\" WHERE \"emissions_co2\"='204 g/km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"car_model\" text,\n \"displacement_configuration\" text,\n \"max_motive_power_rpm\" text,\n \"max_torque_rpm\" text,\n \"max_speed\" text,\n \"emissions_co2\" text\n);\n\nQuestion: What displacement & configuration does the car model Panamera 4s have?"
},
{
"role": "assistant",
"content": "SELECT \"displacement_configuration\" FROM \"engines\" WHERE \"car_model\"='panamera 4s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"car_model\" text,\n \"displacement_configuration\" text,\n \"max_motive_power_rpm\" text,\n \"max_torque_rpm\" text,\n \"max_speed\" text,\n \"emissions_co2\" text\n);\n\nQuestion: What is the emissions CO2 with a max speed of km/h (mph) of the car model Panamera 4s?"
},
{
"role": "assistant",
"content": "SELECT \"emissions_co2\" FROM \"engines\" WHERE \"max_speed\"='km/h (mph)' AND \"car_model\"='panamera 4s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_dates\" (\n \"date\" text,\n \"city\" text,\n \"country\" text,\n \"venue\" text,\n \"tickets_available_since\" text,\n \"attendance\" real,\n \"comment\" text\n);\n\nQuestion: How many tickets were available at Halle Tony Garnier on June 15, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"tickets_available_since\" FROM \"tour_dates\" WHERE \"venue\"='halle tony garnier' AND \"date\"='june 15, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_dates\" (\n \"date\" text,\n \"city\" text,\n \"country\" text,\n \"venue\" text,\n \"tickets_available_since\" text,\n \"attendance\" real,\n \"comment\" text\n);\n\nQuestion: What city had tickets available since March 28, 2008 and went on sale on September 4, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"tour_dates\" WHERE \"tickets_available_since\"='march 28, 2008' AND \"date\"='september 4, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHAT IS THE PICK FOR JOE DAY, ROUND LARGER THAN 1, AND OVERALL SMALLER THAN 150?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"round\">1 AND \"name\"='joe day' AND \"overall\"<150;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHAT IS THE SUM OF PICK WITH AN OVERALL LARGER THAN 250, AND FOR FLORIDA COLLEGE?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"overall\">250 AND \"college\"='florida';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans_out\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: What is the loan club with bbc sport as the start source and ended in 3 February?"
},
{
"role": "assistant",
"content": "SELECT \"loan_club\" FROM \"loans_out\" WHERE \"start_source\"='bbc sport' AND \"ended\"='3 february';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans_out\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: When did the enews start source start?"
},
{
"role": "assistant",
"content": "SELECT \"started\" FROM \"loans_out\" WHERE \"start_source\"='enews';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans_out\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: What is the start source of the irl country, which ended on 13 April?"
},
{
"role": "assistant",
"content": "SELECT \"start_source\" FROM \"loans_out\" WHERE \"country\"='irl' AND \"ended\"='13 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans_out\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: What is the country named feeney with a bbc sport start source?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"loans_out\" WHERE \"start_source\"='bbc sport' AND \"name\"='feeney';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans_out\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: What is the loan club named dennehy?"
},
{
"role": "assistant",
"content": "SELECT \"loan_club\" FROM \"loans_out\" WHERE \"name\"='dennehy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What's the most races with less than 10 podiums and 1st position?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"races\") FROM \"career_summary\" WHERE \"position\"='1st' AND \"podiums\"<10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_record_partnerships_by_wicket\" (\n \"wicket\" text,\n \"runs\" real,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: How many runs did mahela jayawardene and thilan samaraweera have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"runs\") FROM \"test_record_partnerships_by_wicket\" WHERE \"batting_partners\"='mahela jayawardene and thilan samaraweera';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_record_partnerships_by_wicket\" (\n \"wicket\" text,\n \"runs\" real,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What venue did mahela jayawardene and thilan samaraweera play at?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"test_record_partnerships_by_wicket\" WHERE \"batting_partners\"='mahela jayawardene and thilan samaraweera';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_record_partnerships_by_wicket\" (\n \"wicket\" text,\n \"runs\" real,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who were the batting partners that played for India in 1997?"
},
{
"role": "assistant",
"content": "SELECT \"batting_partners\" FROM \"test_record_partnerships_by_wicket\" WHERE \"fielding_team\"='india' AND \"season\"='1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_arab_communities_in_baysan_distric\" (\n \"name\" text,\n \"date\" text,\n \"defending_forces\" text,\n \"brigade\" text,\n \"population\" text\n);\n\nQuestion: What is the defending forces when Al-Murassas shows for name?"
},
{
"role": "assistant",
"content": "SELECT \"defending_forces\" FROM \"other_arab_communities_in_baysan_distric\" WHERE \"name\"='al-murassas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_arab_communities_in_baysan_distric\" (\n \"name\" text,\n \"date\" text,\n \"defending_forces\" text,\n \"brigade\" text,\n \"population\" text\n);\n\nQuestion: What is the brigade Tall Al-Shawk shows for the name?"
},
{
"role": "assistant",
"content": "SELECT \"brigade\" FROM \"other_arab_communities_in_baysan_distric\" WHERE \"name\"='tall al-shawk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_arab_communities_in_baysan_distric\" (\n \"name\" text,\n \"date\" text,\n \"defending_forces\" text,\n \"brigade\" text,\n \"population\" text\n);\n\nQuestion: What is the brigade when Al-Bira is the name?"
},
{
"role": "assistant",
"content": "SELECT \"brigade\" FROM \"other_arab_communities_in_baysan_distric\" WHERE \"name\"='al-bira';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_arab_communities_in_baysan_distric\" (\n \"name\" text,\n \"date\" text,\n \"defending_forces\" text,\n \"brigade\" text,\n \"population\" text\n);\n\nQuestion: What is the brigade when Al-Hamra ('arab al-hamra) shows for name?"
},
{
"role": "assistant",
"content": "SELECT \"brigade\" FROM \"other_arab_communities_in_baysan_distric\" WHERE \"name\"='al-hamra (''arab al-hamra)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_arab_communities_in_baysan_distric\" (\n \"name\" text,\n \"date\" text,\n \"defending_forces\" text,\n \"brigade\" text,\n \"population\" text\n);\n\nQuestion: What is the Defending forces when the population was 120?"
},
{
"role": "assistant",
"content": "SELECT \"defending_forces\" FROM \"other_arab_communities_in_baysan_distric\" WHERE \"population\"='120';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"worldwide\" (\n \"rank\" real,\n \"location\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" real,\n \"2012\" real\n);\n\nQuestion: What was the rank of the park that had a value of 5,040,000 in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"worldwide\" WHERE \"2010\"='5,040,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"overall_pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What was the overall pick number of the player selected before round 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall_pick\") FROM \"draft_picks\" WHERE \"round\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"overall_pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which College/Junior/Club Team (League) did the player julien cayer who was selected before round 3 play for?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\">3 AND \"player\"='julien cayer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the least bronze when the rank is 3 and silver is less than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='3' AND \"silver\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the total when bronze is 0 and the nation is hungary?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"bronze\"=0 AND \"nation\"='hungary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the total when the rank is 7 and gold is more than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"rank\"='7' AND \"gold\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the highest gold when the nation is total and the total is less than 24?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"nation\"='total' AND \"total\"<24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Looking only at matches occurring after Game 51, who was the opponent for the game that ended with a score of 99-129?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\">51 AND \"score\"='99-129';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: For the game against the Washington Bullets, what was the final score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='washington bullets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: For the game where the opponent is listed as @ Indiana Pacers, what was the end record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='@ indiana pacers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which game number was played at Chicago Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"location\"='chicago stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance of the match with motagua as the home team?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"round_8\" WHERE \"home\"='motagua';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What is the score of the game where real espana was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_8\" WHERE \"home\"='real espana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What team was the away team for the game with 916 in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"round_8\" WHERE \"attendance\"=916;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score of the game wehre the deportes savio were the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_8\" WHERE \"home\"='deportes savio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_7\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: In which championship did the winner have a score of \u22129 (66-69-73-71=279)?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"wins_7\" WHERE \"winning_score\"='\u22129 (66-69-73-71=279)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_7\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: During the championship where the winning score was \u22129 (66-69-73-71=279)?, who was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"wins_7\" WHERE \"winning_score\"='\u22129 (66-69-73-71=279)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_7\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score in the year 2002?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_7\" WHERE \"year\"=2002;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the fewest goals of CD Alcoyano with more than 25 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_against\") FROM \"group_ii\" WHERE \"club\"='cd alcoyano' AND \"points\">25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the fewest number of wins that had fewer than 7 draws and more than 30 played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"group_ii\" WHERE \"draws\"<7 AND \"played\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the fewest points that has more than 29 goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"group_ii\" WHERE \"goal_difference\">29;"
}
] |
[
{
"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 \"builder\" text,\n \"type\" text,\n \"date\" real,\n \"works_number\" real\n);\n\nQuestion: What date have highest 0-4-4 forney locomotive with number larger than 20 and works number larger than 23754?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"date\") FROM \"locomotives\" WHERE \"type\"='0-4-4 forney locomotive' AND \"number\">20 AND \"works_number\">23754;"
}
] |
[
{
"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 \"builder\" text,\n \"type\" text,\n \"date\" real,\n \"works_number\" real\n);\n\nQuestion: What is the sum of number with type 0-4-4 forney locomotive, number smaller than 20 and works number of 1251?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"locomotives\" WHERE \"type\"='0-4-4 forney locomotive' AND \"number\"<20 AND \"works_number\"=1251;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tampa_bay_rays_vs_boston_red_sox\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the lowest attendance for the game that had a time of 3:31 and was before game 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"tampa_bay_rays_vs_boston_red_sox\" WHERE \"time\"='3:31' AND \"game\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tampa_bay_rays_vs_boston_red_sox\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the sum of attendance for games with a time of 3:23?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"tampa_bay_rays_vs_boston_red_sox\" WHERE \"time\"='3:23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: WHat is the lowest amount of bronze medals for teams with 9 silvers and less than 27 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=9 AND \"total\"<27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To par of the New Zealand Player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='new zealand';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Player had a Score of 70-71=141?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='70-71=141';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Ernie Els' Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='ernie els';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance when Bournemouth was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"second_round_proper\" WHERE \"away_team\"='bournemouth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the away team when Lincoln City was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"second_round_proper\" WHERE \"home_team\"='lincoln city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score when Walsall was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='walsall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"builder\" text,\n \"works_no\" real,\n \"built\" real,\n \"wheels\" text,\n \"notes\" text\n);\n\nQuestion: Which wheels were built 1920?"
},
{
"role": "assistant",
"content": "SELECT \"wheels\" FROM \"locomotives\" WHERE \"built\"=1920;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"builder\" text,\n \"works_no\" real,\n \"built\" real,\n \"wheels\" text,\n \"notes\" text\n);\n\nQuestion: Which builder has a Built smaller than 1880?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"locomotives\" WHERE \"built\"<1880;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Player is \"Mike Souchak\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='mike souchak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when Place is \"T9\", and when Player is \"Jay Hebert\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t9' AND \"player\"='jay hebert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Player, when Place is \"T9\", and when Score is \"73-70=143\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='t9' AND \"score\"='73-70=143';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when Player is \"Dow Finsterwald\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='dow finsterwald';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Country is \"United States\", when Place is \"T9\", and when Player is \"Jay Hebert\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"place\"='t9' AND \"player\"='jay hebert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when To Par is \"+1\", and when Player is \"Mike Souchak\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"to_par\"='+1' AND \"player\"='mike souchak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Score when the Home team is Chicago Black Hawks and the Record is 3-3?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"home\"='chicago black hawks' AND \"record\"='3-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Visitor has a Score of 0-4?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"score\"='0-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for April 22?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"date\"='april 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Date has a Record of 3-4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"record\"='3-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Date has a Record of 3-4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"record\"='3-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the record for opponent Anna Barone?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='anna barone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the record for the Ko (head kick) method?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='ko (head kick)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the time before round 2, and the ko (knee to the body) method?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<2 AND \"method\"='ko (knee to the body)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the average round for the TKO (punches and elbows) method?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (punches and elbows)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent in UFC 19?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent in UFC 66 who lasted for more than 1 round?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\">1 AND \"event\"='ufc 66';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_singles_tournament_timeline\" (\n \"tournament\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"career_sr\" text\n);\n\nQuestion: What was the 1989 result for the tournament with 1984 of a, 1985 of a, and 1990 of a?"
},
{
"role": "assistant",
"content": "SELECT \"1989\" FROM \"grand_prix_singles_tournament_timeline\" WHERE \"1984\"='a' AND \"1985\"='a' AND \"1990\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_singles_tournament_timeline\" (\n \"tournament\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"career_sr\" text\n);\n\nQuestion: What was the 1987 result for the tournament with 1986 result of 3R and 1989 of A?"
},
{
"role": "assistant",
"content": "SELECT \"1987\" FROM \"grand_prix_singles_tournament_timeline\" WHERE \"1989\"='a' AND \"1986\"='3r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_singles_tournament_timeline\" (\n \"tournament\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the 1989 result of the tournament that had a 1987 result of 1R?"
},
{
"role": "assistant",
"content": "SELECT \"1989\" FROM \"grand_prix_singles_tournament_timeline\" WHERE \"1987\"='1r';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.