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 \"birds\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes where the authors are Zhou & Zhang?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"birds\" WHERE \"authors\"='zhou & zhang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"birds\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is the status where the notes are possible jr synonym of sapeornis?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"birds\" WHERE \"notes\"='possible jr synonym of sapeornis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average Top-5 finishes with 2 as the Top-10 and a greater than 4 Top-25?" }, { "role": "assistant", "content": "SELECT AVG(\"top_5\") FROM \"summary\" WHERE \"top_10\"=2 AND \"top_25\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What are the least Top-5 finish when the events are greater than 18?" }, { "role": "assistant", "content": "SELECT MIN(\"top_5\") FROM \"summary\" WHERE \"events\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total of wins when the evens is less than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"summary\" WHERE \"events\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many cuts made when the Top-10 is larger than 1, and the wins greater than 0, and a Top-5 greater than 2, when the events is greater than 18?" }, { "role": "assistant", "content": "SELECT COUNT(\"cuts_made\") FROM \"summary\" WHERE \"top_10\">1 AND \"wins\">0 AND \"top_5\">2 AND \"events\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: What years did Omar Sneed play?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"s\" WHERE \"name\"='omar sneed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: Which season did Jovy Sese play?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"s\" WHERE \"name\"='jovy sese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: How did the School/Club Team of Manuel Luis Quezon acquire their Forward?" }, { "role": "assistant", "content": "SELECT \"acquisition_via\" FROM \"s\" WHERE \"position\"='forward' AND \"school_club_team\"='manuel luis quezon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: Which School/ Club Team acquired Jondan Salvador via trade?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"s\" WHERE \"acquisition_via\"='trade' AND \"name\"='jondan salvador';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the Points with a Played larger than 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"apea_s_campeonato_paulista\" WHERE \"played\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the Points with an Against smaller than 16?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"apea_s_campeonato_paulista\" WHERE \"against\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Team has a Lost larger than 2, and a Position smaller than 7, and a Drawn smaller than 2, and a Points of 22?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"apea_s_campeonato_paulista\" WHERE \"lost\">2 AND \"position\"<7 AND \"drawn\"<2 AND \"points\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Points has a Position of 3, and a Drawn smaller than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"apea_s_campeonato_paulista\" WHERE \"position\"=3 AND \"drawn\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"apea_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Played has a Points of 2, and a Position smaller than 8?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"apea_s_campeonato_paulista\" WHERE \"points\"=2 AND \"position\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many average plays have points greater than 14, with an against greater than 17?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"campeonato_paulista\" WHERE \"points\">14 AND \"against\">17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average against has a lost less than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"campeonato_paulista\" WHERE \"lost\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which of the highest drawn has a played less than 10?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"campeonato_paulista\" WHERE \"played\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many played have 3 as the drawn, and a position greater than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"campeonato_paulista\" WHERE \"drawn\"=3 AND \"position\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_played_songs\" (\n \"rank\" real,\n \"song_title\" text,\n \"composer_s\" text,\n \"performer_s\" text,\n \"year\" real\n);\n\nQuestion: Who sang the song composed by Mariah Carey and Walter Afanasieff?" }, { "role": "assistant", "content": "SELECT \"performer_s\" FROM \"most_played_songs\" WHERE \"composer_s\"='mariah carey and walter afanasieff';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_played_songs\" (\n \"rank\" real,\n \"song_title\" text,\n \"composer_s\" text,\n \"performer_s\" text,\n \"year\" real\n);\n\nQuestion: How many years was Louis Armstrong performing?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"most_played_songs\" WHERE \"performer_s\"='louis armstrong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who were the Runner(s)-up with the winning score of \u221216 (66-68-70-68=272)?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"champions_tour_wins_8\" WHERE \"winning_score\"='\u221216 (66-68-70-68=272)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What tournament had a winning score of \u221227 (64-64-61=189)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"champions_tour_wins_8\" WHERE \"winning_score\"='\u221227 (64-64-61=189)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What tournament had a runner(s)-up of Scott Hoch & Kenny Perry?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"champions_tour_wins_8\" WHERE \"runner_s_up\"='scott hoch & kenny perry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What tournament had a Runner(s)-up of Tom Kite?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"champions_tour_wins_8\" WHERE \"runner_s_up\"='tom kite';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the date of the Outback Steakhouse Pro-Am Tournament?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"champions_tour_wins_8\" WHERE \"tournament\"='outback steakhouse pro-am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which tournament has a Runner(s)-up of Gary McCord?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"champions_tour_wins_8\" WHERE \"runner_s_up\"='gary mccord';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_fixtures_and_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: What was the location of the game with a score of 2:3?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"2011_fixtures_and_results\" WHERE \"score\"='2:3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_fixtures_and_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: What was the location of the home game for Slovakia?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"2011_fixtures_and_results\" WHERE \"home_team\"='slovakia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_fixtures_and_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: What was the tournament where Japan was the home team and Mexico was the away team?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"2011_fixtures_and_results\" WHERE \"away_team\"='mexico' AND \"home_team\"='japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_fixtures_and_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: What was the location of the home game for Japan?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"2011_fixtures_and_results\" WHERE \"home_team\"='japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the Runner-up in Hossegor?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"tournaments\" WHERE \"location\"='hossegor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: On what Date was the Tournament in Gold Coast?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"tournaments\" WHERE \"location\"='gold coast';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the Winner of the French Polynesia Billabong Pro Event?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"tournaments\" WHERE \"event\"='billabong pro' AND \"country\"='french polynesia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" 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 shows for 2010 when 2007 is a and 2004 is 2r?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='a' AND \"2004\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" 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 is the 2005 when the 2008 shows grand slam tournaments?" }, { "role": "assistant", "content": "SELECT \"2005\" FROM \"doubles_performance_timeline\" WHERE \"2008\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" 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 shows for 2002 when 2010 shows 69?" }, { "role": "assistant", "content": "SELECT \"2002\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='69';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" 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 shows for 2010 when 2005 shows 1r?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"doubles_performance_timeline\" WHERE \"2005\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laf_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number of draws with more than 15 points, an against of 19, and less than 3 losses?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"laf_s_campeonato_paulista\" WHERE \"points\">15 AND \"against\"=19 AND \"lost\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What stage (winner) has thor hushovd as a general classification, and trent lowe as a rider classification?" }, { "role": "assistant", "content": "SELECT \"stage_winner\" FROM \"jersey_progress\" WHERE \"general_classification\"='thor hushovd' AND \"young_rider_classification\"='trent lowe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What stage (winner) has quick step as the team classification, and trent lowe as the young rider classification?" }, { "role": "assistant", "content": "SELECT \"stage_winner\" FROM \"jersey_progress\" WHERE \"team_classification\"='quick step' AND \"young_rider_classification\"='trent lowe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"2000_2001_team\" text,\n \"nhl_rights\" text\n);\n\nQuestion: What is the 2000-2001 Team with a Jersey # that is 19?" }, { "role": "assistant", "content": "SELECT \"2000_2001_team\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"jersey_num\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_indian_premier_le\" (\n \"year\" text,\n \"matches\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"tied\" real,\n \"success_rate\" text\n);\n\nQuestion: What is the average number of ties for years with more than 19 wins?" }, { "role": "assistant", "content": "SELECT AVG(\"tied\") FROM \"performance_summary_in_indian_premier_le\" WHERE \"wins\">19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_indian_premier_le\" (\n \"year\" text,\n \"matches\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"tied\" real,\n \"success_rate\" text\n);\n\nQuestion: What is the total number of losses for years with fewer than 9 wins?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"performance_summary_in_indian_premier_le\" WHERE \"wins\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the total number of Division(s), when Team is Chongqing Lifan, and when Apps is greater than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"division\") FROM \"career_statistics\" WHERE \"team\"='chongqing lifan' AND \"apps\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is Season, when Country is China, when Team is Dalian Shide, when Apps is greater than 8, and when Goals is 2?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"career_statistics\" WHERE \"country\"='china' AND \"team\"='dalian shide' AND \"apps\">8 AND \"goals\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the highest Apps, when Goals are greater than 5?" }, { "role": "assistant", "content": "SELECT MAX(\"apps\") FROM \"career_statistics\" WHERE \"goals\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What Season, when Country is China, when Team is Dalian Shide, and when Goals are 0?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"career_statistics\" WHERE \"country\"='china' AND \"team\"='dalian shide' AND \"goals\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the total number of Division(s), when Country is China, when Apps is greater than 9, and when Season is 2008?" }, { "role": "assistant", "content": "SELECT COUNT(\"division\") FROM \"career_statistics\" WHERE \"country\"='china' AND \"apps\">9 AND \"season\"='2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the lowest Division, when Goals are less than 10, when Team is Dalian Shide, when Apps are less than 17, and when Season is 2007?" }, { "role": "assistant", "content": "SELECT MIN(\"division\") FROM \"career_statistics\" WHERE \"goals\"<10 AND \"team\"='dalian shide' AND \"apps\"<17 AND \"season\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_area\" (\n \"rank\" real,\n \"province\" text,\n \"population\" real,\n \"area\" real,\n \"density\" real\n);\n\nQuestion: What is the lowest area when the density is greater than 234.77, the population is less than 965,040, and the rank is 32?" }, { "role": "assistant", "content": "SELECT MIN(\"area\") FROM \"by_area\" WHERE \"density\">234.77 AND \"rank\"=32 AND \"population\"<'965,040';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_area\" (\n \"rank\" real,\n \"province\" text,\n \"population\" real,\n \"area\" real,\n \"density\" real\n);\n\nQuestion: What is the lowest rank when the population is greater than 59,544 and the area is 1,395.5?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"by_area\" WHERE \"population\">'59,544' AND \"area\"='1,395.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_area\" (\n \"rank\" real,\n \"province\" text,\n \"population\" real,\n \"area\" real,\n \"density\" real\n);\n\nQuestion: What is the lowest population total in La Romana when the area is less than 1,788.4, the density is greater than 234.77, and a rank greater than 30" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"by_area\" WHERE \"area\"<'1,788.4' AND \"density\">234.77 AND \"province\"='la romana' AND \"rank\">30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Home with a Time that is 14:00?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"round_eight\" WHERE \"time\"='14:00';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Score with an Away that is high park demons?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"round_eight\" WHERE \"away\"='high park demons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Score with a Hoe that is etobicoke kangaroos?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"round_eight\" WHERE \"home\"='etobicoke kangaroos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Date with a Score that is 46-77?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_eight\" WHERE \"score\"='46-77';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"proportions\" (\n \"benchmark\" text,\n \"crown_height\" text,\n \"pavilion_depth\" text,\n \"table_diameter\" text,\n \"girdle_thickness\" text,\n \"crown_angle\" text,\n \"pavilion_angle\" text,\n \"brilliance_grade\" text\n);\n\nQuestion: Which Pavilion depth has a Crown angle of 34.0\u201334.7\u00b0?" }, { "role": "assistant", "content": "SELECT \"pavilion_depth\" FROM \"proportions\" WHERE \"crown_angle\"='34.0\u201334.7\u00b0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"proportions\" (\n \"benchmark\" text,\n \"crown_height\" text,\n \"pavilion_depth\" text,\n \"table_diameter\" text,\n \"girdle_thickness\" text,\n \"crown_angle\" text,\n \"pavilion_angle\" text,\n \"brilliance_grade\" text\n);\n\nQuestion: Which Brilliance Grade has a Benchmark of practical fine cut?" }, { "role": "assistant", "content": "SELECT \"brilliance_grade\" FROM \"proportions\" WHERE \"benchmark\"='practical fine cut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"proportions\" (\n \"benchmark\" text,\n \"crown_height\" text,\n \"pavilion_depth\" text,\n \"table_diameter\" text,\n \"girdle_thickness\" text,\n \"crown_angle\" text,\n \"pavilion_angle\" text,\n \"brilliance_grade\" text\n);\n\nQuestion: Which Table diameter has a Crown height of 14.45%?" }, { "role": "assistant", "content": "SELECT \"table_diameter\" FROM \"proportions\" WHERE \"crown_height\"='14.45%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"proportions\" (\n \"benchmark\" text,\n \"crown_height\" text,\n \"pavilion_depth\" text,\n \"table_diameter\" text,\n \"girdle_thickness\" text,\n \"crown_angle\" text,\n \"pavilion_angle\" text,\n \"brilliance_grade\" text\n);\n\nQuestion: Which Brilliance Grade has a Crown angle of 41.1\u00b0?" }, { "role": "assistant", "content": "SELECT \"brilliance_grade\" FROM \"proportions\" WHERE \"crown_angle\"='41.1\u00b0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"proportions\" (\n \"benchmark\" text,\n \"crown_height\" text,\n \"pavilion_depth\" text,\n \"table_diameter\" text,\n \"girdle_thickness\" text,\n \"crown_angle\" text,\n \"pavilion_angle\" text,\n \"brilliance_grade\" text\n);\n\nQuestion: Which Pavilion depth has a Brilliance Grade of 100% and a Pavilion angle of n/a?" }, { "role": "assistant", "content": "SELECT \"pavilion_depth\" FROM \"proportions\" WHERE \"brilliance_grade\"='100%' AND \"pavilion_angle\"='n/a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_group\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What is the number of lost with 2 points?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"north_group\" WHERE \"points\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the aggregate for the match with a team 2 of Kenya?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"preliminary_round\" WHERE \"team_2\"='kenya';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the aggregate for the match with Sierra Leone as team 1?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"preliminary_round\" WHERE \"team_1\"='sierra leone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg score for the match with Lesotho as team 1?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"preliminary_round\" WHERE \"team_1\"='lesotho';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 2nd leg score for the match with Lesotho as team 1?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"preliminary_round\" WHERE \"team_1\"='lesotho';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of ladies ranked who had less than 3 silvers, less than 2 total medals, and more than 0 bronze medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"ladies\" WHERE \"silver\"<3 AND \"total\"<2 AND \"bronze\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals for the skater with less than 3 bronze medals, more than 0 silver medals and a rank smaller than 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"ladies\" WHERE \"bronze\"<3 AND \"rank\"<11 AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was Matthew Warchus' Award?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"original_broadway_production\" WHERE \"nominee\"='matthew warchus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Format of the French Frequency with a Call sign of CKRL-FM?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio\" WHERE \"notes\"='french' AND \"call_sign\"='ckrl-fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Format of the Frequency owned by Laval University?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio\" WHERE \"owner\"='laval university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Notes of the Frequency with Format of talk radio?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"radio\" WHERE \"format\"='talk radio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Notes of the Frequency with a Format of soft adult contemporary?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"radio\" WHERE \"format\"='soft adult contemporary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"taiwan\" (\n \"chart\" text,\n \"single_title\" text,\n \"debut_position\" real,\n \"peak_position\" real,\n \"chart_run\" real\n);\n\nQuestion: How many chart runs had a debut position of more than 7 when peak position was 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"chart_run\") FROM \"taiwan\" WHERE \"debut_position\">7 AND \"peak_position\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"spoofed_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: Which Spoofed title had Mort Drucker as the artist in issue 88?" }, { "role": "assistant", "content": "SELECT \"spoofed_title\" FROM \"1960s\" WHERE \"artist\"='mort drucker' AND \"issue\"=88;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"spoofed_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: Who was the artist for Spoofed title Genteel Ben in an issue later than 74?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"1960s\" WHERE \"issue\">74 AND \"spoofed_title\"='genteel ben';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"spoofed_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: Which issue was the Spoofed title Route 67 for which Mort Drucker was the artist?" }, { "role": "assistant", "content": "SELECT SUM(\"issue\") FROM \"1960s\" WHERE \"artist\"='mort drucker' AND \"spoofed_title\"='route 67';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"spoofed_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What is the earliest issue Arnie Kogen wrote for in December 1964?" }, { "role": "assistant", "content": "SELECT MIN(\"issue\") FROM \"1960s\" WHERE \"writer\"='arnie kogen' AND \"date\"='december 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What are the highest points that have a difference of 8, with a position less than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"campeonato_paulista\" WHERE \"difference\"='8' AND \"position\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many losses have corinthians as the team, with an against greater than 26?" }, { "role": "assistant", "content": "SELECT SUM(\"lost\") FROM \"campeonato_paulista\" WHERE \"team\"='corinthians' AND \"against\">26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many points have a difference of 23, with a drawn less than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"campeonato_paulista\" WHERE \"difference\"='23' AND \"drawn\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many positions have 15 for the points, with a drawn less than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"campeonato_paulista\" WHERE \"points\"=15 AND \"drawn\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"notes\" text\n);\n\nQuestion: What was the result of the match held when his record was 7-0-0?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"kickboxing_record\" WHERE \"record\"='7-0-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"notes\" text\n);\n\nQuestion: What do the notes say for 1989 May 7?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"kickboxing_record\" WHERE \"date\"='1989 may 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"notes\" text\n);\n\nQuestion: How did he beat Alberto Rodriguez?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"kickboxing_record\" WHERE \"opponent\"='alberto rodriguez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"notes\" text\n);\n\nQuestion: What was his record in 1987?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"kickboxing_record\" WHERE \"date\"='1987';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total that has barbados as the nation with a bronze greater than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"all_time_medal_table\" WHERE \"nation\"='barbados' AND \"bronze\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"all_time_medal_table\" WHERE \"gold\">2 AND \"bronze\"<35 AND \"nation\"='china' AND \"total\">26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest total that has a gold less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"all_time_medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many golds have a silver greater than 1, vietnam as the nation, with a bronze less than 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"all_time_medal_table\" WHERE \"silver\">1 AND \"nation\"='vietnam' AND \"bronze\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_by_nationality\" (\n \"rank\" text,\n \"country\" text,\n \"wins\" real,\n \"winners\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: Which Wins has a Country of new zealand and a Last title larger than 1968?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"champions_by_nationality\" WHERE \"country\"='new zealand' AND \"last_title\">1968;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_by_nationality\" (\n \"rank\" text,\n \"country\" text,\n \"wins\" real,\n \"winners\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: What is the total of Last title that has Wins smaller than 71 and a First title larger than 1968 and a Country of fiji?" }, { "role": "assistant", "content": "SELECT COUNT(\"last_title\") FROM \"champions_by_nationality\" WHERE \"wins\"<71 AND \"first_title\">1968 AND \"country\"='fiji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_by_nationality\" (\n \"rank\" text,\n \"country\" text,\n \"wins\" real,\n \"winners\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: Which First title has Wins smaller than 8 and in Canada?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_title\") FROM \"champions_by_nationality\" WHERE \"wins\"<8 AND \"country\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_by_nationality\" (\n \"rank\" text,\n \"country\" text,\n \"wins\" real,\n \"winners\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: How many Winners have Wins of 1 and a Country of fiji and a First title smaller than 2004?" }, { "role": "assistant", "content": "SELECT AVG(\"winners\") FROM \"champions_by_nationality\" WHERE \"wins\"=1 AND \"country\"='fiji' AND \"first_title\"<2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadiums\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"opened\" real,\n \"city\" text\n);\n\nQuestion: What is the latest opened year of the team in Glasgow, Scotland?" }, { "role": "assistant", "content": "SELECT MAX(\"opened\") FROM \"stadiums\" WHERE \"city\"='glasgow, scotland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadiums\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"opened\" real,\n \"city\" text\n);\n\nQuestion: What is the average opened year of Mini Estadi stadium in Barcelona, Spain?" }, { "role": "assistant", "content": "SELECT AVG(\"opened\") FROM \"stadiums\" WHERE \"city\"='barcelona, spain' AND \"stadium\"='mini estadi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"season\" text,\n \"league\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" real,\n \"points\" real,\n \"winning_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text\n);\n\nQuestion: What is the lowest win percentage for teams with more than 23 losses and more than 386 goals for?" }, { "role": "assistant", "content": "SELECT MIN(\"winning_pct\") FROM \"season_by_season_results\" WHERE \"lost\">23 AND \"goals_for\">386;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"season\" text,\n \"league\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" real,\n \"points\" real,\n \"winning_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text\n);\n\nQuestion: What is the total number of losses for teams with less than 5 ties and more than 330 goals for?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"season_by_season_results\" WHERE \"tied\"<5 AND \"goals_for\">330;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Score of the Competition with a Result of 5-0?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"goals_for_senior_national_team\" WHERE \"result\"='5-0';" } ]