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 \"united_states\" (\n \"name\" text,\n \"gnis_feature_id\" real,\n \"state\" text,\n \"county\" text,\n \"type\" text,\n \"usgs_7_5_map\" text\n);\n\nQuestion: Which state has a GNIS Feature ID larger than 624634, and a USGS 7.5 Map of temple peak?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"united_states\" WHERE \"gnis_feature_id\">624634 AND \"usgs_7_5_map\"='temple peak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states\" (\n \"name\" text,\n \"gnis_feature_id\" real,\n \"state\" text,\n \"county\" text,\n \"type\" text,\n \"usgs_7_5_map\" text\n);\n\nQuestion: Which state has a Name of diamond lake, and a GNIS Feature ID of 1579127?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"united_states\" WHERE \"name\"='diamond lake' AND \"gnis_feature_id\"=1579127;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1_1997\" (\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who directed the episode written cyrus nowrasteh?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"season_1_1997\" WHERE \"written_by\"='cyrus nowrasteh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"8000_meters\" (\n \"world_rank\" real,\n \"rank_pakistan\" real,\n \"name\" text,\n \"height_m\" real,\n \"location\" text\n);\n\nQuestion: What is the Rank (Pakistan) of the mountain that has a World Rank smaller than 11 and a Height smaller than 8126?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank_pakistan\") FROM \"8000_meters\" WHERE \"world_rank\"<11 AND \"height_m\"<8126;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_tournament_singles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"career_sr\" text\n);\n\nQuestion: Which 2006 tournament had a 4R performance in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"major_tournament_singles_performance_tim\" WHERE \"2001\"='4r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_tournament_singles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"career_sr\" text\n);\n\nQuestion: Which tournament had a performance of 1R in 2004 and 2R in 1998?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"major_tournament_singles_performance_tim\" WHERE \"2004\"='1r' AND \"1998\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_tournament_singles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"career_sr\" text\n);\n\nQuestion: Which 1998 tournament had a performance of 3R in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"1998\" FROM \"major_tournament_singles_performance_tim\" WHERE \"2007\"='3r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_tournament_singles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"career_sr\" text\n);\n\nQuestion: What's the name of the 2005 tournament that has a 1R in both 2006 and 2002?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"major_tournament_singles_performance_tim\" WHERE \"2006\"='1r' AND \"2002\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\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 home team score at glenferrie oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deficit_spending\" (\n \"end_of_fiscal_year\" real,\n \"gross_debt_in_billions_undeflated_treas\" real,\n \"as_pct_of_gdp_low_high\" text,\n \"debt_held_by_public_billions\" real,\n \"as_pct_of_gdp_treas_mw_omb_or_omb_mw\" real,\n \"gdp_billions_omb_bea_est_mw_com\" text\n);\n\nQuestion: For End of Fiscal Years before 2003 with a GDP $Billions OMB/BEA est.=MW.com of 10,980 what is the highest Gross Debt in $Billions undeflated Treas.?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gross_debt_in_billions_undeflated_treas\") FROM \"deficit_spending\" WHERE \"gdp_billions_omb_bea_est_mw_com\"='10,980' AND \"end_of_fiscal_year\"<2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deficit_spending\" (\n \"end_of_fiscal_year\" real,\n \"gross_debt_in_billions_undeflated_treas\" real,\n \"as_pct_of_gdp_low_high\" text,\n \"debt_held_by_public_billions\" real,\n \"as_pct_of_gdp_treas_mw_omb_or_omb_mw\" real,\n \"gdp_billions_omb_bea_est_mw_com\" text\n);\n\nQuestion: For End of Fiscal Years past 1980 that also have as % of GDP Low-High of 83.4-84.4, and a Debt Held By Public ($Billions) smaller than 7,552 what would be the average Gross Debt in $Billions undeflated Treas. in said years?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gross_debt_in_billions_undeflated_treas\") FROM \"deficit_spending\" WHERE \"end_of_fiscal_year\">1980 AND \"as_pct_of_gdp_low_high\"='83.4-84.4' AND \"debt_held_by_public_billions\"<'7,552';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deficit_spending\" (\n \"end_of_fiscal_year\" real,\n \"gross_debt_in_billions_undeflated_treas\" real,\n \"as_pct_of_gdp_low_high\" text,\n \"debt_held_by_public_billions\" real,\n \"as_pct_of_gdp_treas_mw_omb_or_omb_mw\" real,\n \"gdp_billions_omb_bea_est_mw_com\" text\n);\n\nQuestion: For End of Fiscal Year(s) with as % of GDP (Treas/MW, OMB or OMB/MW) of 28 and Gross Debt in $Billions undeflated Treas. smaller than 370.9 what would be the sum of Debt Held By Public ($Billions)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"debt_held_by_public_billions\") FROM \"deficit_spending\" WHERE \"as_pct_of_gdp_treas_mw_omb_or_omb_mw\"=28 AND \"gross_debt_in_billions_undeflated_treas\"<370.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deficit_spending\" (\n \"end_of_fiscal_year\" real,\n \"gross_debt_in_billions_undeflated_treas\" real,\n \"as_pct_of_gdp_low_high\" text,\n \"debt_held_by_public_billions\" real,\n \"as_pct_of_gdp_treas_mw_omb_or_omb_mw\" real,\n \"gdp_billions_omb_bea_est_mw_com\" text\n);\n\nQuestion: For End of Fiscal Year(s) with a Debt Held By Public ($Billions) larger than 236.8, and as % of GDP Low-High of 33.4 what is the sum of the number of Gross Debt in $Billions undeflated Treas.?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gross_debt_in_billions_undeflated_treas\") FROM \"deficit_spending\" WHERE \"debt_held_by_public_billions\">236.8 AND \"as_pct_of_gdp_low_high\"='33.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 \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What player was selected in Round 6?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\"=6;"
}
] |
[
{
"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 \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the nationality of the player who played for the Peterborough Petes (OHL)?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='peterborough petes (ohl)';"
}
] |
[
{
"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 \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which round was Mike Peca (C) of Canada selected in?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"player\"='mike peca (c)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the smallest grid for Ayrton Senna?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"driver\"='ayrton senna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Time/Retired for laps higher than 52 on a grid larger than 21?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\">52 AND \"grid\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the sum of laps for grid 20?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"race\" WHERE \"grid\"=20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the most laps for Ayrton Senna?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"driver\"='ayrton senna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"gymnast\" text,\n \"floor_exercise\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"total\" real\n);\n\nQuestion: what was the score of the parallel bars with a floor exercise score more than 9.137, vault more than 9.5 and horizontal bar of 9.225?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"parallel_bars\") FROM \"final\" WHERE \"floor_exercise\">9.137 AND \"horizontal_bar\"=9.225 AND \"vault\">9.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"gymnast\" text,\n \"floor_exercise\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"total\" real\n);\n\nQuestion: what was the floor exercise score with a pommel horse score of 9.65 and horizontal bar score more than 9.475?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"floor_exercise\") FROM \"final\" WHERE \"pommel_horse\"=9.65 AND \"horizontal_bar\">9.475;"
}
] |
[
{
"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);\n\nQuestion: Which tournament had A in 2008, and a 1r in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2008\"='a' AND \"2010\"='1r';"
}
] |
[
{
"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);\n\nQuestion: What was the position for 2008, where 2012 was q1, and 2010 was 1r?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2012\"='q1' AND \"2010\"='1r';"
}
] |
[
{
"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 \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which venue has a Goal of 3?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"goal\"=3;"
}
] |
[
{
"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 \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which venue was used on 10 september 2010?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='10 september 2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many carries for the player with under 6 yards and an average of over 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"car\") FROM \"running_backs\" WHERE \"yards\"<6 AND \"avg\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What was the longest carry for kevin clemens with under 31 yards total?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"long\") FROM \"running_backs\" WHERE \"player\"='kevin clemens' AND \"yards\"<31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many TDs for the player with a long of less than 4 and under 8 yards?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"td_s\") FROM \"running_backs\" WHERE \"long\"<4 AND \"yards\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What is the average for the player with 1 TD, over 4 as a long, and under 1 carry?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"avg\") FROM \"running_backs\" WHERE \"td_s\"=1 AND \"long\">4 AND \"car\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 attendance at Brunswick Street Oval?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_6\" 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 \"2005\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What's listed as the First Day Cover Cancellation with a Date of Issue of 13 June 2005?"
},
{
"role": "assistant",
"content": "SELECT \"first_day_cover_cancellation\" FROM \"2005\" WHERE \"date_of_issue\"='13 june 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What's the First Day Cover Cancellation with Denomination of $0.50 and Date of Issue as 13 June 2005?"
},
{
"role": "assistant",
"content": "SELECT \"first_day_cover_cancellation\" FROM \"2005\" WHERE \"denomination\"='$0.50' AND \"date_of_issue\"='13 june 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What's the Denomination listed for the Date of Issue 12 April 2005?"
},
{
"role": "assistant",
"content": "SELECT \"denomination\" FROM \"2005\" WHERE \"date_of_issue\"='12 april 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: Which Paper Type has a Denomination of $0.50 and Date of Issue 4 February 2005?"
},
{
"role": "assistant",
"content": "SELECT \"paper_type\" FROM \"2005\" WHERE \"denomination\"='$0.50' AND \"date_of_issue\"='4 february 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What's the Date of Issue for Design of Katalin Kovats?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_issue\" FROM \"2005\" WHERE \"design\"='katalin kovats';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What was the average for the player that scored 116 yards and had TD's less than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"avg\") FROM \"wide_receivers\" WHERE \"yards\"=116 AND \"td_s\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What was the lowest recorded record for a player with an average larger than 13?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rec\") FROM \"wide_receivers\" WHERE \"avg\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many yards did Hank Edwards make when he had TD's of 1 and an average higher than 13?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"yards\") FROM \"wide_receivers\" WHERE \"td_s\"=1 AND \"player\"='hank edwards' AND \"avg\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many yards were averaged by the player that had a higher than 13 average with less than 18 long?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"yards\") FROM \"wide_receivers\" WHERE \"long\"<18 AND \"avg\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What is the highest number of yards recorded for a player that had more than 4 TD's?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"yards\") FROM \"wide_receivers\" WHERE \"td_s\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_scheduled_passengers_carried_millions\" (\n \"rank\" real,\n \"airline_holding\" text,\n \"passenger_fleet\" real,\n \"current_destinations\" real,\n \"alliance_association\" text\n);\n\nQuestion: For an airline of Wizz Air and fewer than 83 destinations, what is the highest passenger fleet?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"passenger_fleet\") FROM \"by_scheduled_passengers_carried_millions\" WHERE \"airline_holding\"='wizz air' AND \"current_destinations\"<83;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_scheduled_passengers_carried_millions\" (\n \"rank\" real,\n \"airline_holding\" text,\n \"passenger_fleet\" real,\n \"current_destinations\" real,\n \"alliance_association\" text\n);\n\nQuestion: Which alliance has a rank of 40?"
},
{
"role": "assistant",
"content": "SELECT \"alliance_association\" FROM \"by_scheduled_passengers_carried_millions\" WHERE \"rank\"=40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_scheduled_passengers_carried_millions\" (\n \"rank\" real,\n \"airline_holding\" text,\n \"passenger_fleet\" real,\n \"current_destinations\" real,\n \"alliance_association\" text\n);\n\nQuestion: For airlines named Aeroflot Group, what is the alliance?"
},
{
"role": "assistant",
"content": "SELECT \"alliance_association\" FROM \"by_scheduled_passengers_carried_millions\" WHERE \"airline_holding\"='aeroflot group';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: In which year was a linebacker pick 17?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"player_selections\" WHERE \"position\"='linebacker' AND \"pick\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the name of the cornerback from 1997?"
},
{
"role": "assistant",
"content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"position\"='cornerback' AND \"year\"=1997;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the name of the player from after 1989 from Washington State?"
},
{
"role": "assistant",
"content": "SELECT \"player_name\" FROM \"player_selections\" WHERE \"year\">1989 AND \"college\"='washington state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: Which race has a Margin of 8?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"race_record\" WHERE \"margin\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: How many Runners have a Placing that isn't 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"runners\") FROM \"race_record\" WHERE \"placing\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: What is the lowest number of Runners that has a Placing that isn't 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"runners\") FROM \"race_record\" WHERE \"placing\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: What is the lowest Prize amount for the Irish Derby Race?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"prize_k\") FROM \"race_record\" WHERE \"race\"='irish derby';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\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 people attended the game that resulted in an away team score of 18.17 (125)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_4\" WHERE \"away_team_score\"='18.17 (125)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_flowers\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What was the mintage having an issue price of $1,099.99, artist being Pamela Stagg?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"mintage\") FROM \"provincial_flowers\" WHERE \"issue_price\"='$1,099.99' AND \"artist\"='pamela stagg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_flowers\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What was the year that had an issue price of $1,295.95?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"provincial_flowers\" WHERE \"issue_price\"='$1,295.95';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_flowers\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the composition with an artist of Henry Purdy, a year smaller than 2002, and a mint more than 1,998?"
},
{
"role": "assistant",
"content": "SELECT \"composition\" FROM \"provincial_flowers\" WHERE \"year\"<2002 AND \"mintage\">'1,998' AND \"artist\"='henry purdy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_flowers\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What was the average mintage for that of artist Celia Godkin, before the year 2010?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"mintage\") FROM \"provincial_flowers\" WHERE \"artist\"='celia godkin' AND \"year\"<2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 is the Venue that has an away team score of 13.16 (94) points?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team_score\"='13.16 (94)';"
}
] |
[
{
"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 was the away team score at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"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: Who was the home team at Lake Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"venue\"='lake oval';"
}
] |
[
{
"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 is the number of the crowd when the away team score was 10.18 (78)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"away_team_score\"='10.18 (78)';"
}
] |
[
{
"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: On what date was the crowd over 19,298 when South Melbourne was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"crowd\">'19,298' AND \"home_team\"='south melbourne';"
}
] |
[
{
"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: On what date was the home team score 10.14 (74)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"home_team_score\"='10.14 (74)';"
}
] |
[
{
"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: On what date was the venue VFL Park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" WHERE \"venue\"='vfl park';"
}
] |
[
{
"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: Which team was the home team at Glenferrie Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_37_19_18\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the date when Steffi Graf was the opponent in the final and the score was 2\u20136, 0\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_37_19_18\" WHERE \"opponent_in_the_final\"='steffi graf' AND \"score_in_the_final\"='2\u20136, 0\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_37_19_18\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the surface where the outcome was winner on 12 march 1989?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_37_19_18\" WHERE \"outcome\"='winner' AND \"date\"='12 march 1989';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_37_19_18\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the outcome of the Tournament of lugano , switzerland wta virginia slims, against bonnie gadusek?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_37_19_18\" WHERE \"tournament\"='lugano , switzerland wta virginia slims' AND \"opponent_in_the_final\"='bonnie gadusek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_37_19_18\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the outcome of the match against Sylvia Hanika on a hard (i) surface?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_37_19_18\" WHERE \"opponent_in_the_final\"='sylvia hanika' AND \"surface\"='hard (i)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What player had numbers of 20"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"c\" WHERE \"no_s\"='20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Tell me the height in ft for 1999-2004"
},
{
"role": "assistant",
"content": "SELECT \"height_in_ft\" FROM \"c\" WHERE \"years_for_rockets\"='1999-2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Tell me the number for height in ft of 6-7"
},
{
"role": "assistant",
"content": "SELECT \"no_s\" FROM \"c\" WHERE \"height_in_ft\"='6-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What player had a school of missouri"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"c\" WHERE \"school_club_team_country\"='missouri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: What pick # has a team from Rimouski Oc\u00e9anic?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick_num\") FROM \"round_three\" WHERE \"team_from\"='rimouski oc\u00e9anic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Who is the player from Hotchkiss School with a position of d?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_three\" WHERE \"position\"='d' AND \"team_from\"='hotchkiss school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What type is the sorrento to sapri course with a distance of km (mi)?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"stage_results\" WHERE \"distance\"='km (mi)' AND \"course\"='sorrento to sapri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What type is the misurina to bassano del grappa course?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"stage_results\" WHERE \"course\"='misurina to bassano del grappa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What's the distance for the chieti to macerata course?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"stage_results\" WHERE \"course\"='chieti to macerata';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: Which is the lowest points value that had a Chevrolet car, whose driver was Sterling Marlin, and whose car number was less than 14?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"race_results\" WHERE \"make\"='chevrolet' AND \"driver\"='sterling marlin' AND \"car_num\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: Which is the lowest point value that had not only a Chevrolet car, but also a car number smaller than 24, total laps of 312, and a winning purse of $122,325?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"race_results\" WHERE \"make\"='chevrolet' AND \"car_num\"<24 AND \"laps\"=312 AND \"winnings\"='$122,325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text\n);\n\nQuestion: What is the location for the win against Johan Mparmpagiannis?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"result\"='win' AND \"opponent\"='johan mparmpagiannis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text\n);\n\nQuestion: What is the method against Bj\u00f6rn Bregy?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"kickboxing_record\" WHERE \"opponent\"='bj\u00f6rn bregy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text\n);\n\nQuestion: What is the method against Paula Mataele?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"kickboxing_record\" WHERE \"opponent\"='paula mataele';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text\n);\n\nQuestion: What is the date of the match in Vilnius, Lithuania?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"kickboxing_record\" WHERE \"location\"='vilnius, lithuania';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text\n);\n\nQuestion: What is the result against Errol Zimmerman on 2007-04-07?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"kickboxing_record\" WHERE \"opponent\"='errol zimmerman' AND \"date\"='2007-04-07';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"location\" text,\n \"method\" text\n);\n\nQuestion: What is the location of the match against Martinis Knyzelis?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"opponent\"='martinis knyzelis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is st kilda the home side?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is melbourne's away score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the highest crowd listed when the away side scores 4.9 (33)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_16\" WHERE \"away_team_score\"='4.9 (33)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features an away team score of 4.9 (33)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team_score\"='4.9 (33)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\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's score when Geelong was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_3\" 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_3\" (\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 average crowd size at a game when the away team scored 17.12 (114)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_3\" WHERE \"away_team_score\"='17.12 (114)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"late_1941\" text,\n \"late_1942\" real,\n \"sept_1943\" real,\n \"late_1943\" real,\n \"late_1944\" real,\n \"1978_veteran_membership\" real\n);\n\nQuestion: What is the total number of the 1978 Veteran membership that has a late 1943 more than 78,000 and a september 1943 larger than 60,000?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1978_veteran_membership\") FROM \"composition\" WHERE \"late_1943\">'78,000' AND \"sept_1943\">'60,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"late_1941\" text,\n \"late_1942\" real,\n \"sept_1943\" real,\n \"late_1943\" real,\n \"late_1944\" real,\n \"1978_veteran_membership\" real\n);\n\nQuestion: What is the highest late 1943 number with a late 1941 of vojvodina and a 1978 membership less than 40,000?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"late_1943\") FROM \"composition\" WHERE \"late_1941\"='vojvodina' AND \"1978_veteran_membership\"<'40,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"late_1941\" text,\n \"late_1942\" real,\n \"sept_1943\" real,\n \"late_1943\" real,\n \"late_1944\" real,\n \"1978_veteran_membership\" real\n);\n\nQuestion: What is the 1978 Veteran membership with a late 1941 macedonia and a late 1943 less than 10,000?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1978_veteran_membership\") FROM \"composition\" WHERE \"late_1941\"='macedonia' AND \"late_1943\"<'10,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"late_1941\" text,\n \"late_1942\" real,\n \"sept_1943\" real,\n \"late_1943\" real,\n \"late_1944\" real,\n \"1978_veteran_membership\" real\n);\n\nQuestion: What is the lowest 1978 Veteran membership with less than 48,000 in sept. 1943, a late 1941 of vojvodina, and a late 1942 bigger than 1,000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1978_veteran_membership\") FROM \"composition\" WHERE \"sept_1943\"<'48,000' AND \"late_1941\"='vojvodina' AND \"late_1942\">'1,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"late_1941\" text,\n \"late_1942\" real,\n \"sept_1943\" real,\n \"late_1943\" real,\n \"late_1944\" real,\n \"1978_veteran_membership\" real\n);\n\nQuestion: What is the highest late 1943 with a late 1944 bigger than 22,000, a late 1942 bigger than 1,000, a late 1941 slovenia, and less than 4000 in september 1943?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"late_1943\") FROM \"composition\" WHERE \"late_1944\">'22,000' AND \"late_1942\">'1,000' AND \"late_1941\"='slovenia' AND \"sept_1943\"<4000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_club_competitions_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text\n);\n\nQuestion: Which opponent has a Season of 2011/12?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"uefa_club_competitions_record\" WHERE \"season\"='2011/12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_club_competitions_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text\n);\n\nQuestion: Which opponent has a Season of 2010/11?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"uefa_club_competitions_record\" WHERE \"season\"='2010/11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_club_competitions_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text\n);\n\nQuestion: Which competition has a Season of 2010/11?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"uefa_club_competitions_record\" WHERE \"season\"='2010/11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_club_competitions_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text\n);\n\nQuestion: What Opponent has a Result of \u2013?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"uefa_club_competitions_record\" WHERE \"result\"='\u2013';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.