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 \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: If there are more than 0 Silver medals, less than 5 gold medals, and no bronze medals, what was the total number of medals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"silver\">0 AND \"gold\"<5 AND \"bronze\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"6401_6500\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What's the total number of NGC that has a Declination ( J2000 ) of \u00b015\u203255\u2033, and an Apparent magnitude greater than 10?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"ngc_number\") FROM \"6401_6500\" WHERE \"declination_j2000\"='\u00b015\u203255\u2033' AND \"apparent_magnitude\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"6401_6500\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which object has an Apparent magnitude larger than 9.6, and a Right ascension ( J2000 ) of 17h59m02.0s?"
},
{
"role": "assistant",
"content": "SELECT \"object_type\" FROM \"6401_6500\" WHERE \"apparent_magnitude\">9.6 AND \"right_ascension_j2000\"='17h59m02.0s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: Which species of bacteria has 5,566 genes?"
},
{
"role": "assistant",
"content": "SELECT \"strain\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"genes\"='5,566';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: What is the Strain name of Species Thiomicrospira crunogena?"
},
{
"role": "assistant",
"content": "SELECT \"strain\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"species\"='thiomicrospira crunogena';"
}
] |
[
{
"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: Name the location of record 5-3"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='5-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_standings\" (\n \"rank\" real,\n \"team\" text,\n \"loss\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"percentage\" text\n);\n\nQuestion: What's the rank for a team that has a percentage of 56% and a loss smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"current_standings\" WHERE \"percentage\"='56%' AND \"loss\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the average avg for TD's less than 3 for devin wyman and long more than 3"
},
{
"role": "assistant",
"content": "SELECT AVG(\"avg\") FROM \"wide_receivers\" WHERE \"td_s\"<3 AND \"player\"='devin wyman' AND \"long\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the lowest yards for 34 long and avg less than 12.6"
},
{
"role": "assistant",
"content": "SELECT MIN(\"yards\") FROM \"wide_receivers\" WHERE \"long\"=34 AND \"avg\"<12.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_nascar_winston_cup_series_drivers\" (\n \"team\" text,\n \"make\" text,\n \"driver\" text,\n \"sponsor\" text,\n \"car_owner\" text\n);\n\nQuestion: What team is sponsored by chameleon sunglasses?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"1983_nascar_winston_cup_series_drivers\" WHERE \"sponsor\"='chameleon sunglasses';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_nascar_winston_cup_series_drivers\" (\n \"team\" text,\n \"make\" text,\n \"driver\" text,\n \"sponsor\" text,\n \"car_owner\" text\n);\n\nQuestion: What team does bobby hillin jr. (r) drive a buick regal for?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"1983_nascar_winston_cup_series_drivers\" WHERE \"make\"='buick regal' AND \"driver\"='bobby hillin jr. (r)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_nascar_winston_cup_series_drivers\" (\n \"team\" text,\n \"make\" text,\n \"driver\" text,\n \"sponsor\" text,\n \"car_owner\" text\n);\n\nQuestion: What team is sponsored by w.h. bolin?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"1983_nascar_winston_cup_series_drivers\" WHERE \"sponsor\"='w.h. bolin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_nascar_winston_cup_series_drivers\" (\n \"team\" text,\n \"make\" text,\n \"driver\" text,\n \"sponsor\" text,\n \"car_owner\" text\n);\n\nQuestion: Who drives for the sponsor w.h. bolin?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"1983_nascar_winston_cup_series_drivers\" WHERE \"sponsor\"='w.h. bolin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_nascar_winston_cup_series_drivers\" (\n \"team\" text,\n \"make\" text,\n \"driver\" text,\n \"sponsor\" text,\n \"car_owner\" text\n);\n\nQuestion: Who sponsors driver neil bonnett?"
},
{
"role": "assistant",
"content": "SELECT \"sponsor\" FROM \"1983_nascar_winston_cup_series_drivers\" WHERE \"driver\"='neil bonnett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"channel\" text,\n \"description\" text,\n \"financed_by\" text,\n \"owned_by\" text,\n \"launched\" real\n);\n\nQuestion: What channel has a description of the public broadcaster?"
},
{
"role": "assistant",
"content": "SELECT \"channel\" FROM \"analogue_terrestrial_television\" WHERE \"description\"='public broadcaster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"channel\" text,\n \"description\" text,\n \"financed_by\" text,\n \"owned_by\" text,\n \"launched\" real\n);\n\nQuestion: What was the channel that was financed by commercials?"
},
{
"role": "assistant",
"content": "SELECT \"channel\" FROM \"analogue_terrestrial_television\" WHERE \"financed_by\"='commercials';"
}
] |
[
{
"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: Which entry has the highest laps of those with constructor Minardi - Fondmetal, driver Marc Gen\u00e9, and a grid larger than 20?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"constructor\"='minardi - fondmetal' AND \"driver\"='marc gen\u00e9' AND \"grid\">20;"
}
] |
[
{
"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 sum of grid values of driver Michael Schumacher with lap counts larger than 66?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"laps\">66 AND \"driver\"='michael schumacher';"
}
] |
[
{
"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: Which driver has 62 laps?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"=62;"
}
] |
[
{
"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 highest grid value with constructor Mclaren - Mercedes, driver David Coulthard, and has fewer than 66 laps?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"constructor\"='mclaren - mercedes' AND \"driver\"='david coulthard' AND \"laps\"<66;"
}
] |
[
{
"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 highest number of laps for grid 17?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: None of the rounds has Roger Williamson as a driver."
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"championship_drivers_and_constructors\" WHERE \"driver\"='roger williamson';"
}
] |
[
{
"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 time/retired for alain prost?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='alain prost';"
}
] |
[
{
"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 time/retired for grid 9?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=9;"
}
] |
[
{
"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 had to retire due to suspension?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='suspension';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"sport\" text,\n \"year\" real,\n \"class\" text,\n \"coach\" text,\n \"record\" text\n);\n\nQuestion: What class is volleyball in 2000?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"sports\" WHERE \"sport\"='volleyball' AND \"year\"=2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"sport\" text,\n \"year\" real,\n \"class\" text,\n \"coach\" text,\n \"record\" text\n);\n\nQuestion: What is the team's record in 3a volleyball?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"sports\" WHERE \"class\"='3a' AND \"sport\"='volleyball';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 the away team at Melbourne's home game?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" 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_16\" (\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 away team score at Corio Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"venue\"='corio oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: When did the away team score 12.14 (86)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" WHERE \"away_team_score\"='12.14 (86)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mi_g_credits\" (\n \"date\" text,\n \"pilot\" text,\n \"weapon_systems_officer\" text,\n \"aircraft\" text,\n \"tail_code\" text,\n \"call_sign\" text,\n \"kill\" text\n);\n\nQuestion: Which Call Sign that has a Tail Code of oy belong to Weapon Systems Officer Capt Charles B. Debellevue?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"mi_g_credits\" WHERE \"tail_code\"='oy' AND \"weapon_systems_officer\"='capt charles b. debellevue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mi_g_credits\" (\n \"date\" text,\n \"pilot\" text,\n \"weapon_systems_officer\" text,\n \"aircraft\" text,\n \"tail_code\" text,\n \"call_sign\" text,\n \"kill\" text\n);\n\nQuestion: Which Tail Code belongs to Weapon Systems Officer Capt Charles B. Debellevue?"
},
{
"role": "assistant",
"content": "SELECT \"tail_code\" FROM \"mi_g_credits\" WHERE \"weapon_systems_officer\"='capt charles b. debellevue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mi_g_credits\" (\n \"date\" text,\n \"pilot\" text,\n \"weapon_systems_officer\" text,\n \"aircraft\" text,\n \"tail_code\" text,\n \"call_sign\" text,\n \"kill\" text\n);\n\nQuestion: Which Aircraft has the Call Sign Paula 01?"
},
{
"role": "assistant",
"content": "SELECT \"aircraft\" FROM \"mi_g_credits\" WHERE \"call_sign\"='paula 01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mi_g_credits\" (\n \"date\" text,\n \"pilot\" text,\n \"weapon_systems_officer\" text,\n \"aircraft\" text,\n \"tail_code\" text,\n \"call_sign\" text,\n \"kill\" text\n);\n\nQuestion: Which Call Sign that has Tail Code ed?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"mi_g_credits\" WHERE \"tail_code\"='ed';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mi_g_credits\" (\n \"date\" text,\n \"pilot\" text,\n \"weapon_systems_officer\" text,\n \"aircraft\" text,\n \"tail_code\" text,\n \"call_sign\" text,\n \"kill\" text\n);\n\nQuestion: Which aircraft Weapon Systems Officer Capt Charles B. Debellevue belongs on?"
},
{
"role": "assistant",
"content": "SELECT \"aircraft\" FROM \"mi_g_credits\" WHERE \"weapon_systems_officer\"='capt charles b. debellevue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"mid_gippsland_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest amount of wins of someone who has 2 losses?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"2008_ladder\" WHERE \"losses\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"mid_gippsland_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the largest amount of wins of someone who has an against score greater than 1249 and a number of losses less than 17?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"2008_ladder\" WHERE \"against\">1249 AND \"losses\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the name of race that has a winning driver of Stirling moss and a Circuit of oulton park?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"winning_driver\"='stirling moss' AND \"circuit\"='oulton park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who is the winning driver that has a construction of brm?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"non_championship_race_results\" WHERE \"constructor\"='brm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titles_by_country\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the high bronze total for nations ranked 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"titles_by_country\" WHERE \"rank\"='12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 the away team when Footscray scored 11.14 (80)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_14\" WHERE \"home_team_score\"='11.14 (80)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score on May 3, 1998?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_13\" WHERE \"date\"='may 3, 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"helicopters\" (\n \"aircraft\" text,\n \"origin\" text,\n \"role\" text,\n \"registration\" text,\n \"number\" text\n);\n\nQuestion: What is the role of the aircraft that has a registration of s5-hpg s5-hpc?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"helicopters\" WHERE \"registration\"='s5-hpg s5-hpc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"helicopters\" (\n \"aircraft\" text,\n \"origin\" text,\n \"role\" text,\n \"registration\" text,\n \"number\" text\n);\n\nQuestion: What is the country of origin of the aircraft with a registration s5-hpb?"
},
{
"role": "assistant",
"content": "SELECT \"origin\" FROM \"helicopters\" WHERE \"registration\"='s5-hpb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"helicopters\" (\n \"aircraft\" text,\n \"origin\" text,\n \"role\" text,\n \"registration\" text,\n \"number\" text\n);\n\nQuestion: What is the role of the aircraft that originates from the European Union?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"helicopters\" WHERE \"origin\"='european union';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"helicopters\" (\n \"aircraft\" text,\n \"origin\" text,\n \"role\" text,\n \"registration\" text,\n \"number\" text\n);\n\nQuestion: What is the role of the aircraft that has a registration of s5-hpb?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"helicopters\" WHERE \"registration\"='s5-hpb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which Hometown has a Height of 6-10?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2010_boys_team\" WHERE \"height\"='6-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the NBA Draft for the School Bishop O'Connell High School?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"2010_boys_team\" WHERE \"school\"='bishop o''connell high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which School is located in Winter Park, FL (Hometown)?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2010_boys_team\" WHERE \"hometown\"='winter park, fl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: When the School is Bishop Luers High School, what is the Hometown?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2010_boys_team\" WHERE \"school\"='bishop luers high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the Hometown for Villanova College?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2010_boys_team\" WHERE \"college\"='villanova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the home team at the game when the Thrashers had a record of 18\u201318\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"december\" WHERE \"record\"='18\u201318\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\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 game with a decision of Lehtonen and attended by more than 17,731 people?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"december\" WHERE \"decision\"='lehtonen' AND \"attendance\">'17,731';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid for johnny herbert with a Time/Retired of +1 lap?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"time_retired\"='+1 lap' AND \"driver\"='johnny herbert';"
}
] |
[
{
"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: Who was the away team at mcg?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" 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_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: Who was the home team at princes park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"venue\"='princes park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2101_2200\" (\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 orion, and an NGC number larger than 2174, and a Declination (J2000) of \u00b048\u203206\u2033?"
},
{
"role": "assistant",
"content": "SELECT \"object_type\" FROM \"2101_2200\" WHERE \"constellation\"='orion' AND \"ngc_number\">2174 AND \"declination_j2000\"='\u00b048\u203206\u2033';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2101_2200\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: Which Right ascension (J2000) has a Constellation of mensa, and an NGC number larger than 2171?"
},
{
"role": "assistant",
"content": "SELECT \"right_ascension_j2000\" FROM \"2101_2200\" WHERE \"constellation\"='mensa' AND \"ngc_number\">2171;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2101_2200\" (\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 an Object type of open cluster, and a Right ascension (J2000) of 06h01m06s?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ngc_number\") FROM \"2101_2200\" WHERE \"object_type\"='open cluster' AND \"right_ascension_j2000\"='06h01m06s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2101_2200\" (\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 an NGC number of 2171?"
},
{
"role": "assistant",
"content": "SELECT \"object_type\" FROM \"2101_2200\" WHERE \"ngc_number\"=2171;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lieutenant_governors_of_illinois\" (\n \"lt_governor\" text,\n \"commission_date\" text,\n \"end_date\" text,\n \"governor\" text,\n \"party\" text,\n \"term\" text\n);\n\nQuestion: What is the end date of the term for Governor of richard j. oglesby, and a Term of 1885\u20131889?"
},
{
"role": "assistant",
"content": "SELECT \"end_date\" FROM \"lieutenant_governors_of_illinois\" WHERE \"governor\"='richard j. oglesby' AND \"term\"='1885\u20131889';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deep_space_rendezvous\" (\n \"date_and_time_utc\" text,\n \"rocket\" text,\n \"site\" text,\n \"orbit\" text,\n \"function\" text,\n \"decay_utc\" text\n);\n\nQuestion: What site has an orbit of Leo, a decay (UTC) of still in orbit, and a magnetosphere research?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"deep_space_rendezvous\" WHERE \"orbit\"='leo' AND \"decay_utc\"='still in orbit' AND \"function\"='magnetosphere research';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deep_space_rendezvous\" (\n \"date_and_time_utc\" text,\n \"rocket\" text,\n \"site\" text,\n \"orbit\" text,\n \"function\" text,\n \"decay_utc\" text\n);\n\nQuestion: What date and time has a sub-orbital of orbit, a function of aeronomy research, and a Nike Orion rocket, as well as a Poker Flat site?"
},
{
"role": "assistant",
"content": "SELECT \"date_and_time_utc\" FROM \"deep_space_rendezvous\" WHERE \"orbit\"='sub-orbital' AND \"function\"='aeronomy research' AND \"rocket\"='nike orion' AND \"site\"='poker flat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: what is the tournament when the winning score is 2 and 1?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"pga_tour_wins_5\" WHERE \"winning_score\"='2 and 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: what is the margin of victory for the tournament travelers championship?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_5\" WHERE \"tournament\"='travelers championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: what is the margin of victory for the waste management phoenix open tournament?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_5\" WHERE \"tournament\"='waste management phoenix open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: who is the runner-up when the winning score is \u221216 (68-70-65-65=268)?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"pga_tour_wins_5\" WHERE \"winning_score\"='\u221216 (68-70-65-65=268)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_series\" (\n \"position\" text,\n \"game_1\" text,\n \"game_2\" text,\n \"game_3\" text,\n \"game_4\" text\n);\n\nQuestion: For which Game 4 did Michael O'Connor play wing position?"
},
{
"role": "assistant",
"content": "SELECT \"game_4\" FROM \"1987_series\" WHERE \"position\"='wing' AND \"game_1\"='michael o''connor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_series\" (\n \"position\" text,\n \"game_1\" text,\n \"game_2\" text,\n \"game_3\" text,\n \"game_4\" text\n);\n\nQuestion: For which Game 4, did David Boyle play in Game 3?"
},
{
"role": "assistant",
"content": "SELECT \"game_4\" FROM \"1987_series\" WHERE \"game_3\"='david boyle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_series\" (\n \"position\" text,\n \"game_1\" text,\n \"game_2\" text,\n \"game_3\" text,\n \"game_4\" text\n);\n\nQuestion: Which Game 1 has a fullback?"
},
{
"role": "assistant",
"content": "SELECT \"game_1\" FROM \"1987_series\" WHERE \"position\"='fullback';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_series\" (\n \"position\" text,\n \"game_1\" text,\n \"game_2\" text,\n \"game_3\" text,\n \"game_4\" text\n);\n\nQuestion: For which Game 4 did Michael O'Connor play during Game 1?"
},
{
"role": "assistant",
"content": "SELECT \"game_4\" FROM \"1987_series\" WHERE \"game_1\"='michael o''connor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_series\" (\n \"position\" text,\n \"game_1\" text,\n \"game_2\" text,\n \"game_3\" text,\n \"game_4\" text\n);\n\nQuestion: During Game 2, which position did Andrew Farrar play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"1987_series\" WHERE \"game_2\"='andrew farrar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_series\" (\n \"position\" text,\n \"game_1\" text,\n \"game_2\" text,\n \"game_3\" text,\n \"game_4\" text\n);\n\nQuestion: During which Game 4, did Brett Kenny play Game 2?"
},
{
"role": "assistant",
"content": "SELECT \"game_4\" FROM \"1987_series\" WHERE \"game_2\"='brett kenny';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"joined\" real,\n \"left\" real,\n \"current_conference\" text\n);\n\nQuestion: Where was the former private member that was founded in 1891 and left in 1975?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"former_members\" WHERE \"left\"=1975 AND \"type\"='private' AND \"founded\"=1891;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: what is the places when for the soviet union with a rank more than 11?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"places\") FROM \"men\" WHERE \"nation\"='soviet union' AND \"rank\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: what is the name when the nation is soviet union and the points is 185?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"men\" WHERE \"nation\"='soviet union' AND \"points\"=185;"
}
] |
[
{
"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 constructor has less than 3 laps and grid 15?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\"<3 AND \"grid\"=15;"
}
] |
[
{
"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 \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team has an Away team of collingwood?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"mid_gippsland_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Name the lowest against for when wins are greater than 14, draws is 0 and losses are 4"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2009_ladder\" WHERE \"losses\"=4 AND \"draws\"=0 AND \"wins\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"mid_gippsland_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Name the sum against for byes less than 0"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2009_ladder\" WHERE \"byes\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"mid_gippsland_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Name the sum of draws for losses less than 2 and wins of 16"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draws\") FROM \"2009_ladder\" WHERE \"wins\"=16 AND \"losses\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_career\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: How few laps were finished in 17?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"indy_500_career\" WHERE \"finish\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_career\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is 1966's Qual rating?"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_career\" WHERE \"year\"='1966';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_career\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What race has a finish time of 10?"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_career\" WHERE \"finish\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_career\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the lowest lap with a rank of 30?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"indy_500_career\" WHERE \"rank\"='30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_career\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What finish time started at 32?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_career\" WHERE \"start\"='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: Who is the lowest ranked player from the United States that has less than 3 Wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"leaders\" WHERE \"country\"='united states' AND \"wins\"<3;"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game that had a visiting team of Edmonton?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"visitor\"='edmonton';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game that had a home team of Colorado, and a visiting team of Winnipeg?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"home\"='colorado' AND \"visitor\"='winnipeg';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What team was visiting on February 15?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"date\"='february 15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_commerce\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What theme had an issue price of $489.95 after 2005?"
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"canadian_commerce\" WHERE \"issue_price\"='$489.95' AND \"year\">2005;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_commerce\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What year was the timber trade?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"canadian_commerce\" WHERE \"theme\"='timber trade';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_commerce\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What year has an issue price of $697.95?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"canadian_commerce\" WHERE \"issue_price\"='$697.95';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What was the engine driven by Jean-Pierre Jarier and has a chassis of PC4?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"driver\"='jean-pierre jarier' AND \"chassis\"='pc4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text,\n \"venue\" text\n);\n\nQuestion: What Season had Dundee United as a Winner?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"results\" WHERE \"winners\"='dundee united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text,\n \"venue\" text\n);\n\nQuestion: What is the Score of the Rangers' Runner-ups and Hibernian Winners in Hampden Park?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"results\" WHERE \"venue\"='hampden park' AND \"runners_up\"='rangers' AND \"winners\"='hibernian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text,\n \"venue\" text\n);\n\nQuestion: What Runners-up have a Venue in Broadwood Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"runners_up\" FROM \"results\" WHERE \"venue\"='broadwood stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"g_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: When is the completed date of the destroyer with a pennant number h63?"
},
{
"role": "assistant",
"content": "SELECT \"completed\" FROM \"g_class\" WHERE \"pennant_number\"='h63';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"g_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: When is the completed date of the destroyer with a pennant number h59?"
},
{
"role": "assistant",
"content": "SELECT \"completed\" FROM \"g_class\" WHERE \"pennant_number\"='h59';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"g_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What ship has a pennant number h05?"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"g_class\" WHERE \"pennant_number\"='h05';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.