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 \"man_of_the_match_award\" (\n \"s_no\" real,\n \"opponent\" text,\n \"venue\" text,\n \"date\" text,\n \"match_performance\" text\n);\n\nQuestion: what is the number of people in sri lanka"
},
{
"role": "assistant",
"content": "SELECT AVG(\"s_no\") FROM \"man_of_the_match_award\" WHERE \"opponent\"='sri lanka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1998\" text\n);\n\nQuestion: What was the position of the Slavia team in 1998?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_1998\" FROM \"teams_and_venues\" WHERE \"team\"='slavia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1998\" text\n);\n\nQuestion: What was the position of the team that played in a venue in Dinamo, Minsk with a capacity larger than 3,550?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_1998\" FROM \"teams_and_venues\" WHERE \"capacity\">'3,550' AND \"venue\"='dinamo, minsk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1998\" text\n);\n\nQuestion: Which team is located in Lida?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams_and_venues\" WHERE \"location\"='lida';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_4_1999\" (\n \"episode_no\" text,\n \"episode_title\" text,\n \"uk_broadcast_date\" text,\n \"presenter\" text,\n \"details_of_journey\" text,\n \"countries_visited\" text\n);\n\nQuestion: Which episode number visited India?"
},
{
"role": "assistant",
"content": "SELECT \"episode_no\" FROM \"series_4_1999\" WHERE \"countries_visited\"='india';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_4_1999\" (\n \"episode_no\" text,\n \"episode_title\" text,\n \"uk_broadcast_date\" text,\n \"presenter\" text,\n \"details_of_journey\" text,\n \"countries_visited\" text\n);\n\nQuestion: Which episode title featured a visit to the country of Cuba?"
},
{
"role": "assistant",
"content": "SELECT \"episode_title\" FROM \"series_4_1999\" WHERE \"countries_visited\"='cuba';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which position does Jesse Boulerice play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='jesse boulerice';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wins_in_a_season\" (\n \"driver\" text,\n \"season\" text,\n \"wins\" real,\n \"entries\" text,\n \"percentage\" text\n);\n\nQuestion: What is the fewest number of wins in the chart for Ayrton Senna?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"most_wins_in_a_season\" WHERE \"driver\"='ayrton senna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wins_in_a_season\" (\n \"driver\" text,\n \"season\" text,\n \"wins\" real,\n \"entries\" text,\n \"percentage\" text\n);\n\nQuestion: What is the number of entries associated with more than 11 wins?"
},
{
"role": "assistant",
"content": "SELECT \"entries\" FROM \"most_wins_in_a_season\" WHERE \"wins\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: Name the most points with lost more than 1 and games less than 5"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"group_2\" WHERE \"lost\">1 AND \"games\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of drawn with lost more than 1 and games less than 5"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"group_2\" WHERE \"lost\">1 AND \"games\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: Name the least lost with points more than 6 and games less than 5"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"group_2\" WHERE \"points\">6 AND \"games\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of points with games less than 5"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"group_2\" WHERE \"games\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the location of the bout that lasted 5:00 and led to a 6-2-1 record?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"record\"='6-2-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the record after the bout with Alexis Vila?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='alexis vila';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year_a\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who was a defensive end at California?"
},
{
"role": "assistant",
"content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"position\"='defensive end' AND \"college\"='california';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year_a\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which players were selected after 2011?"
},
{
"role": "assistant",
"content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"year_a\">2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year_a\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who was a linebacker at Tennessee?"
},
{
"role": "assistant",
"content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"position\"='linebacker' AND \"college\"='tennessee';"
}
] |
[
{
"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: Which Wins is the lowest one that has Events larger than 30?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"leaders\" WHERE \"events\">30;"
}
] |
[
{
"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: Which Events have Earnings ($) of 1,841,117, and a Rank smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"events\") FROM \"leaders\" WHERE \"earnings\"='1,841,117' AND \"rank\"<4;"
}
] |
[
{
"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: How many Events have Earnings ($) of 2,054,334?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"events\") FROM \"leaders\" WHERE \"earnings\"='2,054,334';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What day were the results 3:0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1987\" WHERE \"results\"='3:0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What city played on april 29?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1987\" WHERE \"date\"='april 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: Which city has an opponent of England?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1987\" WHERE \"opponent\"='england';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What day was the opponent Austria?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1987\" WHERE \"opponent\"='austria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sovereign_nations_with_fewer_tha\" (\n \"rank\" real,\n \"country_territory_entity\" text,\n \"population\" real,\n \"pct_of_world_population\" text,\n \"region\" text\n);\n\nQuestion: Name the most population for seychelles and rank less than 13"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population\") FROM \"list_of_sovereign_nations_with_fewer_tha\" WHERE \"country_territory_entity\"='seychelles' AND \"rank\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency of the station owned by the Canadian Broadcasting Corporation and branded as CBC Radio One?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"radio\" WHERE \"owner\"='canadian broadcasting corporation' AND \"branding\"='cbc radio one';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency of the soft adult contemporary stations?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"radio\" WHERE \"format\"='soft adult contemporary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Who owns the station with the frequency FM 92.1?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"radio\" WHERE \"frequency\"='fm 92.1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the branding of the FM 97.7 station owned by the Canadian Broadcasting Corporation?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"radio\" WHERE \"owner\"='canadian broadcasting corporation' AND \"frequency\"='fm 97.7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which F/Laps has Podiums of 1, and a Season of 2000, and a Final Placing of nc?"
},
{
"role": "assistant",
"content": "SELECT \"f_laps\" FROM \"career_summary\" WHERE \"podiums\"='1' AND \"season\"=2000 AND \"final_placing\"='nc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which Series has Poles of 0, and Races of 17?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_summary\" WHERE \"poles\"='0' AND \"races\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which Team Name has Poles of 0, and a Final Placing of 29th?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"career_summary\" WHERE \"poles\"='0' AND \"final_placing\"='29th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which Series has a Final Placing of 9th, and Podiums of 2?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_summary\" WHERE \"final_placing\"='9th' AND \"podiums\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which Series has a Team Name of sunred engineering?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_summary\" WHERE \"team_name\"='sunred engineering';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which Points have Wins of 0, and a Final Placing of 21st?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"career_summary\" WHERE \"wins\"='0' AND \"final_placing\"='21st';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championships_women\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Name the bronze for lahti"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"world_championships_women\" WHERE \"place\"='lahti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"rank\" text,\n \"scorer\" text,\n \"club\" text,\n \"goals\" real,\n \"matches\" text\n);\n\nQuestion: Which Rank has Goals larger than 10, and a Scorer of choi sang-kuk?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"top_scorers\" WHERE \"goals\">10 AND \"scorer\"='choi sang-kuk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"rank\" text,\n \"scorer\" text,\n \"club\" text,\n \"goals\" real,\n \"matches\" text\n);\n\nQuestion: Which Rank has a Scorer of lee sang-cheol?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"top_scorers\" WHERE \"scorer\"='lee sang-cheol';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"rank\" text,\n \"scorer\" text,\n \"club\" text,\n \"goals\" real,\n \"matches\" text\n);\n\nQuestion: Which Club has a Rank of 5?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"top_scorers\" WHERE \"rank\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rep_ron_paul_u_s_house_of_representative\" (\n \"years_covered\" text,\n \"all_bills_sponsored\" real,\n \"all_amendments_sponsored\" real,\n \"all_bills_cosponsored\" real,\n \"all_amendments_cosponsored\" real,\n \"original_bills_cosponsored\" real,\n \"original_amendments_cosponsored\" real,\n \"bill_support_withdrawn\" real,\n \"amendment_support_withdrawn\" real\n);\n\nQuestion: How many original bills amendments cosponsored lower than 64,with the bill support withdrawn lower than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"original_amendments_cosponsored\") FROM \"rep_ron_paul_u_s_house_of_representative\" WHERE \"all_bills_sponsored\"<64 AND \"bill_support_withdrawn\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: Who is the democratic incumbent that was re-elected?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"california\" WHERE \"status\"='re-elected' AND \"party\"='democratic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: What year was republican, re-elected incumbent John all barham elected?"
},
{
"role": "assistant",
"content": "SELECT \"elected\" FROM \"california\" WHERE \"party\"='republican' AND \"status\"='re-elected' AND \"incumbent\"='john all barham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What day in october was game number 4 with under 3 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"october\") FROM \"regular_season\" WHERE \"game\"=4 AND \"points\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: Which school was the drafted player from in a pick larger than 181?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"nfl_draft\" WHERE \"pick\">181;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Which points against has 17 as the lost?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2008_2009_table\" WHERE \"lost\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What lost has 528 as the points?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"2008_2009_table\" WHERE \"points_for\"='528';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the drawn that has 16 as the trys bonus?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"try_bonus\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What club has tries for in the category tries for?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2008_2009_table\" WHERE \"tries_for\"='tries for';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the drawn that has 22 for played, and 96 for points?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"played\"='22' AND \"points\"='96';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What points have 1 for drawn, and 16 as a try bonus?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2008_2009_table\" WHERE \"drawn\"='1' AND \"try_bonus\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_fifa_world_cup\" (\n \"date\" text,\n \"time_cest\" real,\n \"team_num1\" text,\n \"res\" text,\n \"team_num2\" text,\n \"round\" text,\n \"spectators\" real\n);\n\nQuestion: What is team 1 in group h?"
},
{
"role": "assistant",
"content": "SELECT \"team_num1\" FROM \"2006_fifa_world_cup\" WHERE \"round\"='group h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score on 15 march 2006?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='15 march 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lone_star_series\" (\n \"date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"winning_pitcher\" text,\n \"losing_pitcher\" text,\n \"attendance\" real,\n \"location\" text\n);\n\nQuestion: Which winning team has a winning pitcher of Chris Young and was played in Arlington?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"lone_star_series\" WHERE \"winning_pitcher\"='chris young' AND \"location\"='arlington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lone_star_series\" (\n \"date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"winning_pitcher\" text,\n \"losing_pitcher\" text,\n \"attendance\" real,\n \"location\" text\n);\n\nQuestion: What winning team has a losing pitcher of Juan Dominguez?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"lone_star_series\" WHERE \"losing_pitcher\"='juan dominguez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent on August 14?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='august 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which loss had a record of 79-49?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='79-49';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"grand_final_television_commentator\" text,\n \"grand_final_dual_television_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_dual_television_commentator\" text\n);\n\nQuestion: What is the semi-final dual television commentator status of the year with Pierre Tchernia as the grand final television commentator and an unknown spokesperson?"
},
{
"role": "assistant",
"content": "SELECT \"semi_final_dual_television_commentator\" FROM \"commentators_and_spokespersons\" WHERE \"grand_final_television_commentator\"='pierre tchernia' AND \"spokesperson\"='unknown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"grand_final_television_commentator\" text,\n \"grand_final_dual_television_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_dual_television_commentator\" text\n);\n\nQuestion: What is the semi-final television commentator status in 1962 with an unknown spokesperson?"
},
{
"role": "assistant",
"content": "SELECT \"semi_final_television_commentator\" FROM \"commentators_and_spokespersons\" WHERE \"spokesperson\"='unknown' AND \"year_s\"=1962;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"grand_final_television_commentator\" text,\n \"grand_final_dual_television_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_dual_television_commentator\" text\n);\n\nQuestion: What is the grand final television commentator status after 1959 when Dave was the grand final dual television commentator and Marie Myriam was the spokesperson?"
},
{
"role": "assistant",
"content": "SELECT \"grand_final_television_commentator\" FROM \"commentators_and_spokespersons\" WHERE \"year_s\">1959 AND \"grand_final_dual_television_commentator\"='dave' AND \"spokesperson\"='marie myriam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"grand_final_television_commentator\" text,\n \"grand_final_dual_television_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_dual_television_commentator\" text\n);\n\nQuestion: What is the grand final dual television commentator status of the year when Amaury Vassili was the spokesperson?"
},
{
"role": "assistant",
"content": "SELECT \"grand_final_dual_television_commentator\" FROM \"commentators_and_spokespersons\" WHERE \"spokesperson\"='amaury vassili';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"state\" text,\n \"name\" text,\n \"hometown\" text,\n \"age_1\" real,\n \"talent\" text\n);\n\nQuestion: What state has lincoln, de as the hometown?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"delegates\" WHERE \"hometown\"='lincoln, de';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"builder\" text,\n \"home_port\" text,\n \"commissioned_decommissioned\" text,\n \"nvr_page\" text\n);\n\nQuestion: Name the ship with hull number of aor-6"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"ships\" WHERE \"hull_no\"='aor-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"builder\" text,\n \"home_port\" text,\n \"commissioned_decommissioned\" text,\n \"nvr_page\" text\n);\n\nQuestion: Name the hull number of Commissioned\u2013 Decommissioned of 1973\u20131996"
},
{
"role": "assistant",
"content": "SELECT \"hull_no\" FROM \"ships\" WHERE \"commissioned_decommissioned\"='1973\u20131996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"builder\" text,\n \"home_port\" text,\n \"commissioned_decommissioned\" text,\n \"nvr_page\" text\n);\n\nQuestion: Name the commissioned-decommissioned for oakland and NVR page of aor-1"
},
{
"role": "assistant",
"content": "SELECT \"commissioned_decommissioned\" FROM \"ships\" WHERE \"home_port\"='oakland' AND \"nvr_page\"='aor-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"builder\" text,\n \"home_port\" text,\n \"commissioned_decommissioned\" text,\n \"nvr_page\" text\n);\n\nQuestion: Name the home port for kansas city"
},
{
"role": "assistant",
"content": "SELECT \"home_port\" FROM \"ships\" WHERE \"ship\"='kansas city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"builder\" text,\n \"home_port\" text,\n \"commissioned_decommissioned\" text,\n \"nvr_page\" text\n);\n\nQuestion: Name the commissioned-decommissioned for NVR page of aor-7"
},
{
"role": "assistant",
"content": "SELECT \"commissioned_decommissioned\" FROM \"ships\" WHERE \"nvr_page\"='aor-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"builder\" text,\n \"home_port\" text,\n \"commissioned_decommissioned\" text,\n \"nvr_page\" text\n);\n\nQuestion: Name the ship for oakland home port and NVR page of aor-3"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"ships\" WHERE \"home_port\"='oakland' AND \"nvr_page\"='aor-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_deep_water\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text,\n \"customer\" text\n);\n\nQuestion: What is the name of the location and ship type in the Gulf of Mexico that entered service in 1999?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"ultra_deep_water\" WHERE \"location\"='gulf of mexico' AND \"type\"='ship' AND \"entered_service\"='1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_deep_water\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text,\n \"customer\" text\n);\n\nQuestion: What was the water depth that entered service in 2001 named Cajun Express?"
},
{
"role": "assistant",
"content": "SELECT \"water_depth\" FROM \"ultra_deep_water\" WHERE \"entered_service\"='2001' AND \"name\"='cajun express';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_deep_water\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text,\n \"customer\" text\n);\n\nQuestion: What was the water depth in the Gulf of Mexico named Discoverer Clear Leader?"
},
{
"role": "assistant",
"content": "SELECT \"water_depth\" FROM \"ultra_deep_water\" WHERE \"location\"='gulf of mexico' AND \"name\"='discoverer clear leader';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_deep_water\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text,\n \"customer\" text\n);\n\nQuestion: What is the name of a location in Nigeria?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"ultra_deep_water\" WHERE \"location\"='nigeria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_deep_water\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text,\n \"customer\" text\n);\n\nQuestion: What location entered service in 1999 and had a customer of Anadarko?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"ultra_deep_water\" WHERE \"entered_service\"='1999' AND \"customer\"='anadarko';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the Score on January 30?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='january 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who were the Visitor of the Toronto Maple Leafs Home game on December 22?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"home\"='toronto maple leafs' AND \"date\"='december 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: On what Date was the Record 9\u20136\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"record\"='9\u20136\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the Score on March 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='march 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the primary conference that was founded before 1866 and has an affiliation of private/catholic?"
},
{
"role": "assistant",
"content": "SELECT \"primary_conference\" FROM \"membership\" WHERE \"founded\"<1866 AND \"affiliation\"='private/catholic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the total enrollment for an affiliation of public, and was founded before 1866?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"membership\" WHERE \"affiliation\"='public' AND \"founded\"<1866;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the affiliation for towson, md?"
},
{
"role": "assistant",
"content": "SELECT \"affiliation\" FROM \"membership\" WHERE \"location\"='towson, md';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the total enrollment for a private/catholic affiliation and founded after 1842?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"membership\" WHERE \"affiliation\"='private/catholic' AND \"founded\">1842;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the number founded for the nickname mountain hawks?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"founded\") FROM \"membership\" WHERE \"nickname\"='mountain hawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bbl_cup_winners\" (\n \"season\" real,\n \"winner\" text,\n \"finalist\" text,\n \"score\" text,\n \"host_city\" text\n);\n\nQuestion: What is the score of the season in the host city k\u0117dainiai?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"bbl_cup_winners\" WHERE \"host_city\"='k\u0117dainiai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bbl_cup_winners\" (\n \"season\" real,\n \"winner\" text,\n \"finalist\" text,\n \"score\" text,\n \"host_city\" text\n);\n\nQuestion: Who was the winner of the season before 2010 with Lietuvos Rytas as a finalist?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"bbl_cup_winners\" WHERE \"finalist\"='lietuvos rytas' AND \"season\"<2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bbl_cup_winners\" (\n \"season\" real,\n \"winner\" text,\n \"finalist\" text,\n \"score\" text,\n \"host_city\" text\n);\n\nQuestion: Who was the finalist in the 2010 season in the host city tartu?"
},
{
"role": "assistant",
"content": "SELECT \"finalist\" FROM \"bbl_cup_winners\" WHERE \"host_city\"='tartu' AND \"season\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bbl_cup_winners\" (\n \"season\" real,\n \"winner\" text,\n \"finalist\" text,\n \"score\" text,\n \"host_city\" text\n);\n\nQuestion: Who was the winner during the 2009 season?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"bbl_cup_winners\" WHERE \"season\"=2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bbl_cup_winners\" (\n \"season\" real,\n \"winner\" text,\n \"finalist\" text,\n \"score\" text,\n \"host_city\" text\n);\n\nQuestion: What is the host city during the 2012 season?"
},
{
"role": "assistant",
"content": "SELECT \"host_city\" FROM \"bbl_cup_winners\" WHERE \"season\"=2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: what game had a score of 4\u20136, 6\u20133, 7\u20136(10)?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles\" WHERE \"score\"='4\u20136, 6\u20133, 7\u20136(10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1653_1722\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did eleonor magdalene of the palatinate-neuburg become duchess?"
},
{
"role": "assistant",
"content": "SELECT \"became_duchess\" FROM \"house_of_habsburg_1653_1722\" WHERE \"name\"='eleonor magdalene of the palatinate-neuburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1653_1722\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Which Marriage has a Became Duchess of 12 december 1666?"
},
{
"role": "assistant",
"content": "SELECT \"marriage\" FROM \"house_of_habsburg_1653_1722\" WHERE \"became_duchess\"='12 december 1666';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1653_1722\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the person die who was born on 18 november 1630?"
},
{
"role": "assistant",
"content": "SELECT \"death\" FROM \"house_of_habsburg_1653_1722\" WHERE \"birth\"='18 november 1630';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1653_1722\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Which Birth has a Became Duchess of 17 april 1711 husband's ascension?"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"house_of_habsburg_1653_1722\" WHERE \"became_duchess\"='17 april 1711 husband''s ascension';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1653_1722\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Which Spouse has a Birth of 30 may 1653?"
},
{
"role": "assistant",
"content": "SELECT \"spouse\" FROM \"house_of_habsburg_1653_1722\" WHERE \"birth\"='30 may 1653';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1653_1722\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the person born on 6 january 1655 die?"
},
{
"role": "assistant",
"content": "SELECT \"death\" FROM \"house_of_habsburg_1653_1722\" WHERE \"birth\"='6 january 1655';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_six_nations_championship_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: Which Club or province has a caps larger than 15 and has Chris Cusiter playing for them?"
},
{
"role": "assistant",
"content": "SELECT \"club_province\" FROM \"2008_six_nations_championship_squads\" WHERE \"caps\">15 AND \"player\"='chris cusiter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_six_nations_championship_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is the date of birth for the player from Ulster and plays at Centre position?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_birth_age\" FROM \"2008_six_nations_championship_squads\" WHERE \"club_province\"='ulster' AND \"position\"='centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_or_more_deaths\" (\n \"disaster\" text,\n \"type\" text,\n \"location\" text,\n \"deaths\" text,\n \"date\" text\n);\n\nQuestion: What type of disaster is rms atlantic categorized in that was located in Nova Scotia?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"200_or_more_deaths\" WHERE \"location\"='nova scotia' AND \"disaster\"='rms atlantic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_or_more_deaths\" (\n \"disaster\" text,\n \"type\" text,\n \"location\" text,\n \"deaths\" text,\n \"date\" text\n);\n\nQuestion: What is the type of disaster that the Arrow Air Flight 1285 categorized in?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"200_or_more_deaths\" WHERE \"disaster\"='arrow air flight 1285';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_or_more_deaths\" (\n \"disaster\" text,\n \"type\" text,\n \"location\" text,\n \"deaths\" text,\n \"date\" text\n);\n\nQuestion: What is the disaster that was located in Ontario with 223 deaths?"
},
{
"role": "assistant",
"content": "SELECT \"disaster\" FROM \"200_or_more_deaths\" WHERE \"location\"='ontario' AND \"deaths\"='223';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"200_or_more_deaths\" (\n \"disaster\" text,\n \"type\" text,\n \"location\" text,\n \"deaths\" text,\n \"date\" text\n);\n\nQuestion: How many deaths were there during the shipwreck in 1873?"
},
{
"role": "assistant",
"content": "SELECT \"deaths\" FROM \"200_or_more_deaths\" WHERE \"type\"='shipwreck' AND \"date\"='1873';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.