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 \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the second when Mikkel Krause is the third?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"third\"='mikkel krause';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the Skip when Alasdair Guthrie is the third?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"third\"='alasdair guthrie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the Second when Michel Gribi is the lead?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"lead\"='michel gribi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest position of the team with an against of 12, less than 11 points, more than 2 drawn, and more than 9 played?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"torneio_rio_s_o_paulo\" WHERE \"against\"=12 AND \"points\"<11 AND \"drawn\">2 AND \"played\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the difference of the team with 12 points?"
},
{
"role": "assistant",
"content": "SELECT \"difference\" FROM \"torneio_rio_s_o_paulo\" WHERE \"points\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average number of played of the team with 3 losses, more than 9 points, a position of 5, and less than 12 against?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"torneio_rio_s_o_paulo\" WHERE \"lost\"=3 AND \"points\">9 AND \"position\"=5 AND \"against\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"owner\" text,\n \"share_pct\" real,\n \"rating_pct\" real\n);\n\nQuestion: Name the rating % for channel of anhui satellite tv"
},
{
"role": "assistant",
"content": "SELECT \"rating_pct\" FROM \"most_viewed_channels\" WHERE \"channel\"='anhui satellite tv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"owner\" text,\n \"share_pct\" real,\n \"rating_pct\" real\n);\n\nQuestion: Name the most share for anhui satellite tv"
},
{
"role": "assistant",
"content": "SELECT MAX(\"share_pct\") FROM \"most_viewed_channels\" WHERE \"channel\"='anhui satellite tv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"owner\" text,\n \"share_pct\" real,\n \"rating_pct\" real\n);\n\nQuestion: Name the sum of rating % for cctv and position more than 7"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rating_pct\") FROM \"most_viewed_channels\" WHERE \"owner\"='cctv' AND \"position\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"owner\" text,\n \"share_pct\" real,\n \"rating_pct\" real\n);\n\nQuestion: Name the average rating % for shandong satellite tv and share % less than 1.74"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rating_pct\") FROM \"most_viewed_channels\" WHERE \"channel\"='shandong satellite tv' AND \"share_pct\"<1.74;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_ranking_timeline\" (\n \"2004_05\" text,\n \"2005_06\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text\n);\n\nQuestion: what year had a dnq of 11"
},
{
"role": "assistant",
"content": "SELECT \"2005_06\" FROM \"performance_and_ranking_timeline\" WHERE \"2010_11\"='dnq';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What date was Montreal the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"visitor\"='montreal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record for the NY Rangers?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"home\"='ny rangers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Name the sum of round for pick of 169"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"nhl_draft\" WHERE \"pick\"=169;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Name the nationality for pick of 16"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"nhl_draft\" WHERE \"pick\"=16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Lead has a Skip of pavol pitonak?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"group_b2\" WHERE \"skip\"='pavol pitonak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the skip in Wales?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"group_b2\" WHERE \"nation\"='wales';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Nation has a Second of tomas pitonak?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"group_b2\" WHERE \"second\"='tomas pitonak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Second has a Third of athanassios pantios?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"group_b2\" WHERE \"third\"='athanassios pantios';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Where did Croatia lead?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"group_b2\" WHERE \"nation\"='croatia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Skip has a Third of carlo alessandro zisa?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"group_b2\" WHERE \"third\"='carlo alessandro zisa';"
}
] |
[
{
"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: What is the nationality of Shaun Sabol?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='shaun sabol';"
}
] |
[
{
"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: What is the position of United States' player Brett Lawrence?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"nationality\"='united states' AND \"player\"='brett lawrence';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s3_tc_format_comparison\" (\n \"fourcc\" text,\n \"dx_10_name\" text,\n \"description\" text,\n \"alpha_premultiplied\" text,\n \"compression_ratio\" text,\n \"texture_type\" text\n);\n\nQuestion: Which DX 10 Name that has a No Alpha premultiplied and a Description of explicit alpha?"
},
{
"role": "assistant",
"content": "SELECT \"dx_10_name\" FROM \"s3_tc_format_comparison\" WHERE \"alpha_premultiplied\"='no' AND \"description\"='explicit alpha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s3_tc_format_comparison\" (\n \"fourcc\" text,\n \"dx_10_name\" text,\n \"description\" text,\n \"alpha_premultiplied\" text,\n \"compression_ratio\" text,\n \"texture_type\" text\n);\n\nQuestion: Which Compression ratio has a (none) DX 10 Name and a FOURCC of dxt4?"
},
{
"role": "assistant",
"content": "SELECT \"compression_ratio\" FROM \"s3_tc_format_comparison\" WHERE \"dx_10_name\"='(none)' AND \"fourcc\"='dxt4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s3_tc_format_comparison\" (\n \"fourcc\" text,\n \"dx_10_name\" text,\n \"description\" text,\n \"alpha_premultiplied\" text,\n \"compression_ratio\" text,\n \"texture_type\" text\n);\n\nQuestion: Which Alpha premultiplied has a 4:1 Compression ratio and a dxt3 FOURCC?"
},
{
"role": "assistant",
"content": "SELECT \"alpha_premultiplied\" FROM \"s3_tc_format_comparison\" WHERE \"compression_ratio\"='4:1' AND \"fourcc\"='dxt3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"race\" text,\n \"distance\" text,\n \"venue\" text,\n \"radio\" text\n);\n\nQuestion: What is the venue of the napa auto parts 200 race with a mrn radio?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"schedule\" WHERE \"radio\"='mrn' AND \"race\"='napa auto parts 200';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"race\" text,\n \"distance\" text,\n \"venue\" text,\n \"radio\" text\n);\n\nQuestion: What is the race on 10/10/2008?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"schedule\" WHERE \"date\"='10/10/2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"race\" text,\n \"distance\" text,\n \"venue\" text,\n \"radio\" text\n);\n\nQuestion: Which race has a distance of 201.44 miles?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"schedule\" WHERE \"distance\"='201.44 miles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"race\" text,\n \"distance\" text,\n \"venue\" text,\n \"radio\" text\n);\n\nQuestion: What is the distance of the race at the Atlanta Motor Speedway?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"schedule\" WHERE \"venue\"='atlanta motor speedway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"race\" text,\n \"distance\" text,\n \"venue\" text,\n \"radio\" text\n);\n\nQuestion: What is the distance of the Sam's town 250 race?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"schedule\" WHERE \"race\"='sam''s town 250';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"race\" text,\n \"distance\" text,\n \"venue\" text,\n \"radio\" text\n);\n\nQuestion: What is the venue of teh carfax 250 race?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"schedule\" WHERE \"race\"='carfax 250';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_rivalries\" (\n \"teams\" text,\n \"name\" text,\n \"trophy\" text,\n \"first_met\" real,\n \"games_played\" text,\n \"series_record\" text\n);\n\nQuestion: What is the name of the event where Cornell-Penn played?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"football_rivalries\" WHERE \"teams\"='cornell-penn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_rivalries\" (\n \"teams\" text,\n \"name\" text,\n \"trophy\" text,\n \"first_met\" real,\n \"games_played\" text,\n \"series_record\" text\n);\n\nQuestion: Who many games were played for the series with the Sawhorse Dollar trophy?"
},
{
"role": "assistant",
"content": "SELECT \"games_played\" FROM \"football_rivalries\" WHERE \"trophy\"='sawhorse dollar';"
}
] |
[
{
"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: How many games have Points smaller than 4, and an October smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"points\"<4 AND \"october\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game has a Record of 8\u20132\u20130, and Points larger than 16?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"regular_season\" WHERE \"record\"='8\u20132\u20130' AND \"points\">16;"
}
] |
[
{
"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: Which Score has an October smaller than 15, and a Record of 2\u20130\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"october\"<15 AND \"record\"='2\u20130\u20130';"
}
] |
[
{
"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 \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many games have November 7 as the date, and points greater than 17?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"november\"=7 AND \"points\">17;"
}
] |
[
{
"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 \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many points have November of 15?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"regular_season\" WHERE \"november\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What is the men's doubles for 2003?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"past_winners\" WHERE \"year\"=2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What is the mixed doubles in the year 2007 when the men's singles is eduards loze?"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"past_winners\" WHERE \"year\">2007 AND \"men_s_singles\"='eduards loze';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_11\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_up\" text\n);\n\nQuestion: Name the winning score for 54 holes of 5 shot deficit"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_11\" WHERE \"54_holes\"='5 shot deficit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_11\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_up\" text\n);\n\nQuestion: Name the winning score for jim barnes and year of 1924"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_11\" WHERE \"runner_up\"='jim barnes' AND \"year\"=1924;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_race_a_tt_final_standings\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What was the Rider of the LCR Honda 600CC Team with a Time of 59\u2019 22.80?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"2008_race_a_tt_final_standings\" WHERE \"team\"='lcr honda 600cc' AND \"time\"='59\u2019 22.80';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_race_a_tt_final_standings\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What Rider had a Speed of 108.347mph and Time of 1:02.40.93?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"2008_race_a_tt_final_standings\" WHERE \"speed\"='108.347mph' AND \"time\"='1:02.40.93';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_race_a_tt_final_standings\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What Rider had a Time of 1:01.50.57?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"2008_race_a_tt_final_standings\" WHERE \"time\"='1:01.50.57';"
}
] |
[
{
"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 \"time\" text,\n \"record\" text\n);\n\nQuestion: What is the average attendance that has june 24 as the date?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"date\"='june 24';"
}
] |
[
{
"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 \"time\" text,\n \"record\" text\n);\n\nQuestion: What date has 2:59 as the time?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"time\"='2:59';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the surface when the tournament is manta, ecuador?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_7\" WHERE \"tournament\"='manta, ecuador';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the surface for the tournament of manta, ecuador?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_7\" WHERE \"tournament\"='manta, ecuador';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament is lesley joseph the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_7\" WHERE \"opponent\"='lesley joseph';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What date was marcos daniel the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_7\" WHERE \"opponent\"='marcos daniel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1999\" text,\n \"copa_mercosur_1999\" text,\n \"copa_conmebol_1999\" text,\n \"intercontinental_cup_1999\" text\n);\n\nQuestion: What is the Copa Libertadores 1999 result for team gr\u00eamio, who did not qualify for Copa Conmebol 1999?"
},
{
"role": "assistant",
"content": "SELECT \"copa_libertadores_1999\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_conmebol_1999\"='did not qualify' AND \"team\"='gr\u00eamio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1999\" text,\n \"copa_mercosur_1999\" text,\n \"copa_conmebol_1999\" text,\n \"intercontinental_cup_1999\" text\n);\n\nQuestion: What is the copa mercosur 1999 result for team gr\u00eamio, who did not qualify for the Copa Libertadores 1999 and Copa Conmebol 1999?"
},
{
"role": "assistant",
"content": "SELECT \"copa_mercosur_1999\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_libertadores_1999\"='did not qualify' AND \"copa_conmebol_1999\"='did not qualify' AND \"team\"='gr\u00eamio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1999\" text,\n \"copa_mercosur_1999\" text,\n \"copa_conmebol_1999\" text,\n \"intercontinental_cup_1999\" text\n);\n\nQuestion: What is the intercontinental cup 1999 result of the team who did not qualify for the Copa Libertadores 1999 and made quarterfinals in the Copa Mercosur 1999?"
},
{
"role": "assistant",
"content": "SELECT \"intercontinental_cup_1999\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_libertadores_1999\"='did not qualify' AND \"copa_mercosur_1999\"='quarterfinals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1999\" text,\n \"copa_mercosur_1999\" text,\n \"copa_conmebol_1999\" text,\n \"intercontinental_cup_1999\" text\n);\n\nQuestion: What is the Copa Libertadores 1999 result for team vasco, which made the group stage in the Copa Mercosur 1999?"
},
{
"role": "assistant",
"content": "SELECT \"copa_libertadores_1999\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_mercosur_1999\"='group stage' AND \"team\"='vasco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1999\" text,\n \"copa_mercosur_1999\" text,\n \"copa_conmebol_1999\" text,\n \"intercontinental_cup_1999\" text\n);\n\nQuestion: What is the Intercontinental Cup 1999 result for the team with a Copa Conmebol 1999 result of runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"intercontinental_cup_1999\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_conmebol_1999\"='runner-up';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1999\" text,\n \"copa_mercosur_1999\" text,\n \"copa_conmebol_1999\" text,\n \"intercontinental_cup_1999\" text\n);\n\nQuestion: What is the Copa Conmebol 1999 result of team cruzeiro, which did not qualify for the Copa Libertadores 1999?"
},
{
"role": "assistant",
"content": "SELECT \"copa_conmebol_1999\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_libertadores_1999\"='did not qualify' AND \"team\"='cruzeiro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" real,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text\n);\n\nQuestion: How many people attended the game that lost 2-4 and the date was higher than 15?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"september\" WHERE \"result\"='lost 2-4' AND \"date\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" real,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text\n);\n\nQuestion: What kind of competition had an attendance of more than 914 people and the Wightlink Raiders as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"september\" WHERE \"attendance\">914 AND \"opponent\"='wightlink raiders';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" real,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text\n);\n\nQuestion: How many people attended the away league competition with a date of 22?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"september\" WHERE \"competition\"='league' AND \"venue\"='away' AND \"date\"=22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Series has a Date of may 2?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"date\"='may 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Game has a Series of bruins lead 3\u20131?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"playoffs\" WHERE \"series\"='bruins lead 3\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Opponent has a Series of bruins lead 2\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"series\"='bruins lead 2\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Date has a Game of 4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"game\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which Game has a Score of 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"playoffs\" WHERE \"score\"='3\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"rank\" real,\n \"first_quarter\" text,\n \"second_quarter\" text,\n \"third_quarter\" text,\n \"fourth_quarter\" text\n);\n\nQuestion: What is the Rank of industrial and commercial bank of china 277,236?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"2008\" WHERE \"first_quarter\"='industrial and commercial bank of china 277,236';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was result of goal 4?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\"=4;"
}
] |
[
{
"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: Who is the player that is part of the team Shawinigan Dynamos (Qmjhl)?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='shawinigan dynamos (qmjhl)';"
}
] |
[
{
"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: What is the highest round for the Minnesota Junior Stars (Mjhl)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='minnesota junior stars (mjhl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"setanta_shield\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: When did woking compete?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"setanta_shield\" WHERE \"opponent\"='woking';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"setanta_shield\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Opponent has an Attendance of 375?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"setanta_shield\" WHERE \"attendance\"=375;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"setanta_shield\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How much Attendance has an Opponent of oxford united?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"setanta_shield\" WHERE \"opponent\"='oxford united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"setanta_shield\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Attendance has an Opponent of crawley town?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"setanta_shield\" WHERE \"opponent\"='crawley town';"
}
] |
[
{
"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\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real\n);\n\nQuestion: How many Podiums where their total for the Series of Macau grand prix, as well as being a season before 2008?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"podiums\") FROM \"career_summary\" WHERE \"series\"='macau grand prix' AND \"season\"<2008;"
}
] |
[
{
"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\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real\n);\n\nQuestion: How many wins where there total for Series named formula 3 euro series as well as having more than 2 Podiums?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"career_summary\" WHERE \"series\"='formula 3 euro series' 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\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real\n);\n\nQuestion: What is the largest amount of wins that was before the 2007 season, as well as the Team being silverstone motorsport academy?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"career_summary\" WHERE \"season\"<2007 AND \"team\"='silverstone motorsport academy';"
}
] |
[
{
"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\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real\n);\n\nQuestion: What is the newest Season in which had 0 Podiums, and having 1 total of Races, as well as total wins larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"career_summary\" WHERE \"podiums\"=0 AND \"races\"=1 AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Name the week for december 4, 2009"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"2009_season\" WHERE \"date\"='december 4, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent with record of 6-2"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"2009_season\" WHERE \"record\"='6-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent with result of w 35-21"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"2009_season\" WHERE \"result\"='w 35-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Name the date with resultof w 35-7"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2009_season\" WHERE \"result\"='w 35-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Name the date with record of 3-1"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2009_season\" WHERE \"record\"='3-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Name the week for date of bye"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"2009_season\" WHERE \"date\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"136\" real,\n \"18_february\" text,\n \"friendly\" text,\n \"croatia\" text,\n \"germany\" text\n);\n\nQuestion: What is the friendly game for Germany of France?"
},
{
"role": "assistant",
"content": "SELECT \"friendly\" FROM \"2004\" WHERE \"germany\"='france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"acquisition_table\" (\n \"number\" real,\n \"company\" text,\n \"business\" text,\n \"country\" text,\n \"price\" text,\n \"used_as_or_integrated_with\" text\n);\n\nQuestion: What company is numbered larger than 5 and priced at $389M?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"acquisition_table\" WHERE \"number\">5 AND \"price\"='$389m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"los_angeles_try_out\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which category was william ivey long a nominee and nominated in?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"los_angeles_try_out\" WHERE \"result\"='nominated' AND \"nominee\"='william ivey long';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_hassium_isotopes\" (\n \"isotope\" text,\n \"half_life\" text,\n \"decay_mode\" text,\n \"discovery_year\" text,\n \"reaction\" text\n);\n\nQuestion: What is the half-life discovered in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"half_life\" FROM \"list_of_hassium_isotopes\" WHERE \"discovery_year\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_hassium_isotopes\" (\n \"isotope\" text,\n \"half_life\" text,\n \"decay_mode\" text,\n \"discovery_year\" text,\n \"reaction\" text\n);\n\nQuestion: What is the decay mode of the 265m hs isotope discovered in 1984?"
},
{
"role": "assistant",
"content": "SELECT \"decay_mode\" FROM \"list_of_hassium_isotopes\" WHERE \"discovery_year\"='1984' AND \"isotope\"='265m hs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"network\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the Frequency MHz of Trinidad, Colorado?"
},
{
"role": "assistant",
"content": "SELECT \"frequency_m_hz\" FROM \"network\" WHERE \"city_of_license\"='trinidad, colorado';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"network\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What city of license has an ERP W smaller than 500, Class A, and Frequency MHz larger than 89.7?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"network\" WHERE \"erp_w\"<500 AND \"class\"='a' AND \"frequency_m_hz\">89.7;"
}
] |
[
{
"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_1992_93\" text\n);\n\nQuestion: Which venue has a capacity larger than 5,000 for Molodechno team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"teams_and_venues\" WHERE \"capacity\">'5,000' AND \"team\"='molodechno';"
}
] |
[
{
"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_1992_93\" text\n);\n\nQuestion: What is the smallest capacity for Fandok?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"capacity\") FROM \"teams_and_venues\" WHERE \"team\"='fandok';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest pick number of a defensive back with less than 136 overall points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"<136 AND \"position\"='defensive back';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest pick number of John Scully?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='john scully';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"consolation_round_7_12_place\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the total points with less than 5 games?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"consolation_round_7_12_place\" WHERE \"games\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"outcome\" text,\n \"event\" text,\n \"year\" text,\n \"venue\" text,\n \"partner\" text\n);\n\nQuestion: What was the outcome for the India Open?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles\" WHERE \"venue\"='india open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"outcome\" text,\n \"event\" text,\n \"year\" text,\n \"venue\" text,\n \"partner\" text\n);\n\nQuestion: What was the Outcome at the 1985 India Open?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles\" WHERE \"year\"='1985' AND \"venue\"='india open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"outcome\" text,\n \"event\" text,\n \"year\" text,\n \"venue\" text,\n \"partner\" text\n);\n\nQuestion: What was the outcome in 1982 with Kang Haeng-Suk as partner?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles\" WHERE \"partner\"='kang haeng-suk' AND \"year\"='1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Which Party has a First elected smaller than 1878, and a District of south carolina 3?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"<1878 AND \"district\"='south carolina 3';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.