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 \"nfl_draft\" (\n \"pick\" real,\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What position does gerald carter play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"player\"='gerald carter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick\" real,\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: Who is the guard for Wisconsin?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"position\"='guard' AND \"school\"='wisconsin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"nba_team\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player is Pick 33 and has a Nationality of USA?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_two\" WHERE \"nationality\"='usa' AND \"pick\"=33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"nba_team\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the player who has a pick lower than 33 and a School/Club Team of Vanderbilt?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_two\" WHERE \"pick\"<33 AND \"school_club_team\"='vanderbilt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"nba_team\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the player who had the pick of 52 and plays for the NBA team of Phoenix Suns?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_two\" WHERE \"nba_team\"='phoenix suns' AND \"pick\"=52;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many leage apperances for the player with one FA cup, and a FLT Apps of 0 (1)?"
},
{
"role": "assistant",
"content": "SELECT \"league_apps\" FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\"='1' AND \"flt_apps\"='0 (1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day did St Kilda play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What's the value for 2007 when 2011 is a and 2009 is q2?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"singles_performance_timeline\" WHERE \"2011\"='a' AND \"2009\"='q2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Tell me the highest league goals with total goals less than 1 and FA cups more than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"total_goals\"<1 AND \"fa_cup_goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: I want to know the sum of fa cup goals for david mirfin and total goals less than 1"
},
{
"role": "assistant",
"content": "SELECT SUM(\"fa_cup_goals\") FROM \"appearances_and_goals\" WHERE \"name\"='david mirfin' AND \"total_goals\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Tell me the league apps with league goals less than 2 and position of df and FA cup apps of 5"
},
{
"role": "assistant",
"content": "SELECT \"league_apps\" FROM \"appearances_and_goals\" WHERE \"league_goals\"<2 AND \"position\"='df' AND \"fa_cup_apps\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: What is the video ratio on channel 14.2?"
},
{
"role": "assistant",
"content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"channel\"=14.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: What network has an aspect of 4:3 and a PSIP Short Name of qvc?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"digital_channels\" WHERE \"aspect\"='4:3' AND \"psip_short_name\"='qvc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: What is ion life network's PSIP Short Name?"
},
{
"role": "assistant",
"content": "SELECT \"psip_short_name\" FROM \"digital_channels\" WHERE \"network\"='ion life';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"network\" text\n);\n\nQuestion: What is the sum of channels for qubo network?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"channel\") FROM \"digital_channels\" WHERE \"network\"='qubo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_effects\" (\n \"name\" text,\n \"dates_active\" text,\n \"windspeeds\" text,\n \"pressure\" text,\n \"deaths\" text\n);\n\nQuestion: How many deaths did eseta cause?"
},
{
"role": "assistant",
"content": "SELECT \"deaths\" FROM \"seasonal_effects\" WHERE \"name\"='eseta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date when the away team was Carlton?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_7\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team that had a score of 6.20 (56)"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"home_team_score\"='6.20 (56)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team at the venue victoria park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the home team was hawthorn, what was the date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_7\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did the game take place when the away team scored 14.15 (99)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_7\" WHERE \"away_team_score\"='14.15 (99)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team scored 23.18 (156)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"home_team_score\"='23.18 (156)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many spectators had a home team score of 15.14 (104)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_7\" WHERE \"home_team_score\"='15.14 (104)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did Geelong score as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date did the home team of footscray play?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_15\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team scored 5.8 (38)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_15\" WHERE \"away_team_score\"='5.8 (38)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1998_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Name the club team for overall of 188 for canada"
},
{
"role": "assistant",
"content": "SELECT \"club_team\" FROM \"1998_draft_picks\" WHERE \"nationality\"='canada' AND \"overall\"=188;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1998_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Name the nationality of the player with an overall of 74"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"1998_draft_picks\" WHERE \"overall\"=74;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belt_changes_april_2010_figures_not_avai\" (\n \"feb_2010\" text,\n \"mar_2010\" text,\n \"may_2010\" real,\n \"jun_2010\" real,\n \"jul_2010\" real,\n \"aug_2010\" real,\n \"sep_2010\" real,\n \"oct_2010\" real,\n \"nov_2010\" real,\n \"dec_2010\" real,\n \"jan_2011\" real,\n \"feb_2011\" real,\n \"mar_2011\" real,\n \"apr_2011\" real,\n \"may_2011\" real,\n \"jun_2011\" real,\n \"jul_2011\" real,\n \"aug_2011\" real,\n \"sep_2011\" real,\n \"oct_2011\" real,\n \"nov_2011\" real,\n \"dec_2011\" real,\n \"jan_2012\" real,\n \"feb_2012\" real,\n \"mar_2012\" real,\n \"apr_2012\" real,\n \"may_2012\" real,\n \"jun_2012\" real,\n \"jul_2012\" real,\n \"aug_2012\" real,\n \"sep_2012\" real,\n \"oct_2012\" real,\n \"nov_2012\" real,\n \"dec_2012\" real,\n \"jan_2013\" real,\n \"feb_2013\" real,\n \"mar_2013\" real,\n \"apr_2013\" real,\n \"may_2013\" real,\n \"jun_2013\" real,\n \"jul_2013\" real,\n \"aug_2013\" real,\n \"sep_2013\" real,\n \"oct_2013\" real\n);\n\nQuestion: What is the highest Aug 2013 with a Nov 2011 smaller than 968, and a Jul 2012 with 31, and a Jun 2011 larger than 30?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"aug_2013\") FROM \"belt_changes_april_2010_figures_not_avai\" WHERE \"nov_2011\"<968 AND \"jul_2012\"=31 AND \"jun_2011\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belt_changes_april_2010_figures_not_avai\" (\n \"feb_2010\" text,\n \"mar_2010\" text,\n \"may_2010\" real,\n \"jun_2010\" real,\n \"jul_2010\" real,\n \"aug_2010\" real,\n \"sep_2010\" real,\n \"oct_2010\" real,\n \"nov_2010\" real,\n \"dec_2010\" real,\n \"jan_2011\" real,\n \"feb_2011\" real,\n \"mar_2011\" real,\n \"apr_2011\" real,\n \"may_2011\" real,\n \"jun_2011\" real,\n \"jul_2011\" real,\n \"aug_2011\" real,\n \"sep_2011\" real,\n \"oct_2011\" real,\n \"nov_2011\" real,\n \"dec_2011\" real,\n \"jan_2012\" real,\n \"feb_2012\" real,\n \"mar_2012\" real,\n \"apr_2012\" real,\n \"may_2012\" real,\n \"jun_2012\" real,\n \"jul_2012\" real,\n \"aug_2012\" real,\n \"sep_2012\" real,\n \"oct_2012\" real,\n \"nov_2012\" real,\n \"dec_2012\" real,\n \"jan_2013\" real,\n \"feb_2013\" real,\n \"mar_2013\" real,\n \"apr_2013\" real,\n \"may_2013\" real,\n \"jun_2013\" real,\n \"jul_2013\" real,\n \"aug_2013\" real,\n \"sep_2013\" real,\n \"oct_2013\" real\n);\n\nQuestion: What is the average Apr 2013 with a Jun 2011 less than 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"apr_2013\") FROM \"belt_changes_april_2010_figures_not_avai\" WHERE \"jun_2011\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belt_changes_april_2010_figures_not_avai\" (\n \"feb_2010\" text,\n \"mar_2010\" text,\n \"may_2010\" real,\n \"jun_2010\" real,\n \"jul_2010\" real,\n \"aug_2010\" real,\n \"sep_2010\" real,\n \"oct_2010\" real,\n \"nov_2010\" real,\n \"dec_2010\" real,\n \"jan_2011\" real,\n \"feb_2011\" real,\n \"mar_2011\" real,\n \"apr_2011\" real,\n \"may_2011\" real,\n \"jun_2011\" real,\n \"jul_2011\" real,\n \"aug_2011\" real,\n \"sep_2011\" real,\n \"oct_2011\" real,\n \"nov_2011\" real,\n \"dec_2011\" real,\n \"jan_2012\" real,\n \"feb_2012\" real,\n \"mar_2012\" real,\n \"apr_2012\" real,\n \"may_2012\" real,\n \"jun_2012\" real,\n \"jul_2012\" real,\n \"aug_2012\" real,\n \"sep_2012\" real,\n \"oct_2012\" real,\n \"nov_2012\" real,\n \"dec_2012\" real,\n \"jan_2013\" real,\n \"feb_2013\" real,\n \"mar_2013\" real,\n \"apr_2013\" real,\n \"may_2013\" real,\n \"jun_2013\" real,\n \"jul_2013\" real,\n \"aug_2013\" real,\n \"sep_2013\" real,\n \"oct_2013\" real\n);\n\nQuestion: What is the average Feb 2013 with a Feb 2010 with 37, and a Nov 2012 less than 32?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"feb_2013\") FROM \"belt_changes_april_2010_figures_not_avai\" WHERE \"feb_2010\"='37' AND \"nov_2012\"<32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belt_changes_april_2010_figures_not_avai\" (\n \"feb_2010\" text,\n \"mar_2010\" text,\n \"may_2010\" real,\n \"jun_2010\" real,\n \"jul_2010\" real,\n \"aug_2010\" real,\n \"sep_2010\" real,\n \"oct_2010\" real,\n \"nov_2010\" real,\n \"dec_2010\" real,\n \"jan_2011\" real,\n \"feb_2011\" real,\n \"mar_2011\" real,\n \"apr_2011\" real,\n \"may_2011\" real,\n \"jun_2011\" real,\n \"jul_2011\" real,\n \"aug_2011\" real,\n \"sep_2011\" real,\n \"oct_2011\" real,\n \"nov_2011\" real,\n \"dec_2011\" real,\n \"jan_2012\" real,\n \"feb_2012\" real,\n \"mar_2012\" real,\n \"apr_2012\" real,\n \"may_2012\" real,\n \"jun_2012\" real,\n \"jul_2012\" real,\n \"aug_2012\" real,\n \"sep_2012\" real,\n \"oct_2012\" real,\n \"nov_2012\" real,\n \"dec_2012\" real,\n \"jan_2013\" real,\n \"feb_2013\" real,\n \"mar_2013\" real,\n \"apr_2013\" real,\n \"may_2013\" real,\n \"jun_2013\" real,\n \"jul_2013\" real,\n \"aug_2013\" real,\n \"sep_2013\" real,\n \"oct_2013\" real\n);\n\nQuestion: What is the total number with Nov 2012 with a Jun 2013 larger than 542, and a Aug 2011 more than 935?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nov_2012\") FROM \"belt_changes_april_2010_figures_not_avai\" WHERE \"jun_2013\">542 AND \"aug_2011\">935;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the total grid for a Time/Retired of +1:03.741, and Laps larger than 44?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"time_retired\"='+1:03.741' AND \"laps\">44;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team at Brunswick Street Oval score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"venue\"='brunswick street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the highest rebounds of the game with A. Johnson (6) as the highest assist?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"high_assists\"='a. johnson (6)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the highest rebounds of the game with A. Johnson (14) as the highest assists?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"high_assists\"='a. johnson (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 \"record\" text\n);\n\nQuestion: Who was the opponent on August 30?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='august 30';"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: What was the score on August 8?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='august 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which pick was the lowest from Manila College in Philippines?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"round_2\" WHERE \"country_of_origin\"='philippines' AND \"college\"='manila';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: How many picks included Kenny Evans?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"round_2\" WHERE \"player\"='kenny evans';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: How many picks went to College of Letran?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"round_2\" WHERE \"college\"='letran';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which player has a PBA team of Red Bull Thunder?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_2\" WHERE \"pba_team\"='red bull thunder';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: In which event did he place 6th in 1971?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"achievements\" WHERE \"year\"=1971 AND \"result\"='6th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: When was the first year he placed 2nd in Izmir, Turkey?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"result\"='2nd' AND \"venue\"='izmir, turkey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: How did he place in 1970?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"achievements\" WHERE \"year\"=1970;"
}
] |
[
{
"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: How many were in Attendance on the Date May 29?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='may 29';"
}
] |
[
{
"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: What was the Record on the Date May 8?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"5_00\" text,\n \"6_00\" text,\n \"7_00\" text,\n \"8_00\" text,\n \"10_00\" text,\n \"11_00\" text\n);\n\nQuestion: What is the 10:00 with a 5:00 with monster knockouts?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"schedule\" WHERE \"5_00\"='monster knockouts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"5_00\" text,\n \"6_00\" text,\n \"7_00\" text,\n \"8_00\" text,\n \"10_00\" text,\n \"11_00\" text\n);\n\nQuestion: What is the 6:00 with a 10:00 with mysteryquest?"
},
{
"role": "assistant",
"content": "SELECT \"6_00\" FROM \"schedule\" WHERE \"10_00\"='mysteryquest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"5_00\" text,\n \"6_00\" text,\n \"7_00\" text,\n \"8_00\" text,\n \"10_00\" text,\n \"11_00\" text\n);\n\nQuestion: What is the 11:00 with a 5:00 with monster knockouts?"
},
{
"role": "assistant",
"content": "SELECT \"11_00\" FROM \"schedule\" WHERE \"5_00\"='monster knockouts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"5_00\" text,\n \"6_00\" text,\n \"7_00\" text,\n \"8_00\" text,\n \"10_00\" text,\n \"11_00\" text\n);\n\nQuestion: What is the 10:00 with a 7:00 with mostly true stories: urban legends revealed?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"schedule\" WHERE \"7_00\"='mostly true stories: urban legends revealed';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"5_00\" text,\n \"6_00\" text,\n \"7_00\" text,\n \"8_00\" text,\n \"10_00\" text,\n \"11_00\" text\n);\n\nQuestion: What is the 6:00 with a 7:00 of mostly true stories: urban legends revealed, and a 10:00 with mysteryquest?"
},
{
"role": "assistant",
"content": "SELECT \"6_00\" FROM \"schedule\" WHERE \"7_00\"='mostly true stories: urban legends revealed' AND \"10_00\"='mysteryquest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"5_00\" text,\n \"6_00\" text,\n \"7_00\" text,\n \"8_00\" text,\n \"10_00\" text,\n \"11_00\" text\n);\n\nQuestion: What is the 6:00 with an 11:00 of underbelly, and a 10:00 with nostradamus effect?"
},
{
"role": "assistant",
"content": "SELECT \"6_00\" FROM \"schedule\" WHERE \"11_00\"='underbelly' AND \"10_00\"='nostradamus effect';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the home team at the game played on April 14, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"april\" WHERE \"date\"='april 14, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ipo_general_election_results\" (\n \"race\" text,\n \"candidate\" text,\n \"party\" text,\n \"notes\" text,\n \"votes\" real\n);\n\nQuestion: How many votes were cast when the notes reported lost to incumbent vic gilliam?"
},
{
"role": "assistant",
"content": "SELECT \"votes\" FROM \"2008_ipo_general_election_results\" WHERE \"notes\"='lost to incumbent vic gilliam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ipo_general_election_results\" (\n \"race\" text,\n \"candidate\" text,\n \"party\" text,\n \"notes\" text,\n \"votes\" real\n);\n\nQuestion: Who is the candidate in Race for State representative, hd18?"
},
{
"role": "assistant",
"content": "SELECT \"candidate\" FROM \"2008_ipo_general_election_results\" WHERE \"race\"='state representative, hd18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What club/province does the prop player with over 45 caps play for?"
},
{
"role": "assistant",
"content": "SELECT \"club_province\" FROM \"2007_rugby_world_cup_squads\" WHERE \"caps\">45 AND \"position\"='prop';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text,\n \"arena\" text\n);\n\nQuestion: Who was the opponent at the Staples Center?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"preseason\" WHERE \"arena\"='staples center';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text,\n \"arena\" text\n);\n\nQuestion: In what arena was the game against the Sharks played?"
},
{
"role": "assistant",
"content": "SELECT \"arena\" FROM \"preseason\" WHERE \"opponent\"='sharks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the label with the LP format?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='lp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What date had a 4ad label and a CD (reissue) format?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='4ad' AND \"format\"='cd (reissue)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: Which country had a cad 4011 catalogue #?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"catalogue_num\"='cad 4011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: Which date was for Japan?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"country\"='japan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the label on the United States?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"country\"='united states';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the date with the catalogue # cocy-80093?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalogue_num\"='cocy-80093';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: What category was danson tang nominated?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"nomination\"='danson tang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: What was the total number of years than had best improved singer (\u8e8d\u9032\u6b4c\u624b)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"awards_and_nominations\" WHERE \"category\"='best improved singer (\u8e8d\u9032\u6b4c\u624b)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed the car with a grid over 19 that retired due to suspension?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\">19 AND \"time_retired\"='suspension';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What driver has a 9 grid total?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"champion\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: What was the winning car's chassis for the 1982 season?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"by_season\" WHERE \"season\"='1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"champion\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Which team, with champion Bastian Kolmsee, used a Dallara f302 for the chassis?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"by_season\" WHERE \"chassis\"='dallara f302' AND \"champion\"='bastian kolmsee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"champion\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: What chassis was the car with the Volkswagen engine built on in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"by_season\" WHERE \"engine\"='volkswagen' AND \"season\"='2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"champion\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Which engine did Korten Motorsport use?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"by_season\" WHERE \"team\"='korten motorsport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"champion\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Who was the champion that drove the car with the Ford engine in 1971?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"by_season\" WHERE \"engine\"='ford' AND \"season\"='1971';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"champion\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: In which season did Jimmy Eriksson win the championship for Team Lotus?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"by_season\" WHERE \"team\"='lotus' AND \"champion\"='jimmy eriksson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which name had 6 goals?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"squad_information\" WHERE \"goals\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is the largest goal number when the transfer fee was \u00a30.8m?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"squad_information\" WHERE \"transfer_fee\"='\u00a30.8m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_sports_clubs\" (\n \"club\" text,\n \"leagues\" text,\n \"venue\" text,\n \"location\" text,\n \"capacity\" real,\n \"established\" real\n);\n\nQuestion: What is the location of a1 women's - handball?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"main_sports_clubs\" WHERE \"leagues\"='a1 women''s - handball';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_sports_clubs\" (\n \"club\" text,\n \"leagues\" text,\n \"venue\" text,\n \"location\" text,\n \"capacity\" real,\n \"established\" real\n);\n\nQuestion: What is the capacity at the nop aquatic centre, established after 1929?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"capacity\") FROM \"main_sports_clubs\" WHERE \"venue\"='nop aquatic centre' AND \"established\">1929;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_sports_clubs\" (\n \"club\" text,\n \"leagues\" text,\n \"venue\" text,\n \"location\" text,\n \"capacity\" real,\n \"established\" real\n);\n\nQuestion: What is the capacity for b national - basketball?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"capacity\") FROM \"main_sports_clubs\" WHERE \"leagues\"='b national - basketball';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What game week did the Buccaneers play against the Minnesota Vikings?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"opponent\"='minnesota vikings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What game week did the buccaneers have a record of 0-5?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"record\"='0-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the buccaneers on December 4, 1983?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"date\"='december 4, 1983';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance at the game against Ottawa?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"december\" WHERE \"visitor\"='ottawa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the highest attendance at a Detroit home game?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"december\" WHERE \"home\"='detroit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which team had an attendance larger than 14,333 in a game against Toronto?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"december\" WHERE \"attendance\">'14,333' AND \"visitor\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance of the Florida vs. Montreal game?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"december\" WHERE \"home\"='florida' AND \"visitor\"='montreal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: I want to know the condition with Prothrombin time of unaffected and bleeding time of prolonged with partial thromboplastin time of unaffected with platelet count of decreased or unaffected"
},
{
"role": "assistant",
"content": "SELECT \"condition\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"prothrombin_time\"='unaffected' AND \"bleeding_time\"='prolonged' AND \"partial_thromboplastin_time\"='unaffected' AND \"platelet_count\"='decreased or unaffected';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: I want the condition that has a prolonged bleeding time and a platelet count of decreased or unaffected"
},
{
"role": "assistant",
"content": "SELECT \"condition\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"bleeding_time\"='prolonged' AND \"platelet_count\"='decreased or unaffected';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: I want the prothrombin time with a partial thromboplastin time of prolonged and unaffected bleeding time and factor xii deficiency for condition of factor"
},
{
"role": "assistant",
"content": "SELECT \"prothrombin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"partial_thromboplastin_time\"='prolonged' AND \"bleeding_time\"='unaffected' AND \"condition\"='factor xii deficiency';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: I want the condition that has a partial thromboplastin time of prolonged and unaffected bleeding time"
},
{
"role": "assistant",
"content": "SELECT \"condition\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"partial_thromboplastin_time\"='prolonged' AND \"bleeding_time\"='unaffected';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO for Antalya Airport?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"current_destinations\" WHERE \"airport\"='antalya airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the IATA of Leonardo da Vinci-Fiumicino Airport?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"current_destinations\" WHERE \"airport\"='leonardo da vinci-fiumicino airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What country is the IATA BLQ located in?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"current_destinations\" WHERE \"iata\"='blq';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the IATA of Madrid-Barajas Airport?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"current_destinations\" WHERE \"airport\"='madrid-barajas airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which city has the ICAO of LIRF?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"current_destinations\" WHERE \"icao\"='lirf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which city is Naples Airport located in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"current_destinations\" WHERE \"airport\"='naples airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"block_a\" text,\n \"kaz_hayashi\" text,\n \"ryuji_hijikata\" text,\n \"taka_michinoku\" text,\n \"brother_yasshi\" text\n);\n\nQuestion: Tell me the Ryuji Hijikata for TAKA Michinoku of Hayashi (28:05)"
},
{
"role": "assistant",
"content": "SELECT \"ryuji_hijikata\" FROM \"2006\" WHERE \"taka_michinoku\"='hayashi (28:05)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"block_a\" text,\n \"kaz_hayashi\" text,\n \"ryuji_hijikata\" text,\n \"taka_michinoku\" text,\n \"brother_yasshi\" text\n);\n\nQuestion: Tell me the Ryuji Hijikata for Block A of Ryuji Hijikata"
},
{
"role": "assistant",
"content": "SELECT \"ryuji_hijikata\" FROM \"2006\" WHERE \"block_a\"='ryuji hijikata';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When South Melbourne was the Away Team, what was their score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_15\" WHERE \"away_team\"='south melbourne';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.