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 \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: Which game did Curtis Borchardt play with more than 274 rebounds?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"rebounds\" WHERE \"name\"='curtis borchardt' AND \"rebounds\">274;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: In game 34 Curtis Borchardt played on which team with less than 275 rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"rebounds\" WHERE \"rebounds\"<275 AND \"games\"<34 AND \"name\"='curtis borchardt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: How many rebounds occurred in a rank 4 game?"
},
{
"role": "assistant",
"content": "SELECT \"rebounds\" FROM \"rebounds\" WHERE \"rank\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: Which game did was Bud Eley a player in?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"rebounds\" WHERE \"name\"='bud eley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: Which game did Bruesa GBC play in with fewer than 275 rebounds that is ranked less than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"rebounds\" WHERE \"rank\"<4 AND \"rebounds\"<275 AND \"team\"='bruesa gbc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid for johnny herbert?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race\" WHERE \"driver\"='johnny herbert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_third_week_domestic_nett_gross_e\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"third_week_nett_gross\" real\n);\n\nQuestion: Tell me the average rank for dharma productions before 2013"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"biggest_third_week_domestic_nett_gross_e\" WHERE \"studio_s\"='dharma productions' AND \"year\"<2013;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_third_week_domestic_nett_gross_e\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"third_week_nett_gross\" real\n);\n\nQuestion: Name the average year for 4 rank"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"biggest_third_week_domestic_nett_gross_e\" WHERE \"rank\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_third_week_domestic_nett_gross_e\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"third_week_nett_gross\" real\n);\n\nQuestion: Name the lowest rank for red chillies entertainment for 2013"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"biggest_third_week_domestic_nett_gross_e\" WHERE \"year\"=2013 AND \"studio_s\"='red chillies entertainment';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which date did richmond play as away?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_6\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the rank for the player with 5 wins and under 32 events?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"leaders\" WHERE \"wins\"=5 AND \"events\"<32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the rank for the player with over $1,627,890?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"leaders\" WHERE \"earnings\">'1,627,890';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the rank for the player with over 2 wins and under $1,162,581 in earnings?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"leaders\" WHERE \"earnings\"<'1,162,581' AND \"wins\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"land_sea_and_rail_transportation_series\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: What is the issue price of a Year 2000 coin by artist John Mardon of the Included in Steam Buggy mintage."
},
{
"role": "assistant",
"content": "SELECT \"issue_price\" FROM \"land_sea_and_rail_transportation_series\" WHERE \"artist\"='john mardon' AND \"year\"=2000 AND \"mintage\"='included in steam buggy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"land_sea_and_rail_transportation_series\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: What is the theme of the Year 2002 which was created by Artist Dan Fell?"
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"land_sea_and_rail_transportation_series\" WHERE \"year\"=2002 AND \"artist\"='dan fell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"land_sea_and_rail_transportation_series\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: What artist had a mintage of 41,828 before year 2002?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"land_sea_and_rail_transportation_series\" WHERE \"year\"<2002 AND \"mintage\"='41,828';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"land_sea_and_rail_transportation_series\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: A mintage of 31,997 has what issue price?"
},
{
"role": "assistant",
"content": "SELECT \"issue_price\" FROM \"land_sea_and_rail_transportation_series\" WHERE \"mintage\"='31,997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manufacturers\" (\n \"year\" text,\n \"builder\" text,\n \"motors\" text,\n \"trailers\" text,\n \"control_trailers\" text\n);\n\nQuestion: Tell me the control trailers for 52 motors"
},
{
"role": "assistant",
"content": "SELECT \"control_trailers\" FROM \"manufacturers\" WHERE \"motors\"='52';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manufacturers\" (\n \"year\" text,\n \"builder\" text,\n \"motors\" text,\n \"trailers\" text,\n \"control_trailers\" text\n);\n\nQuestion: Name the year for mcwf and control trailers of 35"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"manufacturers\" WHERE \"builder\"='mcwf' AND \"control_trailers\"='35';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manufacturers\" (\n \"year\" text,\n \"builder\" text,\n \"motors\" text,\n \"trailers\" text,\n \"control_trailers\" text\n);\n\nQuestion: I want the trailers for 1931 and builder of mccw"
},
{
"role": "assistant",
"content": "SELECT \"trailers\" FROM \"manufacturers\" WHERE \"year\"='1931' AND \"builder\"='mccw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manufacturers\" (\n \"year\" text,\n \"builder\" text,\n \"motors\" text,\n \"trailers\" text,\n \"control_trailers\" text\n);\n\nQuestion: I want the control trailers for 1931 with builder of grcw"
},
{
"role": "assistant",
"content": "SELECT \"control_trailers\" FROM \"manufacturers\" WHERE \"year\"='1931' AND \"builder\"='grcw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manufacturers\" (\n \"year\" text,\n \"builder\" text,\n \"motors\" text,\n \"trailers\" text,\n \"control_trailers\" text\n);\n\nQuestion: I want the trailers for motors of 145"
},
{
"role": "assistant",
"content": "SELECT \"trailers\" FROM \"manufacturers\" WHERE \"motors\"='145';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"core_county_population_statistics\" (\n \"county\" text,\n \"1900\" real,\n \"1930\" real,\n \"1950\" real,\n \"2000\" real,\n \"2006_est\" real\n);\n\nQuestion: What is the 1930 population when the 2006 est. is less than 44,726 in the county of frio?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1930\") FROM \"core_county_population_statistics\" WHERE \"2006_est\"<'44,726' AND \"county\"='frio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"core_county_population_statistics\" (\n \"county\" text,\n \"1900\" real,\n \"1930\" real,\n \"1950\" real,\n \"2000\" real,\n \"2006_est\" real\n);\n\nQuestion: What is the highest 1930 population when the 2000 population is 43,966 and the 1900 population is less than 8,401?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1930\") FROM \"core_county_population_statistics\" WHERE \"2000\"='43,966' AND \"1900\"<'8,401';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Tell me the sum of wins for top 5 less than 1"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"summary\" WHERE \"top_5\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: I want the average events for top 10 less than 4"
},
{
"role": "assistant",
"content": "SELECT AVG(\"events\") FROM \"summary\" WHERE \"top_10\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Name the highest cuts made when top 5 is less than 3 and top ten is more than 4"
},
{
"role": "assistant",
"content": "SELECT MAX(\"cuts_made\") FROM \"summary\" WHERE \"top_5\"<3 AND \"top_10\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: I want the most top 25 when events are more than 20 and top 10 is more than 21"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_25\") FROM \"summary\" WHERE \"events\">20 AND \"top_10\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Attendance on April 28?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"date\"='april 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"dvd_name\" text,\n \"released\" text,\n \"audio\" text,\n \"aspect_ratio\" text,\n \"duration\" text,\n \"number_of_episodes\" real,\n \"num_of_discs\" real\n);\n\nQuestion: What was escape to river cottage released?"
},
{
"role": "assistant",
"content": "SELECT \"released\" FROM \"dvd_releases\" WHERE \"dvd_name\"='escape to river cottage';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"dvd_name\" text,\n \"released\" text,\n \"audio\" text,\n \"aspect_ratio\" text,\n \"duration\" text,\n \"number_of_episodes\" real,\n \"num_of_discs\" real\n);\n\nQuestion: What DVD has a time of 2 hours 22 minutes?"
},
{
"role": "assistant",
"content": "SELECT \"dvd_name\" FROM \"dvd_releases\" WHERE \"duration\"='2 hours 22 minutes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the date for the game in week 7?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the attendance of the crowd 78,431?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='78,431';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the Capitals game when Columbus was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"february\" WHERE \"home\"='columbus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: The 2002 African Cup of Nations was held on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2002 african cup of nations';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition took place at Stade Fernand Fournier, Arles?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='stade fernand fournier, arles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance of the game where fitzroy was the away team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_2\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gold_plated_proof_silver_dollars\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: Which artist created the silver dollar for the 400th anniversary of Quebec?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"gold_plated_proof_silver_dollars\" WHERE \"theme\"='400th anniversary of quebec';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gold_plated_proof_silver_dollars\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: Which year did the Royal Canadian Mint Staff create a silver dollar?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"gold_plated_proof_silver_dollars\" WHERE \"artist\"='royal canadian mint staff';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gold_plated_proof_silver_dollars\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" text\n);\n\nQuestion: How many coins by Suzanne Duranceau were minted?"
},
{
"role": "assistant",
"content": "SELECT \"mintage\" FROM \"gold_plated_proof_silver_dollars\" WHERE \"artist\"='suzanne duranceau';"
}
] |
[
{
"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 was the method for the resolution of nc where the fight lasted less than 3 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"res\"='nc';"
}
] |
[
{
"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 during the UFC 90 event with a fight that lasted less than 4 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<4 AND \"event\"='ufc 90';"
}
] |
[
{
"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 was the method for the resolution of the fight at UFC 160?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 160';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_derby_del_sole_results\" (\n \"season\" text,\n \"match\" text,\n \"result\" text,\n \"league\" text,\n \"date\" text\n);\n\nQuestion: What is the league on 5 October 1997?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"list_of_derby_del_sole_results\" WHERE \"date\"='5 october 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_derby_del_sole_results\" (\n \"season\" text,\n \"match\" text,\n \"result\" text,\n \"league\" text,\n \"date\" text\n);\n\nQuestion: Which season was on 30 October 1977?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"list_of_derby_del_sole_results\" WHERE \"date\"='30 october 1977';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_derby_del_sole_results\" (\n \"season\" text,\n \"match\" text,\n \"result\" text,\n \"league\" text,\n \"date\" text\n);\n\nQuestion: What season had the Roma-Napoli match on 12 September 1993?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"list_of_derby_del_sole_results\" WHERE \"match\"='roma-napoli' AND \"date\"='12 september 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What club/province for the player with over 18 caps and plays the fly-half?"
},
{
"role": "assistant",
"content": "SELECT \"club_province\" FROM \"2007_rugby_world_cup_squads\" WHERE \"caps\">18 AND \"position\"='fly-half';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What driver has less than 18 laps and a grid number under 16?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"<18 AND \"grid\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed the car with laps more than 70 and a time/retired of +12.535?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\">70 AND \"time_retired\"='+12.535';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was Alexander Wurz's highest laps when he has a grid less than 14 and a time/retired of +1 lap."
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"time_retired\"='+1 lap' AND \"driver\"='alexander wurz' AND \"grid\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was Footscray's opponent on June 15th of 1968?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"away_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kensington_lakes_activities_association\" (\n \"team\" text,\n \"location\" text,\n \"joined\" real,\n \"conference\" text,\n \"division\" text,\n \"previous_conference\" text\n);\n\nQuestion: Which team is located in Westland and was previously in the Western Lakes Activities Association?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"kensington_lakes_activities_association\" WHERE \"previous_conference\"='western lakes activities association' AND \"location\"='westland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kensington_lakes_activities_association\" (\n \"team\" text,\n \"location\" text,\n \"joined\" real,\n \"conference\" text,\n \"division\" text,\n \"previous_conference\" text\n);\n\nQuestion: What was the most recent year that a team located in Highland Township and a member of the West Division joined the Kensington Lakes Activities Association?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"joined\") FROM \"kensington_lakes_activities_association\" WHERE \"division\"='west' AND \"location\"='highland township';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the race with nigel mansell winning in estoril?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"season_review\" WHERE \"race_winner\"='nigel mansell' AND \"location\"='estoril';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the pole position for the belgian grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"race\"='belgian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who won the australian grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"race_winner\" FROM \"season_review\" WHERE \"race\"='australian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the pole position for jerez?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"location\"='jerez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_six_urea_cycle_disorders\" (\n \"location\" text,\n \"abb\" text,\n \"enzyme\" text,\n \"disorder\" text,\n \"measurements\" text\n);\n\nQuestion: What is the enzyme involved in the disorder of Ornithine Transcarbamylase deficiency?"
},
{
"role": "assistant",
"content": "SELECT \"enzyme\" FROM \"the_six_urea_cycle_disorders\" WHERE \"disorder\"='ornithine transcarbamylase deficiency';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_six_urea_cycle_disorders\" (\n \"location\" text,\n \"abb\" text,\n \"enzyme\" text,\n \"disorder\" text,\n \"measurements\" text\n);\n\nQuestion: What lab measurements can help diagnosie ornithine transcarbamylase deficiency?"
},
{
"role": "assistant",
"content": "SELECT \"measurements\" FROM \"the_six_urea_cycle_disorders\" WHERE \"disorder\"='ornithine transcarbamylase deficiency';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_six_urea_cycle_disorders\" (\n \"location\" text,\n \"abb\" text,\n \"enzyme\" text,\n \"disorder\" text,\n \"measurements\" text\n);\n\nQuestion: What is the abbreviation of the enzyme involved in carbamoyl phosphate synthetase i deficiency?"
},
{
"role": "assistant",
"content": "SELECT \"abb\" FROM \"the_six_urea_cycle_disorders\" WHERE \"disorder\"='carbamoyl phosphate synthetase i deficiency';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: what is the venue when the home team is melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_7\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: who is the away team when the away team score is 10.12 (72)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"away_team_score\"='10.12 (72)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: what is the date when the home team is st kilda?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_7\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: what is the date when the venue is junction oval?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_7\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the home team score when played at mcg?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_7\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: who is the away team when played at junction oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"cylinders_valves\" text,\n \"displacement_cc\" real,\n \"max_power_k_w_ps_at_rpm\" text,\n \"max_torque_nm_at_rpm\" text,\n \"engine_code\" text,\n \"top_speed_km_h\" real,\n \"production_period\" text\n);\n\nQuestion: What is the top speed of the model 1.8 20v t?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"top_speed_km_h\") FROM \"petrol_engines\" WHERE \"model\"='1.8 20v t';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"cylinders_valves\" text,\n \"displacement_cc\" real,\n \"max_power_k_w_ps_at_rpm\" text,\n \"max_torque_nm_at_rpm\" text,\n \"engine_code\" text,\n \"top_speed_km_h\" real,\n \"production_period\" text\n);\n\nQuestion: What is the max torque of model 1.4 16v?"
},
{
"role": "assistant",
"content": "SELECT \"max_torque_nm_at_rpm\" FROM \"petrol_engines\" WHERE \"model\"='1.4 16v';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: How many rounds did Ken Wharton go?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"driver\"='ken wharton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What driver has a 166 c 500 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"chassis\"='166 c 500';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maungakiekie_tamaki_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: What is the Onehunga school with a decile 3 and smaller than 310 rolls?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"maungakiekie_tamaki_local_board\" WHERE \"decile\"='3' AND \"roll\"<310 AND \"area\"='onehunga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maungakiekie_tamaki_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: What is the authority status of the school in Ellerslie with a decile of 7?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"maungakiekie_tamaki_local_board\" WHERE \"area\"='ellerslie' AND \"decile\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maungakiekie_tamaki_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: What is the biggest roll number of Sylvia Park School, which has a state authority?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"roll\") FROM \"maungakiekie_tamaki_local_board\" WHERE \"authority\"='state' AND \"name\"='sylvia park school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"maungakiekie_tamaki_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: What is the name of the school with a decile of 1, a state authority, and located in Otahuhu?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"maungakiekie_tamaki_local_board\" WHERE \"decile\"='1' AND \"authority\"='state' AND \"area\"='otahuhu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_coins\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: What is the special notes value for years under 2009?"
},
{
"role": "assistant",
"content": "SELECT \"special_notes\" FROM \"nhl_coins\" WHERE \"year\"<2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_coins\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: How many years have a theme of Toronto Maple Leafs and an Issue Price of 24.95?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"nhl_coins\" WHERE \"theme\"='toronto maple leafs' AND \"issue_price\"=24.95;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Who was the winner for the Winton Motor Raceway circuit?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"circuit\"='winton motor raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What was the team that held the race title of Mallala?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"race_title\"='mallala';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Name the driver for Laps less than 9 and a grid of 13"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"<9 AND \"grid\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"years\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"score\" text,\n \"third\" text\n);\n\nQuestion: Who was the winner in the competition in which the runner-up was Rosenborg?"
},
{
"role": "assistant",
"content": "SELECT \"winners\" FROM \"winners\" WHERE \"runners_up\"='rosenborg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"years\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"score\" text,\n \"third\" text\n);\n\nQuestion: What was the year of the competition in which Odd Grenland was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"winners\" WHERE \"runners_up\"='odd grenland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"years\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"score\" text,\n \"third\" text\n);\n\nQuestion: Who was the winner in the competition in which Lyn took third place and Lillestr\u00f8m was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winners\" FROM \"winners\" WHERE \"runners_up\"='lillestr\u00f8m' AND \"third\"='lyn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the report in Buenos Aires?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"location\"='buenos aires';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What date was the Italian Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"race\"='italian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the report when Mario Andretti held pole position and Jean-Pierre Jarier had the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"pole_position\"='mario andretti' AND \"fastest_lap\"='jean-pierre jarier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the report in the Belgian Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"race\"='belgian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who was the winner when Niki Lauda held pole position?"
},
{
"role": "assistant",
"content": "SELECT \"race_winner\" FROM \"season_review\" WHERE \"pole_position\"='niki lauda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who had the fastest lap in the Monaco Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"season_review\" WHERE \"race\"='monaco grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2701_2800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: Which Object type has a Constellation of cancer?"
},
{
"role": "assistant",
"content": "SELECT \"object_type\" FROM \"2701_2800\" WHERE \"constellation\"='cancer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2701_2800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: Which NGC number has a Constellation of ursa major?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ngc_number\") FROM \"2701_2800\" WHERE \"constellation\"='ursa major';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2701_2800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: Which Constellation has a NGC number smaller than 2775, and a Declination (J2000) of \u00b005\u203207\u2033?"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"2701_2800\" WHERE \"ngc_number\"<2775 AND \"declination_j2000\"='\u00b005\u203207\u2033';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2701_2800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: Which Object type has a NGC number of 2787?"
},
{
"role": "assistant",
"content": "SELECT \"object_type\" FROM \"2701_2800\" WHERE \"ngc_number\"=2787;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size for an away team with a score of 14.2 (86)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_13\" WHERE \"away_team_score\"='14.2 (86)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did St KIlda play their away game?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which team scored 14.14 (98) at an away game?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"away_team_score\"='14.14 (98)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"production_history\" (\n \"country\" text,\n \"2005_capacity\" text,\n \"2006_capacity\" text,\n \"2007_capacity\" text,\n \"2008_capacity\" text,\n \"2009_capacity\" text,\n \"2010_capacity\" text,\n \"2011_capacity\" text,\n \"2012_capacity\" text\n);\n\nQuestion: What country had a production capacity in 2009 of 1228 mw?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"production_history\" WHERE \"2009_capacity\"='1228 mw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score when Philadelphia was the visitor with a Record of 7\u20134\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"visitor\"='philadelphia' AND \"record\"='7\u20134\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was nominee nominated for outstanding featured actor in a musical?"
},
{
"role": "assistant",
"content": "SELECT \"nominee\" FROM \"original_broadway_production\" WHERE \"category\"='outstanding featured actor in a musical' AND \"result\"='nominated';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is the result of nominee, Patricia McGourty, for the drama desk award?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"original_broadway_production\" WHERE \"award\"='drama desk award' AND \"nominee\"='patricia mcgourty';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year was Patricia Mcgourty nominated for a Tony award?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"original_broadway_production\" WHERE \"nominee\"='patricia mcgourty' AND \"award\"='tony award';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.