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 \"thames_coromandel_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the total decile with an Area of whitianga, and a Roll smaller than 835?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"decile\") FROM \"thames_coromandel_district\" WHERE \"area\"='whitianga' AND \"roll\"<835;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thames_coromandel_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which name has an Area of kennedy bay?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"thames_coromandel_district\" WHERE \"area\"='kennedy bay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thames_coromandel_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which years have a Decile larger than 4, and an Area of thames?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"thames_coromandel_district\" WHERE \"decile\">4 AND \"area\"='thames';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thames_coromandel_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which Authority has a Decile smaller than 6, and an Area of opoutere?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"thames_coromandel_district\" WHERE \"decile\"<6 AND \"area\"='opoutere';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thames_coromandel_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which gender has Years of 1\u20138, an Authority of state, a Roll less than 184, and a Name of matatoki school?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"thames_coromandel_district\" WHERE \"years\"='1\u20138' AND \"authority\"='state' AND \"roll\"<184 AND \"name\"='matatoki school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationwide_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the tournament that resulted in a winning score of \u20134 (71-72-72-69=284)?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"nationwide_tour_wins_5\" WHERE \"winning_score\"='\u20134 (71-72-72-69=284)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationwide_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score of the event where Brian Kamm was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"nationwide_tour_wins_5\" WHERE \"runner_s_up\"='brian kamm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationwide_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the runner-up for the event that ended with a winning score of \u201315 (66-67-70-70=273)?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"nationwide_tour_wins_5\" WHERE \"winning_score\"='\u201315 (66-67-70-70=273)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationwide_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what date was the Nike Colorado Classic held?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nationwide_tour_wins_5\" WHERE \"tournament\"='nike colorado classic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationwide_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score of the Buy.com Siouxland Open?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"nationwide_tour_wins_5\" WHERE \"tournament\"='buy.com siouxland open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"rank\" real,\n \"gymnast\" text,\n \"difficulty_score\" text,\n \"routine_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total with lower than rank 8, and higher than 27.6 score and 13.8 difficulty?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"qualification\" WHERE \"rank\">8 AND \"routine_score\">27.6 AND \"difficulty_score\"='13.8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"participation_and_medals\" (\n \"games\" real,\n \"first\" real,\n \"last\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"best_finish_first_last\" text\n);\n\nQuestion: What is the average medal total of the country who had 0 silver medals and participated in less than 15 games?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"participation_and_medals\" WHERE \"games\"<15 AND \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the least Points with Chassis of forti fg01b forti fg03, and a year less than 1996?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='forti fg01b forti fg03' AND \"year\"<1996;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest year for an engine of ford zetec-r v8, and points greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"complete_formula_one_results\" WHERE \"engine\"='ford zetec-r v8' AND \"points\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What are the average points for an engine of ford zetec-r v8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"complete_formula_one_results\" WHERE \"engine\"='ford zetec-r v8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"central_hawke_s_bay_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the years for elsthorpe school"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"central_hawke_s_bay_district\" WHERE \"name\"='elsthorpe school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"central_hawke_s_bay_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the total number of roll for st joseph's school when decile is less than 5"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"roll\") FROM \"central_hawke_s_bay_district\" WHERE \"name\"='st joseph''s school' AND \"decile\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"central_hawke_s_bay_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the years for porangahau school"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"central_hawke_s_bay_district\" WHERE \"area\"='porangahau' AND \"name\"='porangahau school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"central_hawke_s_bay_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the gender for elsthorpe school"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"central_hawke_s_bay_district\" WHERE \"name\"='elsthorpe school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"rounds\" text,\n \"teams\" text,\n \"drivers\" text,\n \"champion_points\" text,\n \"second_points\" text,\n \"third_points\" text\n);\n\nQuestion: Name the drivers for chassis of season cancelled"
},
{
"role": "assistant",
"content": "SELECT \"drivers\" FROM \"summary\" WHERE \"chassis\"='season cancelled';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"rounds\" text,\n \"teams\" text,\n \"drivers\" text,\n \"champion_points\" text,\n \"second_points\" text,\n \"third_points\" text\n);\n\nQuestion: Name the teams for third points of season cancelled"
},
{
"role": "assistant",
"content": "SELECT \"teams\" FROM \"summary\" WHERE \"third_points\"='season cancelled';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"rounds\" text,\n \"teams\" text,\n \"drivers\" text,\n \"champion_points\" text,\n \"second_points\" text,\n \"third_points\" text\n);\n\nQuestion: Name the engine with rounds of 11 and teams of 25"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"summary\" WHERE \"rounds\"='11' AND \"teams\"='25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score for the loss of McDowell (12-7)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='mcdowell (12-7)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score for the game with an attendance greater than 33,658 and a record of 73-66?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\">'33,658' AND \"record\"='73-66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What is the total laps for the year 2011?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"year\"=2011;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which team is in 9th place?"
},
{
"role": "assistant",
"content": "SELECT \"class_pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='9th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the total of the Divison that is from the country Serbia and Montenegro with apps smaller than 12 with more goals than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"division\") FROM \"career_statistics\" WHERE \"country\"='serbia and montenegro' AND \"apps\"<12 AND \"goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the total number of goals that the Partizan team from the country of serbia had that was larger than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals\") FROM \"career_statistics\" WHERE \"team\"='partizan' AND \"country\"='serbia' AND \"division\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"works_team_entries\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"pts\" text\n);\n\nQuestion: What year was the Honda ra168e 1.5 v6 t engine used?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"works_team_entries\" WHERE \"engine\"='honda ra168e 1.5 v6 t';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"works_team_entries\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"pts\" text\n);\n\nQuestion: What tyres were used with the mp4/14 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"tyres\" FROM \"works_team_entries\" WHERE \"chassis\"='mp4/14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1986\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: How many tickets were there sold/available in Barcelona?"
},
{
"role": "assistant",
"content": "SELECT \"tickets_sold_available\" FROM \"box_office_score_data\" WHERE \"city\"='barcelona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1986\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: How many tickets were sold/available when the gross revenue (2011) was $366,916?"
},
{
"role": "assistant",
"content": "SELECT \"tickets_sold_available\" FROM \"box_office_score_data\" WHERE \"gross_revenue_2011\"='$366,916';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1986\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: How many tickets were sold/available when the gross revenue (2011) was $5,948,390?"
},
{
"role": "assistant",
"content": "SELECT \"tickets_sold_available\" FROM \"box_office_score_data\" WHERE \"gross_revenue_2011\"='$5,948,390';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1986\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What was the gross revenue (1986) when there were tickets sold/available of 24,000 / 24,000 (100%)?"
},
{
"role": "assistant",
"content": "SELECT \"gross_revenue_1986\" FROM \"box_office_score_data\" WHERE \"tickets_sold_available\"='24,000 / 24,000 (100%)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the score in the 1st leg when Stade d'Abidjan was Team 2?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"second_round\" WHERE \"team_2\"='stade d''abidjan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the aggregate score that had Union Douala as Team 1?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"second_round\" WHERE \"team_1\"='union douala';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 2nd leg score of the aggregate score of 4-9?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"second_round\" WHERE \"agg\"='4-9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who was Team 2 when Stationery Stores was Team 1?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"second_round\" WHERE \"team_1\"='stationery stores';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 1 has an aggregate score of 1-1 1?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"agg\"='1-1 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_european_formula_two_championsh\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Chassis that has the Year of 1977?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_european_formula_two_championsh\" WHERE \"year\"=1977;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_european_formula_two_championsh\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Entrant that has the Chassis of march 742, and the Year larger than 1974?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_european_formula_two_championsh\" WHERE \"chassis\"='march 742' AND \"year\">1974;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_european_formula_two_championsh\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Chassis that has the Entrant of trivellato racing team?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_european_formula_two_championsh\" WHERE \"entrant\"='trivellato racing team';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_european_formula_two_championsh\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Chassis that has the Points of 13, and the Year of 1975, and the Entrant of scuderia citta del mille?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_european_formula_two_championsh\" WHERE \"points\"=13 AND \"year\"=1975 AND \"entrant\"='scuderia citta del mille';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rankings\" (\n \"team\" text,\n \"country\" text,\n \"value_m\" real,\n \"debt_as_pctof_value\" text,\n \"pct_change_on_year\" text,\n \"revenue_m\" real,\n \"operating_income_m\" real\n);\n\nQuestion: What is the lowest value of a team with revenue less than 374 and a debt of 84%?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"value_m\") FROM \"2007_rankings\" WHERE \"revenue_m\"<374 AND \"debt_as_pctof_value\"='84';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rankings\" (\n \"team\" text,\n \"country\" text,\n \"value_m\" real,\n \"debt_as_pctof_value\" text,\n \"pct_change_on_year\" text,\n \"revenue_m\" real,\n \"operating_income_m\" real\n);\n\nQuestion: What is the highest operating income that change by 2% and is less than $1,036m?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"operating_income_m\") FROM \"2007_rankings\" WHERE \"pct_change_on_year\"='2' AND \"value_m\"<'1,036';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which team did they play on September 19?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='september 19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wmhr\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What's the FCC info with a Frequency MHz thats smaller than 91.9 and has a CIty of license of Dansville, NY?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"broadcast_translators_of_wmhr\" WHERE \"frequency_m_hz\"<91.9 AND \"city_of_license\"='dansville, ny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wmhr\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What's the FCC info with a Frequency MHz thats smaller than 100.3 and a City of License as Lowville, NY?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"broadcast_translators_of_wmhr\" WHERE \"frequency_m_hz\"<100.3 AND \"city_of_license\"='lowville, ny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wmhr\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What's the Call sign with a Frequency MHz thats smaller than 95.9 and an ERP W of 10?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"broadcast_translators_of_wmhr\" WHERE \"frequency_m_hz\"<95.9 AND \"erp_w\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wmhr\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is listed as the highest ERP W with a Call sign of W262AC?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"erp_w\") FROM \"broadcast_translators_of_wmhr\" WHERE \"call_sign\"='w262ac';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wmhr\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What's the sum of ERP W with a Frequency MHz that larger than 97.7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"erp_w\") FROM \"broadcast_translators_of_wmhr\" WHERE \"frequency_m_hz\">97.7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game played on September 9?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='september 9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: Name the overall record for indian river"
},
{
"role": "assistant",
"content": "SELECT \"overall_record\" FROM \"2006_regular_season_football_standings\" WHERE \"school\"='indian river';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What was E.J. \"Dutch\" Harrison's lowest To Par?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"to_par\") FROM \"final_round\" WHERE \"player\"='e.j. \\\"dutch\\\" harrison';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: How much money was won for the game with a score of 74-76-71-71=292?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"score\"='74-76-71-71=292';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What country was the player from with a score of 70-79-74-68=291?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"score\"='70-79-74-68=291';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: When To par was less than 2, what was the score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"to_par\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_in_south_africa\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: When was the match with a result of sa by 10 wkts?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"england_in_south_africa\" WHERE \"result\"='sa by 10 wkts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_in_south_africa\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: When was the match with a result of sa by 10 wkts?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"england_in_south_africa\" WHERE \"result\"='sa by 10 wkts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_in_south_africa\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: When was there a match in Centurion Park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"england_in_south_africa\" WHERE \"venue\"='centurion park';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the finish which has qual of 144.817"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"qual\"='144.817';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the qual for rank of 9"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"rank\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Name the qual for 1957"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1957';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What shows as the status for the name of de la red?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"out\" WHERE \"name\"='de la red';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What country has a Transfer fee of \u2014, and a Transfer window of summer, and the Status of loaned out, and a Name of gonz\u00e1lez?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"out\" WHERE \"transfer_fee\"='\u2014' AND \"transfer_window\"='summer' AND \"status\"='loaned out' AND \"name\"='gonz\u00e1lez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What shows as the status for Diogo?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"out\" WHERE \"name\"='diogo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name when the country is ESP and the transfer fee is \u20ac 7m?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"out\" WHERE \"country\"='esp' AND \"transfer_fee\"='\u20ac 7m';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer window for the country of ESP and the name of de la red?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"out\" WHERE \"country\"='esp' AND \"name\"='de la red';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer fee of Diogo?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"name\"='diogo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: What was the record at the game that had an attendance over 27,623 and a score of 0\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"att\">'27,623' AND \"score\"='0\u20137';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: What was the lowest attendance at a game that had a loss of lohse (12\u201311)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"att\") FROM \"game_log\" WHERE \"loss\"='lohse (12\u201311)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: What was time of the game against the Royals with a record of 81\u201373?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"game_log\" WHERE \"opponent\"='royals' AND \"record\"='81\u201373';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What is the average year of Maja Pohar's Women's singles matches?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"previous_winners\" WHERE \"women_s_singles\"='maja pohar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992_93_ue_lleida_season\" (\n \"round\" text,\n \"kick_off\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result\" text,\n \"referee\" text\n);\n\nQuestion: Which round has a Kick Off of 1992-10-01 21:15?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"1992_93_ue_lleida_season\" WHERE \"kick_off\"='1992-10-01 21:15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992_93_ue_lleida_season\" (\n \"round\" text,\n \"kick_off\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result\" text,\n \"referee\" text\n);\n\nQuestion: Which round has a Kick Off of 1993-02-17 20:30?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"1992_93_ue_lleida_season\" WHERE \"kick_off\"='1993-02-17 20:30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"frame_size\" text,\n \"width\" real,\n \"height\" real,\n \"mpix\" real,\n \"aspect_ratio\" text,\n \"maximum_fps\" real,\n \"maximum_fps_hd_rx\" real,\n \"least_compression_at_24_fps\" text,\n \"least_compression_at_maximum_fps\" text\n);\n\nQuestion: What is the sum of Mpix with a maximum fps HDRX of less than 12 with a width larger than 5120?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"mpix\") FROM \"history\" WHERE \"maximum_fps_hd_rx\"<12 AND \"width\">5120;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"frame_size\" text,\n \"width\" real,\n \"height\" real,\n \"mpix\" real,\n \"aspect_ratio\" text,\n \"maximum_fps\" real,\n \"maximum_fps_hd_rx\" real,\n \"least_compression_at_24_fps\" text,\n \"least_compression_at_maximum_fps\" text\n);\n\nQuestion: What is the lowest maximum of fps with a width of 3072 and a height less than 1620?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"maximum_fps\") FROM \"history\" WHERE \"width\"=3072 AND \"height\"<1620;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"frame_size\" text,\n \"width\" real,\n \"height\" real,\n \"mpix\" real,\n \"aspect_ratio\" text,\n \"maximum_fps\" real,\n \"maximum_fps_hd_rx\" real,\n \"least_compression_at_24_fps\" text,\n \"least_compression_at_maximum_fps\" text\n);\n\nQuestion: What is the maximum fps HDRx with a height larger than 1080 with a compression at 24 fps of 6:1 with a compression at maximum fps of at least 7:1?"
},
{
"role": "assistant",
"content": "SELECT \"maximum_fps_hd_rx\" FROM \"history\" WHERE \"height\">1080 AND \"least_compression_at_24_fps\"='6:1' AND \"least_compression_at_maximum_fps\"='7:1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Who got the loss on the game that ended in a 52-36 record?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='52-36';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Who got the loss for the game ending in a record of 55-41?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='55-41';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Which team opponent had a loss with their pitcher Dotson (8-6)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='dotson (8-6)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"romanian_agricultural_research\" (\n \"production_year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the average 2006 value for wheat with a 2005 value greater than 7340?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2006\") FROM \"romanian_agricultural_research\" WHERE \"production_year\"='wheat' AND \"2005\">7340;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"romanian_agricultural_research\" (\n \"production_year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the average 2002 value for Sunflower, which had a 2010 value less than 5587 and a 2007 value greater than 546?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2002\") FROM \"romanian_agricultural_research\" WHERE \"2010\"<5587 AND \"production_year\"='sunflower' AND \"2007\">546;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"romanian_agricultural_research\" (\n \"production_year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the average 2001 value with a 2010 value greater than 414, a 2011 value of 7192, and a 2005 value larger than 7340?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2001\") FROM \"romanian_agricultural_research\" WHERE \"2010\">414 AND \"2011\"=7192 AND \"2005\">7340;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"romanian_agricultural_research\" (\n \"production_year\" text,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the 2006 value with a 2011 value greater than 4113 and a 2008 value less than 7181?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"2006\") FROM \"romanian_agricultural_research\" WHERE \"2011\">4113 AND \"2008\"<7181;"
}
]
|
[
{
"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 \"game_center\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Name the gamecenter that has attendance of 65,212"
},
{
"role": "assistant",
"content": "SELECT \"game_center\" FROM \"schedule\" WHERE \"attendance\"='65,212';"
}
]
|
[
{
"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 \"game_center\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Name the gamecenter with attendance of 78,551"
},
{
"role": "assistant",
"content": "SELECT \"game_center\" FROM \"schedule\" WHERE \"attendance\"='78,551';"
}
]
|
[
{
"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 \"game_center\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Name the tv time for attendance of 69,551"
},
{
"role": "assistant",
"content": "SELECT \"tv_time\" FROM \"schedule\" WHERE \"attendance\"='69,551';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the smallest number of laps imre toth has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"250cc_classification\" WHERE \"rider\"='imre toth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the smallest number of laps marco simoncelli has with grid less than 8 and gilera as the manufacturer?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"250cc_classification\" WHERE \"manufacturer\"='gilera' AND \"rider\"='marco simoncelli' AND \"grid\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"india_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the away captain at Brisbane Cricket Ground?"
},
{
"role": "assistant",
"content": "SELECT \"away_captain\" FROM \"india_in_australia\" WHERE \"venue\"='brisbane cricket ground';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"india_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the home captain at Sydney Cricket Ground?"
},
{
"role": "assistant",
"content": "SELECT \"home_captain\" FROM \"india_in_australia\" WHERE \"venue\"='sydney cricket ground';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"india_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: On what date was the venue at Brisbane Cricket Ground?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"india_in_australia\" WHERE \"venue\"='brisbane cricket ground';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"india_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the away captain at Waca Ground?"
},
{
"role": "assistant",
"content": "SELECT \"away_captain\" FROM \"india_in_australia\" WHERE \"venue\"='waca ground';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"india_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: On what date was the venue at Brisbane Cricket Ground?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"india_in_australia\" WHERE \"venue\"='brisbane cricket ground';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score for the game on June 30?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='june 30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cd_releases\" (\n \"catalog_num\" text,\n \"title\" text,\n \"year\" text,\n \"composer\" text,\n \"released\" real\n);\n\nQuestion: What CD has a catalog # of PCR 502?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"cd_releases\" WHERE \"catalog_num\"='pcr 502';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cd_releases\" (\n \"catalog_num\" text,\n \"title\" text,\n \"year\" text,\n \"composer\" text,\n \"released\" real\n);\n\nQuestion: What CD was released in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"cd_releases\" WHERE \"released\"=2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What is the highest Division when the playoffs were the quarter finals, with a Regular Season of 5th?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"division\") FROM \"year_by_year\" WHERE \"playoffs\"='quarter finals' AND \"regular_season\"='5th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What is the year when they did not qualify for the playoff and the Regular Season shows as 10th?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"year_by_year\" WHERE \"playoffs\"='did not qualify' AND \"regular_season\"='10th';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.