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 \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals for West Germany having a total more than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medals_table\" WHERE \"total\">2 AND \"nation\"='west germany';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the amount of silver for rank 11 having less than 0 gold?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medals_table\" WHERE \"rank\"='11' AND \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What rank is Bulgaria with less than 3 silver and more than 1 bronze?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"silver\"<3 AND \"bronze\">1 AND \"nation\"='bulgaria';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text,\n \"trofeo_super_team\" text\n);\n\nQuestion: What is the mountains classification when stage is 17?"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text,\n \"trofeo_super_team\" text\n);\n\nQuestion: Who was the winner when points classification is Robbie Mcewen, and a Mountains classification is Jos\u00e9 Rujano?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='robbie mcewen' AND \"mountains_classification\"='jos\u00e9 rujano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text,\n \"trofeo_super_team\" text\n);\n\nQuestion: What is the Trofeo Fast Team when stage is 19?"
},
{
"role": "assistant",
"content": "SELECT \"trofeo_fast_team\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text,\n \"trofeo_super_team\" text\n);\n\nQuestion: What is the points classification when the Intergiro classification is Sven Krau\u00df, and the mountains classification is koldo gil, Trofeo Super Team is Liquigas-Bianchi, and stage is 9?"
},
{
"role": "assistant",
"content": "SELECT \"points_classification\" FROM \"classification_leadership_by_stage\" WHERE \"intergiro_classification\"='sven krau\u00df' AND \"mountains_classification\"='koldo gil' AND \"trofeo_super_team\"='liquigas-bianchi' AND \"stage\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text,\n \"trofeo_super_team\" text\n);\n\nQuestion: What is the Intergiro classification when the points classification is Paolo Bettini, Trofeo Super Team is Davitamon-Lotto, and the Mountains classification is Jos\u00e9 Rujano?"
},
{
"role": "assistant",
"content": "SELECT \"intergiro_classification\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='paolo bettini' AND \"trofeo_super_team\"='davitamon-lotto' AND \"mountains_classification\"='jos\u00e9 rujano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text,\n \"trofeo_super_team\" text\n);\n\nQuestion: What is the Stage when the points classification is Danilo Di Luca, Mountains classification is Jos\u00e9 Rujano, and general classification is Danilo Di Luca?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='danilo di luca' AND \"mountains_classification\"='jos\u00e9 rujano' AND \"general_classification\"='danilo di luca';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the average GEO ID with a latitude less than 46.57958, a latitude of -102.109898 and more than 35.99 square miles of land?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"geo_id\") FROM \"c\" WHERE \"latitude\"<46.57958 AND \"longitude\"=-102.109898 AND \"land_sqmi\">35.99;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What GEO ID has a longitude of -102.693028?"
},
{
"role": "assistant",
"content": "SELECT \"geo_id\" FROM \"c\" WHERE \"longitude\"=-102.693028;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the highest latitude when there are more than 0.518 square miles of water, a longitude less than -99.830606, and a population of 18?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"latitude\") FROM \"c\" WHERE \"water_sqmi\">0.518 AND \"longitude\"<-99.830606 AND \"pop_2010\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the average lane for Australia?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lane\") FROM \"semifinal_1\" WHERE \"nationality\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the highest rank for Josefin Lillhage?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"semifinal_1\" WHERE \"name\"='josefin lillhage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"final\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"stadium\" text\n);\n\nQuestion: What was the attendance for the final quarter (1)?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"fixtures\" WHERE \"final\"='quarter (1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"final\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"stadium\" text\n);\n\nQuestion: What stadium had the score 1 - 1 dodd 38'?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"fixtures\" WHERE \"score\"='1 - 1 dodd 38''';"
}
]
|
[
{
"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 method was used in the Pride 17 event?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='pride 17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"height\" text,\n \"highest_floor\" real,\n \"city\" text,\n \"primary_use\" text\n);\n\nQuestion: What is the Rank of the building that has a Highest floor larger than 50?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"list_of_tallest_buildings\" WHERE \"highest_floor\">50;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary\" (\n \"rank\" real,\n \"country\" text,\n \"athlete\" text,\n \"technical\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: what is the most free when the total is 81.167 and the rank is higher than 23?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"free\") FROM \"preliminary\" WHERE \"total\"=81.167 AND \"rank\">23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"floppy_disk_physical_characteristics_cap\" (\n \"size\" text,\n \"density\" text,\n \"tracks\" real,\n \"coercivity\" text,\n \"unformatted_capacity_per_side\" text\n);\n\nQuestion: How many tracks have an unformatted capacity per side of 2000kb?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tracks\") FROM \"floppy_disk_physical_characteristics_cap\" WHERE \"unformatted_capacity_per_side\"='2000kb';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"floppy_disk_physical_characteristics_cap\" (\n \"size\" text,\n \"density\" text,\n \"tracks\" real,\n \"coercivity\" text,\n \"unformatted_capacity_per_side\" text\n);\n\nQuestion: What is the unformatted capacity per side if the size is 8in?"
},
{
"role": "assistant",
"content": "SELECT \"unformatted_capacity_per_side\" FROM \"floppy_disk_physical_characteristics_cap\" WHERE \"size\"='8in';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"floppy_disk_physical_characteristics_cap\" (\n \"size\" text,\n \"density\" text,\n \"tracks\" real,\n \"coercivity\" text,\n \"unformatted_capacity_per_side\" text\n);\n\nQuestion: How many tracks have a single density?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tracks\") FROM \"floppy_disk_physical_characteristics_cap\" WHERE \"density\"='single';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"absentee_cardinals\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What's listed for Elevatated that has Cardinalatial title of Priest of SS. XII Apostoli?"
},
{
"role": "assistant",
"content": "SELECT \"elevated\" FROM \"absentee_cardinals\" WHERE \"cardinalatial_title\"='priest of ss. xii apostoli';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"absentee_cardinals\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What Elector has the Place of birth of San Severino?"
},
{
"role": "assistant",
"content": "SELECT \"elector\" FROM \"absentee_cardinals\" WHERE \"place_of_birth\"='san severino';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"absentee_cardinals\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What's the Cardinalatial Title has the Elevated of December 18, 1182, the Place of birth of Lucca, and the Electo rof Pandolfo?"
},
{
"role": "assistant",
"content": "SELECT \"cardinalatial_title\" FROM \"absentee_cardinals\" WHERE \"elevated\"='december 18, 1182' AND \"place_of_birth\"='lucca' AND \"elector\"='pandolfo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"absentee_cardinals\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What's listed for the Elevated with a Cardinalatial title of Priest of S. Eusebio and Archbishop of Benevento?"
},
{
"role": "assistant",
"content": "SELECT \"elevated\" FROM \"absentee_cardinals\" WHERE \"cardinalatial_title\"='priest of s. eusebio and archbishop of benevento';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"absentee_cardinals\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What Elector has the Place of Birth listed as Bavaria?"
},
{
"role": "assistant",
"content": "SELECT \"elector\" FROM \"absentee_cardinals\" WHERE \"place_of_birth\"='bavaria';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What are the total apps that have 41 as the League apps, with total goals greater than 1?"
},
{
"role": "assistant",
"content": "SELECT \"total_apps\" FROM \"appearances_and_goals\" WHERE \"league_apps\"='41' AND \"total_goals\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What are the average league goals that have 2 (1) as the total apps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"total_apps\"='2 (1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the highest league goals that have barry endean as the name, wirh FA cup apps greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"name\"='barry endean' AND \"fa_cup_apps\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: Which school left in 1968 and has the team name of Panthers?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"former_members\" WHERE \"team_name\"='panthers' AND \"year_left\"='1968';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: What year did a team from North Dearborn leave?"
},
{
"role": "assistant",
"content": "SELECT \"year_left\" FROM \"former_members\" WHERE \"school\"='north dearborn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: Which city has a school of North Vernon and a county of 40 Jennings?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"former_members\" WHERE \"county\"='40 jennings' AND \"school\"='north vernon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: What year did a school from Jennings County join?"
},
{
"role": "assistant",
"content": "SELECT \"year_joined\" FROM \"former_members\" WHERE \"school\"='jennings county';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: Which school are the Red Devils from?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"former_members\" WHERE \"team_name\"='red devils';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: Which school comes from Brookville?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"former_members\" WHERE \"city\"='brookville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What's the lowest rank of Lane 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"semifinal_1\" WHERE \"lane\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What's the highest lane of rank 4 with a time less than 24.72?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"semifinal_1\" WHERE \"time\"<24.72 AND \"rank\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What's the time of Britta Steffen in a lane less than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"time\") FROM \"semifinal_1\" WHERE \"lane\"<4 AND \"name\"='britta steffen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What's the lowest rank of the United States with a time less than 24.63?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"semifinal_1\" WHERE \"nationality\"='united states' AND \"time\"<24.63;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What's the duration of the Archers with Norman Painting as an actor?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"radio\" WHERE \"soap_opera\"='the archers' AND \"actor\"='norman painting';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What's the duration of the Archers with Pauline Seville acting?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"radio\" WHERE \"soap_opera\"='the archers' AND \"actor\"='pauline seville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: Who's the actor for the Archers having a character of Martha Woodford?"
},
{
"role": "assistant",
"content": "SELECT \"actor\" FROM \"radio\" WHERE \"soap_opera\"='the archers' AND \"character\"='martha woodford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: Who's the character when Margot Boyd was acting?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"radio\" WHERE \"actor\"='margot boyd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What were the notes for the time of 6:34.51?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"heat_4\" WHERE \"time\"='6:34.51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank for the rowers with the time of 6:24.35?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"heat_4\" WHERE \"time\"='6:24.35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Which rowers represented portugal and had notes of r?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"heat_4\" WHERE \"notes\"='r' AND \"country\"='portugal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Which rowers represented the country of portugal?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"heat_4\" WHERE \"country\"='portugal';"
}
]
|
[
{
"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\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: what is the average races when points is 9 and poles is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"races\") FROM \"career_statistics\" WHERE \"points\"='9' AND \"poles\"<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\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: what is the series when wins is less than 3, points is 9 and podiums is 1?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_statistics\" WHERE \"wins\"<3 AND \"points\"='9' AND \"podiums\"=1;"
}
]
|
[
{
"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\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: how many times is races more than 14, position is 9th and wins less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"career_statistics\" WHERE \"races\">14 AND \"position\"='9th' AND \"wins\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"event\" text,\n \"date\" text,\n \"location\" text,\n \"winning_skip\" text,\n \"runner_up_skip\" text\n);\n\nQuestion: Who was the runner-up during the Mac Ice Classic?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up_skip\" FROM \"winners\" WHERE \"event\"='mac ice classic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"event\" text,\n \"date\" text,\n \"location\" text,\n \"winning_skip\" text,\n \"runner_up_skip\" text\n);\n\nQuestion: What's the date when Stu Harris was the Runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"winners\" WHERE \"runner_up_skip\"='stu harris';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"event\" text,\n \"date\" text,\n \"location\" text,\n \"winning_skip\" text,\n \"runner_up_skip\" text\n);\n\nQuestion: What's the location of the Ramada Perth Masters event?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"winners\" WHERE \"event\"='ramada perth masters';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"event\" text,\n \"date\" text,\n \"location\" text,\n \"winning_skip\" text,\n \"runner_up_skip\" text\n);\n\nQuestion: What's the location of the National event with Kevin Martin winning?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"winners\" WHERE \"winning_skip\"='kevin martin' AND \"event\"='the national';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"event\" text,\n \"date\" text,\n \"location\" text,\n \"winning_skip\" text,\n \"runner_up_skip\" text\n);\n\nQuestion: What's the event that happened in Gander, Newfoundland and Labrador with Randy Ferbey runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"winners\" WHERE \"runner_up_skip\"='randy ferbey' AND \"location\"='gander, newfoundland and labrador';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"event\" text,\n \"date\" text,\n \"location\" text,\n \"winning_skip\" text,\n \"runner_up_skip\" text\n);\n\nQuestion: What's the location of the National event?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"winners\" WHERE \"event\"='the national';"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: Which Arena has a Date of october 10?"
},
{
"role": "assistant",
"content": "SELECT \"arena\" FROM \"regular_season\" WHERE \"date\"='october 10';"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: Which Attendance has a Score of 4\u20133, and Points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"regular_season\" WHERE \"score\"='4\u20133' AND \"points\"<5;"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: Which Attendance has an Arena of arrowhead pond of anaheim, and Points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season\" WHERE \"arena\"='arrowhead pond of anaheim' AND \"points\"<5;"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: How much Attendance has an Arena of arrowhead pond of anaheim, and Points of 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"regular_season\" WHERE \"arena\"='arrowhead pond of anaheim' AND \"points\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"country\" text,\n \"1960\" real,\n \"1961\" real,\n \"1962\" real,\n \"1963\" real,\n \"1964\" real,\n \"1965\" real,\n \"1966\" real,\n \"1967\" real,\n \"1968\" real,\n \"1969\" real\n);\n\nQuestion: How much 1969 has a 1967 smaller than 0.73, and a 1964 larger than 0.07?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1969\") FROM \"1960s\" WHERE \"1967\"<0.73 AND \"1964\">0.07;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"country\" text,\n \"1960\" real,\n \"1961\" real,\n \"1962\" real,\n \"1963\" real,\n \"1964\" real,\n \"1965\" real,\n \"1966\" real,\n \"1967\" real,\n \"1968\" real,\n \"1969\" real\n);\n\nQuestion: Which 1964 has a Country of united states, and a 1969 smaller than 7.3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1964\") FROM \"1960s\" WHERE \"country\"='united states' AND \"1969\"<7.3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"country\" text,\n \"1960\" real,\n \"1961\" real,\n \"1962\" real,\n \"1963\" real,\n \"1964\" real,\n \"1965\" real,\n \"1966\" real,\n \"1967\" real,\n \"1968\" real,\n \"1969\" real\n);\n\nQuestion: Which 1965 has a 1962 of 0.35000000000000003, and a 1967 smaller than 0.53?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1965\") FROM \"1960s\" WHERE \"1962\"=0.35000000000000003 AND \"1967\"<0.53;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" text,\n \"cross_code_debut\" text,\n \"date\" text\n);\n\nQuestion: What is Bev Risman's Cross Code Debut?"
},
{
"role": "assistant",
"content": "SELECT \"cross_code_debut\" FROM \"england\" WHERE \"player\"='bev risman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" text,\n \"cross_code_debut\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of RL Test v Wales Int'l Debut?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"england\" WHERE \"int_l_debut\"='rl test v wales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" text,\n \"cross_code_debut\" text,\n \"date\" text\n);\n\nQuestion: What is the Player with a Cross Code Debut of RL Test GB v France?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"england\" WHERE \"cross_code_debut\"='rl test gb v france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" text,\n \"cross_code_debut\" text,\n \"date\" text\n);\n\nQuestion: In what Year is Keith Smith's Cross Code Debut RL Test v Wales?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"england\" WHERE \"cross_code_debut\"='rl test v wales' AND \"player\"='keith smith';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" text,\n \"cross_code_debut\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of the Int'l Debut of 1967?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"england\" WHERE \"year\"='1967';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" text,\n \"cross_code_debut\" text,\n \"date\" text\n);\n\nQuestion: What is the Player in the Int'l Debut of 1974?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"england\" WHERE \"year\"='1974';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What lane has a time of 24.83 and a heat less than 11?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"heats\" WHERE \"time\"='24.83' AND \"heat\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the total number of heat for Chinyere Pigot?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"heat\") FROM \"heats\" WHERE \"name\"='chinyere pigot';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the name for lane 1, from Mauritius?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"heats\" WHERE \"lane\"=1 AND \"nationality\"='mauritius';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Who won in 1988 with a total less than 287?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"<287 AND \"year_s_won\"='1988';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What country is Larry Mize from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"player\"='larry mize';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of bronze medals for a nation with fewer than 1 total medal?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"total\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_cylinder_race\" (\n \"rank\" text,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What team is Frank Hulbert on?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"single_cylinder_race\" WHERE \"rider\"='frank hulbert';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_cylinder_race\" (\n \"rank\" text,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What was Martin Geiger's rank?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"single_cylinder_race\" WHERE \"rider\"='martin geiger';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_cylinder_race\" (\n \"rank\" text,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What was Tom Silver's rank?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"single_cylinder_race\" WHERE \"rider\"='tom silver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"academy_graduates_2000_present\" (\n \"player\" text,\n \"current_club\" text,\n \"born\" text,\n \"debut\" text,\n \"manager\" text\n);\n\nQuestion: Who was the player with a debut of age 18 v plymouth , 14 august 2012, and born in Portsmouth?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"academy_graduates_2000_present\" WHERE \"debut\"='age 18 v plymouth , 14 august 2012' AND \"born\"='portsmouth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"academy_graduates_2000_present\" (\n \"player\" text,\n \"current_club\" text,\n \"born\" text,\n \"debut\" text,\n \"manager\" text\n);\n\nQuestion: Where was the player whose Current Club Elfsborg born?"
},
{
"role": "assistant",
"content": "SELECT \"born\" FROM \"academy_graduates_2000_present\" WHERE \"current_club\"='elfsborg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"academy_graduates_2000_present\" (\n \"player\" text,\n \"current_club\" text,\n \"born\" text,\n \"debut\" text,\n \"manager\" text\n);\n\nQuestion: What is the debut for the person born in Poole?"
},
{
"role": "assistant",
"content": "SELECT \"debut\" FROM \"academy_graduates_2000_present\" WHERE \"born\"='poole';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"academy_graduates_2000_present\" (\n \"player\" text,\n \"current_club\" text,\n \"born\" text,\n \"debut\" text,\n \"manager\" text\n);\n\nQuestion: What is the club for Sam Magri?"
},
{
"role": "assistant",
"content": "SELECT \"current_club\" FROM \"academy_graduates_2000_present\" WHERE \"player\"='sam magri';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"academy_graduates_2000_present\" (\n \"player\" text,\n \"current_club\" text,\n \"born\" text,\n \"debut\" text,\n \"manager\" text\n);\n\nQuestion: What is the name of the manager of the Atl\u00e9tico Baleares?"
},
{
"role": "assistant",
"content": "SELECT \"manager\" FROM \"academy_graduates_2000_present\" WHERE \"current_club\"='atl\u00e9tico baleares';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_champions_and_major_awards\" (\n \"year\" real,\n \"league_champion\" text,\n \"best_blocker\" text,\n \"rookie_of_the_year\" text,\n \"c_a_n_t_s_l_e_e_p_award\" text\n);\n\nQuestion: Who was the best blocker for the year that has a League Champion of queens of pain, and a C.A.N.T.S.L.E.E.P. Award of chassis crass (brooklyn)?"
},
{
"role": "assistant",
"content": "SELECT \"best_blocker\" FROM \"league_champions_and_major_awards\" WHERE \"league_champion\"='queens of pain' AND \"c_a_n_t_s_l_e_e_p_award\"='chassis crass (brooklyn)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_champions_and_major_awards\" (\n \"year\" real,\n \"league_champion\" text,\n \"best_blocker\" text,\n \"rookie_of_the_year\" text,\n \"c_a_n_t_s_l_e_e_p_award\" text\n);\n\nQuestion: Who was the rookie of the year for the year that had the Brooklyn Bombshells as the league champion?"
},
{
"role": "assistant",
"content": "SELECT \"rookie_of_the_year\" FROM \"league_champions_and_major_awards\" WHERE \"league_champion\"='brooklyn bombshells';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_champions_and_major_awards\" (\n \"year\" real,\n \"league_champion\" text,\n \"best_blocker\" text,\n \"rookie_of_the_year\" text,\n \"c_a_n_t_s_l_e_e_p_award\" text\n);\n\nQuestion: What was the latest year that has a Rookie of the Year of omg wtf (brooklyn) and League Champion of bronx gridlock?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"league_champions_and_major_awards\" WHERE \"league_champion\"='bronx gridlock' AND \"rookie_of_the_year\"='omg wtf (brooklyn)';"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: Which Arena has Points larger than 28, and a Date of december 14?"
},
{
"role": "assistant",
"content": "SELECT \"arena\" FROM \"regular_season\" WHERE \"points\">28 AND \"date\"='december 14';"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: How many Points have an Arena of bell centre?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"regular_season\" WHERE \"arena\"='bell centre';"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: How much Attendance has a Loss of divis (0\u20133\u20130), and Points smaller than 38?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"regular_season\" WHERE \"loss\"='divis (0\u20133\u20130)' AND \"points\"<38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: With a 1st run of 53.300 (7), and greater than 21 total, what is the average rank?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"heat_1\" WHERE \"1st_run\"='53.300 (7)' AND \"total\">21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: What 2nd run has a less than 6 rank, and 3 as the total?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_run\" FROM \"heat_1\" WHERE \"rank\"<6 AND \"total\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: When the 3rd run is 36.490 (3) what is the 2nd run?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_run\" FROM \"heat_1\" WHERE \"3rd_run\"='36.490 (3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the sum number of year when Call of Duty 4: Modern Warfare was the game?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"list_of_game_of_the_year_awards\" WHERE \"game\"='call of duty 4: modern warfare';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the earliest year when action was the genre?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"list_of_game_of_the_year_awards\" WHERE \"genre\"='action';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the smallest year when Ubisoft Montreal was the developer (s)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"list_of_game_of_the_year_awards\" WHERE \"developer_s\"='ubisoft montreal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the latest year when Call of Duty 4: Modern Warfare was the game?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"list_of_game_of_the_year_awards\" WHERE \"game\"='call of duty 4: modern warfare';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"governors_of_missouri\" (\n \"governor\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"lieutenant_governor\" text,\n \"terms\" text\n);\n\nQuestion: Who was Lieutenant Governor to the governor that left office on January 14, 1929?"
},
{
"role": "assistant",
"content": "SELECT \"lieutenant_governor\" FROM \"governors_of_missouri\" WHERE \"left_office\"='january 14, 1929';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"governors_of_missouri\" (\n \"governor\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"lieutenant_governor\" text,\n \"terms\" text\n);\n\nQuestion: Which governor took office on January 8, 1877?"
},
{
"role": "assistant",
"content": "SELECT \"governor\" FROM \"governors_of_missouri\" WHERE \"took_office\"='january 8, 1877';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"governors_of_missouri\" (\n \"governor\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"lieutenant_governor\" text,\n \"terms\" text\n);\n\nQuestion: Who was lieutenant governor to the governor that left office on October 16, 2000?"
},
{
"role": "assistant",
"content": "SELECT \"lieutenant_governor\" FROM \"governors_of_missouri\" WHERE \"left_office\"='october 16, 2000';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.