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 \"south_australia\" (\n \"team\" text,\n \"coach\" text,\n \"home_ground\" text,\n \"location\" text,\n \"founded\" text\n);\n\nQuestion: Who is the coach of the team from Port Pirie?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"south_australia\" WHERE \"location\"='port pirie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_australia\" (\n \"team\" text,\n \"coach\" text,\n \"home_ground\" text,\n \"location\" text,\n \"founded\" text\n);\n\nQuestion: Who is the coach of the team with home ground at Club Cove?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"south_australia\" WHERE \"home_ground\"='club cove';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_australia\" (\n \"team\" text,\n \"coach\" text,\n \"home_ground\" text,\n \"location\" text,\n \"founded\" text\n);\n\nQuestion: Which team was founded in 1970?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"south_australia\" WHERE \"founded\"='1970';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"acharyas\" (\n \"acharya_number\" real,\n \"name_of_acharya\" text,\n \"born_on\" text,\n \"became_acharya_on\" text,\n \"death\" text,\n \"term\" text\n);\n\nQuestion: When did acharya shree koshalendraprasadji maharaj become acharya?"
},
{
"role": "assistant",
"content": "SELECT \"became_acharya_on\" FROM \"acharyas\" WHERE \"name_of_acharya\"='acharya shree koshalendraprasadji maharaj';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"acharyas\" (\n \"acharya_number\" real,\n \"name_of_acharya\" text,\n \"born_on\" text,\n \"became_acharya_on\" text,\n \"death\" text,\n \"term\" text\n);\n\nQuestion: What is the term of acharya shree vasudevprasadji maharaj?"
},
{
"role": "assistant",
"content": "SELECT \"term\" FROM \"acharyas\" WHERE \"name_of_acharya\"='acharya shree vasudevprasadji maharaj';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was the event where justin robbins had a record of 9-4-1?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='9-4-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: Where was the location where justin robbins fought against billy kidd?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='billy kidd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was the method of resolution for the fight at cage warriors 39?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='cage warriors 39';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"years\" text,\n \"regular_season\" real,\n \"playoffs\" real,\n \"total\" real\n);\n\nQuestion: A total larger than 302 and playoffs of 35 also list the total of regular seasons as what?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"regular_season\") FROM \"top_goalscorers\" WHERE \"playoffs\"=35 AND \"total\">302;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the college/junior/club team (league) of lw position player mark miller, from a round greater than 4?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\">4 AND \"position\"='lw' AND \"player\"='mark miller';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Who is the lw position player from a round greater than 10?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"position\"='lw' AND \"round\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Who is the player from round 8?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the nationality of the player from round 7?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the nationality of the player from round 5?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_current_northeast_governors\" (\n \"governor\" text,\n \"state\" text,\n \"past\" text,\n \"party\" text,\n \"elected_assumed_office\" real,\n \"seat_up\" real\n);\n\nQuestion: What state had an elected/assumed office in 2013?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"list_of_current_northeast_governors\" WHERE \"elected_assumed_office\"=2013;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_2010_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What was the air date of the episode that has an 18-49 of 2.2/7?"
},
{
"role": "assistant",
"content": "SELECT \"air_date\" FROM \"season_2_2009_2010_weekly_ratings\" WHERE \"18_49\"='2.2/7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_2010_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What was the air date of 'Gary tries to do it all'?"
},
{
"role": "assistant",
"content": "SELECT \"air_date\" FROM \"season_2_2009_2010_weekly_ratings\" WHERE \"episode\"='gary tries to do it all';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_2010_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What is the highest number of viewers for the episode that has an 18-49 of 1.8/6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"viewers\") FROM \"season_2_2009_2010_weekly_ratings\" WHERE \"18_49\"='1.8/6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_2010_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What was the timeslot for the episode with less than 6.76 viewers and an 18-49 of 1.9/5?"
},
{
"role": "assistant",
"content": "SELECT \"timeslot\" FROM \"season_2_2009_2010_weekly_ratings\" WHERE \"viewers\"<6.76 AND \"18_49\"='1.9/5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_2010_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What is the timeslot for the episode with an 18-49 of 2.2/7?"
},
{
"role": "assistant",
"content": "SELECT \"timeslot\" FROM \"season_2_2009_2010_weekly_ratings\" WHERE \"18_49\"='2.2/7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_2010_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What is the timeslot for 'gary has to choose' with an 18-49 of 1.8/5?"
},
{
"role": "assistant",
"content": "SELECT \"timeslot\" FROM \"season_2_2009_2010_weekly_ratings\" WHERE \"18_49\"='1.8/5' AND \"episode\"='gary has to choose';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_women_s_teams\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"enrollment\" real,\n \"established\" real\n);\n\nQuestion: What is the location of the university that was established in 2000?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"current_women_s_teams\" WHERE \"established\"=2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_women_s_teams\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"enrollment\" real,\n \"established\" real\n);\n\nQuestion: What year was the team with the nickname pride established?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"established\") FROM \"current_women_s_teams\" WHERE \"nickname\"='pride';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_women_s_teams\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"enrollment\" real,\n \"established\" real\n);\n\nQuestion: What is the enrollment of the university established in or after 2011?"
},
{
"role": "assistant",
"content": "SELECT \"enrollment\" FROM \"current_women_s_teams\" WHERE \"established\">2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_50_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: What country was ole ellefs\u00e6ter from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"men_s_50_km\" WHERE \"winner\"='ole ellefs\u00e6ter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_50_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Who won the FIS Nordic World Ski Championships in 1972?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"men_s_50_km\" WHERE \"fis_nordic_world_ski_championships\"='1972';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: For a country of Spain, place of t6, what is the Money ($)?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"place\"='t6' AND \"country\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Which country has a to par of e?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"to_par\"='e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Which player is from Australia, and has a place of t9?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"place\"='t9' AND \"country\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the place for player John Merrick?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"player\"='john merrick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Which country had a place of t1, as well as a score of 72-68-70-73=283?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"place\"='t1' AND \"score\"='72-68-70-73=283';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What place has jack renner as the player?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"player\"='jack renner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What to par has The United States as the country, t8 as the place, and tommy valentine as the player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"country\"='united states' AND \"place\"='t8' AND \"player\"='tommy valentine';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What to par has 66 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=66;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: Mean of played with smaller than 7 conceded?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"torneo_clausura\" WHERE \"conceded\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: The highest position with more than 16 points and less than 7 concedes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"torneo_clausura\" WHERE \"points\">16 AND \"conceded\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: The highest draws with smaller than 9 played?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draws\") FROM \"torneo_clausura\" WHERE \"played\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: Which Home Town has a Took Office of 1983, and a District larger than 15?"
},
{
"role": "assistant",
"content": "SELECT \"home_town\" FROM \"senate\" WHERE \"took_office\"=1983 AND \"district\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: Which Senator has a Party of republican, a Home Town of houston, and a District of 7?"
},
{
"role": "assistant",
"content": "SELECT \"senator\" FROM \"senate\" WHERE \"party\"='republican' AND \"home_town\"='houston' AND \"district\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: Which Home Town has a Senator of dan shelley?"
},
{
"role": "assistant",
"content": "SELECT \"home_town\" FROM \"senate\" WHERE \"senator\"='dan shelley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: Which Took Office has a Party of democratic, a Home Town of victoria, and a District smaller than 18?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"took_office\") FROM \"senate\" WHERE \"party\"='democratic' AND \"home_town\"='victoria' AND \"district\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: Which Took Office has a District of 29?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"took_office\") FROM \"senate\" WHERE \"district\"=29;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What are the average Laps on Grid 15?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"125cc_classification\" WHERE \"grid\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest number of Laps that have a Time of +24.440, and a Grid higher than 18?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"125cc_classification\" WHERE \"time\"='+24.440' AND \"grid\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest number of Laps that have a Time of +18.366, and a Grid lower than 13?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"125cc_classification\" WHERE \"grid\"<13 AND \"time\"='+18.366';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the lowest Wins, when Season is 2011, when Podiums is 1, and when Poles is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"career_summary\" WHERE \"season\"='2011' AND \"podiums\"=1 AND \"poles\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is Position, when Points is greater than 7, and when Series is Toyota Racing Series?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"career_summary\" WHERE \"points\">7 AND \"series\"='toyota racing series';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the sum of Races, when Series is Toyota Racing Series, and when Podiums is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"races\") FROM \"career_summary\" WHERE \"series\"='toyota racing series' AND \"podiums\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the average Podiums, when Wins is greater than 1, when Races is 2, and when Points is greater than 150?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"podiums\") FROM \"career_summary\" WHERE \"wins\">1 AND \"races\"=2 AND \"points\">150;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the total number of Poles, when Position is 6th, and when Points is less than 164?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"poles\") FROM \"career_summary\" WHERE \"position\"='6th' AND \"points\"<164;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_member_schools\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"boys_girls\" text,\n \"day_boarding\" text,\n \"year_entered_competition\" real\n);\n\nQuestion: Which boys/girls school is a day school with an anglican denomination?"
},
{
"role": "assistant",
"content": "SELECT \"boys_girls\" FROM \"current_member_schools\" WHERE \"denomination\"='anglican' AND \"day_boarding\"='day';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_member_schools\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"boys_girls\" text,\n \"day_boarding\" text,\n \"year_entered_competition\" real\n);\n\nQuestion: Which is the earliest founded day school to have entered the competition after 1958?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"founded\") FROM \"current_member_schools\" WHERE \"day_boarding\"='day' AND \"year_entered_competition\">1958;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: How many to par in England?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='england';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Where is David Frost from?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='david frost';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country earned place T3 with a score of 70-68=138?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t3' AND \"score\"='70-68=138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country had a score of 69-67=136?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='69-67=136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: How many to par for Greg Norman?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='greg norman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the high rebounds after game 14 for Denver?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"game\">14 AND \"team\"='denver';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the latest game that Sacramento played?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"team\"='sacramento';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record of Utah?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"team\"='utah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_editions\" (\n \"title\" text,\n \"parent_magazine\" text,\n \"magazine_type\" text,\n \"frequency\" text,\n \"magazine_run\" text\n);\n\nQuestion: What is the parent magazine of Dengeki g's festival! deluxe?"
},
{
"role": "assistant",
"content": "SELECT \"parent_magazine\" FROM \"special_editions\" WHERE \"title\"='dengeki g''s festival! deluxe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_editions\" (\n \"title\" text,\n \"parent_magazine\" text,\n \"magazine_type\" text,\n \"frequency\" text,\n \"magazine_run\" text\n);\n\nQuestion: How often does Dengeki girl's style come out?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"special_editions\" WHERE \"parent_magazine\"='dengeki girl''s style';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_editions\" (\n \"title\" text,\n \"parent_magazine\" text,\n \"magazine_type\" text,\n \"frequency\" text,\n \"magazine_run\" text\n);\n\nQuestion: What titles come out monthly?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"special_editions\" WHERE \"frequency\"='monthly';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_editions\" (\n \"title\" text,\n \"parent_magazine\" text,\n \"magazine_type\" text,\n \"frequency\" text,\n \"magazine_run\" text\n);\n\nQuestion: What is the parent magazine for Dengeki 5pb.?"
},
{
"role": "assistant",
"content": "SELECT \"parent_magazine\" FROM \"special_editions\" WHERE \"title\"='dengeki 5pb.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_editions\" (\n \"title\" text,\n \"parent_magazine\" text,\n \"magazine_type\" text,\n \"frequency\" text,\n \"magazine_run\" text\n);\n\nQuestion: What is the magazine type that ran from March 3, 2009\u2013February 5, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"magazine_type\" FROM \"special_editions\" WHERE \"magazine_run\"='march 3, 2009\u2013february 5, 2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_editions\" (\n \"title\" text,\n \"parent_magazine\" text,\n \"magazine_type\" text,\n \"frequency\" text,\n \"magazine_run\" text\n);\n\nQuestion: What is the frequency for the magazine that runs September 2, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"special_editions\" WHERE \"magazine_run\"='september 2, 2010';"
}
] |
[
{
"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 highest number of laps with a +1:23.297 time/retired and a grid larger than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"time_retired\"='+1:23.297' AND \"grid\">4;"
}
] |
[
{
"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 with a toyota constructor and a 5 grid?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"constructor\"='toyota' AND \"grid\"=5;"
}
] |
[
{
"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 average number of laps with 16 grids?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"grid\"=16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"university_location_date_established\" (\n \"university\" text,\n \"location\" text,\n \"established\" real,\n \"endowment_as_of_2008\" text,\n \"campus_area_acres\" real,\n \"kiplinger_s_top_100_values\" text,\n \"enrollment_as_of_2008\" real\n);\n\nQuestion: What is the Kiplinger's Top 100 value of the university that was established in 1851?"
},
{
"role": "assistant",
"content": "SELECT \"kiplinger_s_top_100_values\" FROM \"university_location_date_established\" WHERE \"established\"=1851;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"university_location_date_established\" (\n \"university\" text,\n \"location\" text,\n \"established\" real,\n \"endowment_as_of_2008\" text,\n \"campus_area_acres\" real,\n \"kiplinger_s_top_100_values\" text,\n \"enrollment_as_of_2008\" real\n);\n\nQuestion: What was the endowment in 2008 of the college that was established in 1961?"
},
{
"role": "assistant",
"content": "SELECT \"endowment_as_of_2008\" FROM \"university_location_date_established\" WHERE \"established\"=1961;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: On what day was the attendance that had a Tie value of 40?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"first_round_proper\" WHERE \"tie_no\"='40';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the home team for the away game that Canvey Island played?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"away_team\"='canvey island';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: On what day was there a Home game for Gillingham?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"first_round_proper\" WHERE \"home_team\"='gillingham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick has an Overall larger than 308, and a Position of rb?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"overall\">308 AND \"position\"='rb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How much Overall has a Position of wr, and a College of alberta?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='wr' AND \"college\"='alberta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is indiana college's average pick?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='indiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which College has an Overall of 308?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"=308;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_20_10_10\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the surface for the opponent Marcos Baghdatis?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_20_10_10\" WHERE \"opponent\"='marcos baghdatis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003_2009\" (\n \"poll_year\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text,\n \"seventh\" text,\n \"eighth\" text,\n \"ninth\" text,\n \"tenth\" text\n);\n\nQuestion: WHAT IS THE 8TH THAT HAS A 7TH OF AUDIO BULLYS?"
},
{
"role": "assistant",
"content": "SELECT \"eighth\" FROM \"2003_2009\" WHERE \"seventh\"='audio bullys';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003_2009\" (\n \"poll_year\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text,\n \"seventh\" text,\n \"eighth\" text,\n \"ninth\" text,\n \"tenth\" text\n);\n\nQuestion: WHAT IS THE POLL YEAR WITH A THIRD OF THE TING TINGS?"
},
{
"role": "assistant",
"content": "SELECT \"poll_year\" FROM \"2003_2009\" WHERE \"third\"='the ting tings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003_2009\" (\n \"poll_year\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text,\n \"seventh\" text,\n \"eighth\" text,\n \"ninth\" text,\n \"tenth\" text\n);\n\nQuestion: WHAT IS THE SIXTH WITH A SECOND OF WHITE LIES?"
},
{
"role": "assistant",
"content": "SELECT \"sixth\" FROM \"2003_2009\" WHERE \"second\"='white lies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003_2009\" (\n \"poll_year\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text,\n \"seventh\" text,\n \"eighth\" text,\n \"ninth\" text,\n \"tenth\" text\n);\n\nQuestion: WHAT IS THE WINNER WITH A FIFTH OF JOSS STONE?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"2003_2009\" WHERE \"fifth\"='joss stone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003_2009\" (\n \"poll_year\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text,\n \"seventh\" text,\n \"eighth\" text,\n \"ninth\" text,\n \"tenth\" text\n);\n\nQuestion: WHAT IS THE SECOND WITH A TENTH OF DAN BLACK?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"2003_2009\" WHERE \"tenth\"='dan black';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What average game has January 30 as the date?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"date\"='january 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What score has january 19 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='january 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the loaction attendance that has a game greater than 35, with January 30 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"game\">35 AND \"date\"='january 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the highest game that has January 5 as the date?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"date\"='january 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the highest rebounds that has conseco fieldhouse 11,964 as the location attendance?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"location_attendance\"='conseco fieldhouse 11,964';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text\n);\n\nQuestion: What is the highest lane value for a mark of 2:02.27 NR, with heats under 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"semifinals\" WHERE \"mark\"='2:02.27 nr' AND \"heat\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text\n);\n\nQuestion: What is the mark for the runner from Mozambique?"
},
{
"role": "assistant",
"content": "SELECT \"mark\" FROM \"semifinals\" WHERE \"country\"='mozambique';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text\n);\n\nQuestion: Who was in lane 6 with a mark of 2:05.58 SB?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"semifinals\" WHERE \"lane\"=6 AND \"mark\"='2:05.58 sb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nouns\" (\n \"consonant_final_stem\" text,\n \"example_k_ats_man\" text,\n \"vowel_final_stem_truncating\" text,\n \"example_mama_father\" text,\n \"vowel_final_stem_non_truncating\" text,\n \"example_sakartvelo_georgia\" text\n);\n\nQuestion: What is the non-truncating vowel final stem for the example of k'ats-ma?"
},
{
"role": "assistant",
"content": "SELECT \"vowel_final_stem_non_truncating\" FROM \"nouns\" WHERE \"example_k_ats_man\"='k''ats-ma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nouns\" (\n \"consonant_final_stem\" text,\n \"example_k_ats_man\" text,\n \"vowel_final_stem_truncating\" text,\n \"example_mama_father\" text,\n \"vowel_final_stem_non_truncating\" text,\n \"example_sakartvelo_georgia\" text\n);\n\nQuestion: What is the truncating vowel final stem that has an example of mama-s?"
},
{
"role": "assistant",
"content": "SELECT \"vowel_final_stem_truncating\" FROM \"nouns\" WHERE \"example_mama_father\"='mama-s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nouns\" (\n \"consonant_final_stem\" text,\n \"example_k_ats_man\" text,\n \"vowel_final_stem_truncating\" text,\n \"example_mama_father\" text,\n \"vowel_final_stem_non_truncating\" text,\n \"example_sakartvelo_georgia\" text\n);\n\nQuestion: What is the example for \"man\" that has a truncating vowel final stem of -\u00f8 and a consonant final stem of -o?"
},
{
"role": "assistant",
"content": "SELECT \"example_k_ats_man\" FROM \"nouns\" WHERE \"vowel_final_stem_truncating\"='-\u00f8' AND \"consonant_final_stem\"='-o';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nouns\" (\n \"consonant_final_stem\" text,\n \"example_k_ats_man\" text,\n \"vowel_final_stem_truncating\" text,\n \"example_mama_father\" text,\n \"vowel_final_stem_non_truncating\" text,\n \"example_sakartvelo_georgia\" text\n);\n\nQuestion: What is the non-truncating vowel final stem that has an example of k'ats-s?"
},
{
"role": "assistant",
"content": "SELECT \"vowel_final_stem_non_truncating\" FROM \"nouns\" WHERE \"example_k_ats_man\"='k''ats-s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nouns\" (\n \"consonant_final_stem\" text,\n \"example_k_ats_man\" text,\n \"vowel_final_stem_truncating\" text,\n \"example_mama_father\" text,\n \"vowel_final_stem_non_truncating\" text,\n \"example_sakartvelo_georgia\" text\n);\n\nQuestion: What is the example for \"man\" that has an example for \"father\" of mam-is?"
},
{
"role": "assistant",
"content": "SELECT \"example_k_ats_man\" FROM \"nouns\" WHERE \"example_mama_father\"='mam-is';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nouns\" (\n \"consonant_final_stem\" text,\n \"example_k_ats_man\" text,\n \"vowel_final_stem_truncating\" text,\n \"example_mama_father\" text,\n \"vowel_final_stem_non_truncating\" text,\n \"example_sakartvelo_georgia\" text\n);\n\nQuestion: What is the example for \"father\" that has a consonant final stem of -is?"
},
{
"role": "assistant",
"content": "SELECT \"example_mama_father\" FROM \"nouns\" WHERE \"consonant_final_stem\"='-is';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What round was Ken Irvin drafted?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"player\"='ken irvin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: In what round was a player from Michigan selected?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"school_club_team\"='michigan';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.