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 \"promotion_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total number for the position that has less than 2 draws, less than 9 losses and more than 24?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"promotion_round\" WHERE \"drawn\"<2 AND \"lost\"<9 AND \"points\">24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the highest played with more than 0 draws, less than 3 losses, and less than 27 points?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"promotion_round\" WHERE \"drawn\">0 AND \"lost\"<3 AND \"points\"<27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total number played with 8 points and a position more than 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"promotion_round\" WHERE \"points\"=8 AND \"position\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total number played with 1 drawn, and less than 7 points?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"promotion_round\" WHERE \"drawn\"=1 AND \"points\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most silver when bronze is more than 1 and total is more than 48?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medals_table\" WHERE \"bronze\">1 AND \"total\">48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the most bronze when the total is 9?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medals_table\" WHERE \"total\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the least bronze when the nation is soviet union and the total is less than 11?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medals_table\" WHERE \"nation\"='soviet union' AND \"total\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_awards_and_nominations_received_\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What is the category when Hy Conrad nominated in 2003?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"list_of_awards_and_nominations_received_\" WHERE \"nominee_s\"='hy conrad' AND \"year\"=2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the long figure when gain is less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"long\") FROM \"rushing\" WHERE \"gain\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the loss when the average/gain is less than 16.7, gain is 104 and long is larger than 4?" }, { "role": "assistant", "content": "SELECT AVG(\"loss\") FROM \"rushing\" WHERE \"avg_g\"<16.7 AND \"long\">4 AND \"gain\"=104;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for Estonia with sc/d notes?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"quarterfinal_3\" WHERE \"notes\"='sc/d' AND \"country\"='estonia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for the rank after 5 with sc/d notes?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"quarterfinal_3\" WHERE \"notes\"='sc/d' AND \"rank\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was Law Hiu Fung's time?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"quarterfinal_3\" WHERE \"athlete\"='law hiu fung';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for the rank after 5 with sc/d notes?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"quarterfinal_3\" WHERE \"notes\"='sc/d' AND \"rank\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the highest rank for a 6:52.70 time and notes of sa/b?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"quarterfinal_3\" WHERE \"notes\"='sa/b' AND \"time\"='6:52.70';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the lowest rank that has paul biedermann as the name?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='paul biedermann';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What nationality has 2 as the rank?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"rank\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest lane that has nimrod shapira bar-or as the name?" }, { "role": "assistant", "content": "SELECT MAX(\"lane\") FROM \"semifinal_2\" WHERE \"name\"='nimrod shapira bar-or';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"work\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What is the latest year they were nominated?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"awards\" WHERE \"result\"='nominated';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"work\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What is the result of the choice tv actor: drama category?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards\" WHERE \"category\"='choice tv actor: drama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Drawn has a Position smaller than 8, and a Played smaller than 14?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"relegation_round\" WHERE \"position\"<8 AND \"played\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Points have a Drawn smaller than 2, and a Lost of 12, and a Name of ev bad w\u00f6rishofen?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"relegation_round\" WHERE \"drawn\"<2 AND \"lost\"=12 AND \"name\"='ev bad w\u00f6rishofen';" } ]
[ { "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: What place did Lee Westwood finish in?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='lee westwood';" } ]
[ { "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: What is the to par score of the player that had a score of 67-68=135?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='67-68=135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_the_individual_jury_and_telev\" (\n \"draw\" real,\n \"televote_points\" text,\n \"jury_points\" text,\n \"total\" text,\n \"final_points\" text\n);\n\nQuestion: What Televote Points had a Final Points score of 2?" }, { "role": "assistant", "content": "SELECT \"televote_points\" FROM \"results_of_the_individual_jury_and_telev\" WHERE \"final_points\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_the_individual_jury_and_telev\" (\n \"draw\" real,\n \"televote_points\" text,\n \"jury_points\" text,\n \"total\" text,\n \"final_points\" text\n);\n\nQuestion: Which Draw had 8 Televote Points?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"results_of_the_individual_jury_and_telev\" WHERE \"televote_points\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_the_individual_jury_and_telev\" (\n \"draw\" real,\n \"televote_points\" text,\n \"jury_points\" text,\n \"total\" text,\n \"final_points\" text\n);\n\nQuestion: What was the Jury Points value when there were 3 Televote Points?" }, { "role": "assistant", "content": "SELECT \"jury_points\" FROM \"results_of_the_individual_jury_and_telev\" WHERE \"televote_points\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which player was +4 to par and won the Open in 1995?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+4' AND \"year_s_won\"='1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which player has a to par of +8?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What country is ranked smaller than 2?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"repechage_2\" WHERE \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank when the time is 6:50.48?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"repechage_2\" WHERE \"time\"='6:50.48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the highest rank with the notes of sa/b, and a time of 6:39.07?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"repechage_2\" WHERE \"notes\"='sa/b' AND \"time\"='6:39.07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"repechage_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What shows for notes when rank is more than 4, and country is South Korea?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"repechage_2\" WHERE \"rank\">4 AND \"country\"='south korea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serialized_titles\" (\n \"title\" text,\n \"author\" text,\n \"first_issue\" text,\n \"last_issue\" text,\n \"completed\" text\n);\n\nQuestion: What is the First Issue date of Bamboo Blade?" }, { "role": "assistant", "content": "SELECT \"first_issue\" FROM \"serialized_titles\" WHERE \"title\"='bamboo blade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serialized_titles\" (\n \"title\" text,\n \"author\" text,\n \"first_issue\" text,\n \"last_issue\" text,\n \"completed\" text\n);\n\nQuestion: What is the First issue date of the title with a Last Issue of July 2010?" }, { "role": "assistant", "content": "SELECT \"first_issue\" FROM \"serialized_titles\" WHERE \"last_issue\"='july 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serialized_titles\" (\n \"title\" text,\n \"author\" text,\n \"first_issue\" text,\n \"last_issue\" text,\n \"completed\" text\n);\n\nQuestion: What is the First Issue date of Soul Eater?" }, { "role": "assistant", "content": "SELECT \"first_issue\" FROM \"serialized_titles\" WHERE \"title\"='soul eater';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serialized_titles\" (\n \"title\" text,\n \"author\" text,\n \"first_issue\" text,\n \"last_issue\" text,\n \"completed\" text\n);\n\nQuestion: Was the Title with a Last Issue of July 2010 completed?" }, { "role": "assistant", "content": "SELECT \"completed\" FROM \"serialized_titles\" WHERE \"last_issue\"='july 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serialized_titles\" (\n \"title\" text,\n \"author\" text,\n \"first_issue\" text,\n \"last_issue\" text,\n \"completed\" text\n);\n\nQuestion: What is the Author of the Title with a First Issue of September 2010?" }, { "role": "assistant", "content": "SELECT \"author\" FROM \"serialized_titles\" WHERE \"first_issue\"='september 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serialized_titles\" (\n \"title\" text,\n \"author\" text,\n \"first_issue\" text,\n \"last_issue\" text,\n \"completed\" text\n);\n\nQuestion: What is the Author of the Title with an Ongoing Last Issue?" }, { "role": "assistant", "content": "SELECT \"author\" FROM \"serialized_titles\" WHERE \"last_issue\"='ongoing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\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: What is the highest number of losses for Presidente Hayes, when the draws were more than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"torneo_apertura\" WHERE \"team\"='presidente hayes' AND \"draws\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\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: What is the number of wins when position was larger than 6, and conceded was smaller than 19?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"torneo_apertura\" WHERE \"position\">6 AND \"conceded\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\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: What is the number of losses when there were less than 4 draws, and points were 9?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"torneo_apertura\" WHERE \"draws\"<4 AND \"points\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\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: What is the number of wins when scored was less than 26, and conceded was larger than 23?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"torneo_apertura\" WHERE \"scored\"<26 AND \"conceded\">23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What was the series in season 2009?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"career_summary\" WHERE \"season\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What was the lowest amount of wins before season 2009 for 97 points?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"career_summary\" WHERE \"points\"=97 AND \"season\"<2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: How many wins had a podium larger than 6 after season 2008?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"career_summary\" WHERE \"season\">2008 AND \"podiums\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what is the date for the week larger than 1 and the opponent detroit lions?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">1 AND \"opponent\"='detroit lions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what is the lowest week when the attendance is 54,714?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='54,714';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_6\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which Athlete has a Reaction of 0.248?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"heat_6\" WHERE \"react\"=0.248;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_6\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which Rank has a Reaction of 0.198, and a Time smaller than 46.3?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"heat_6\" WHERE \"react\"=0.198 AND \"time\"<46.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_6\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which Lane has a Time larger than 47.83?" }, { "role": "assistant", "content": "SELECT AVG(\"lane\") FROM \"heat_6\" WHERE \"time\">47.83;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_6\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which Reaction has a Rank smaller than 4, and a Nationality of trinidad and tobago, and a Time larger than 45.13?" }, { "role": "assistant", "content": "SELECT AVG(\"react\") FROM \"heat_6\" WHERE \"rank\"<4 AND \"nationality\"='trinidad and tobago' AND \"time\">45.13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real,\n \"rank_qualifying\" real,\n \"score_qualifying\" real\n);\n\nQuestion: Count the Rank-Final which has a Year larger than 2008, and an Apparatus of balance beam, and a Rank-Qualifying larger than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank_final\") FROM \"competitive_history\" WHERE \"year\">2008 AND \"apparatus\"='balance beam' AND \"rank_qualifying\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real,\n \"rank_qualifying\" real,\n \"score_qualifying\" real\n);\n\nQuestion: Which the lowest Score-Fina has a Rank-Final of 7 and a Year larger than 2009?" }, { "role": "assistant", "content": "SELECT MIN(\"score_final\") FROM \"competitive_history\" WHERE \"rank_final\"=7 AND \"year\">2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real,\n \"rank_qualifying\" real,\n \"score_qualifying\" real\n);\n\nQuestion: Name the Year with a Rank-Final smaller than 2, an Apparatus of team, and a Score-Qualifying smaller than 248.275?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"competitive_history\" WHERE \"rank_final\"<2 AND \"apparatus\"='team' AND \"score_qualifying\"<248.275;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What's the pick for the New York jets with a defensive end?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"fifth_round\" WHERE \"position\"='defensive end' AND \"team\"='new york jets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What's the pick for Georgia tech?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"fifth_round\" WHERE \"college\"='georgia tech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who plays halfback?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"fifth_round\" WHERE \"position\"='halfback';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the team for Washington College?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"fifth_round\" WHERE \"college\"='washington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_largest_crowds\" (\n \"rank\" real,\n \"attendance\" real,\n \"visiting_team\" text,\n \"date\" text,\n \"result\" text\n);\n\nQuestion: What is the Rank of the game with an Attendance of 93,039?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"top_10_largest_crowds\" WHERE \"attendance\"='93,039';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"engine\" text,\n \"displacement\" text,\n \"valvetrain\" text,\n \"fuel_system\" text,\n \"max_power_at_rpm\" text,\n \"max_torque_at_rpm\" text,\n \"years\" text\n);\n\nQuestion: What fuel system does the diesel engines model have?" }, { "role": "assistant", "content": "SELECT \"fuel_system\" FROM \"engines\" WHERE \"model\"='diesel engines';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"engine\" text,\n \"displacement\" text,\n \"valvetrain\" text,\n \"fuel_system\" text,\n \"max_power_at_rpm\" text,\n \"max_torque_at_rpm\" text,\n \"years\" text\n);\n\nQuestion: What is the displacement for the petrol engines model?" }, { "role": "assistant", "content": "SELECT \"displacement\" FROM \"engines\" WHERE \"model\"='petrol engines';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the size of the 2009 electorate for Gwalior Rural?" }, { "role": "assistant", "content": "SELECT \"number_of_electorates_2009\" FROM \"assembly_segments\" WHERE \"name\"='gwalior rural';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: Who was eliminated that entered after number 3 and lasted 35:55?" }, { "role": "assistant", "content": "SELECT \"eliminated\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"entered\">3 AND \"time\"='35:55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the average year in which the finish position was 13th?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"position\"='13th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the average year for the Olympic Games?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"competition\"='olympic games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label of the September 20, 2008 release with Catalog number RTRADCD491?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='rtradcd491' AND \"date\"='september 20, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Format of the September 22, 2008 release with Catalog number RTRADCD491?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='rtradcd491' AND \"date\"='september 22, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Format of the release with Catalog number RTRADLP491?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='rtradlp491';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label of the Release with Catalog number 2508668?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='2508668';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Format of the release with Catalog number 2508668?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='2508668';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Region of the Warner Music Canada Label release?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"label\"='warner music canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who were the developers for Portal?" }, { "role": "assistant", "content": "SELECT \"developer_s\" FROM \"list_of_game_of_the_year_awards\" WHERE \"game\"='portal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who were the developers for the Action RPG made after 2010?" }, { "role": "assistant", "content": "SELECT \"developer_s\" FROM \"list_of_game_of_the_year_awards\" WHERE \"year\">2010 AND \"genre\"='action rpg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airlines_based_in_changi\" (\n \"airline\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Which Callsign has an IATA of tr?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"airlines_based_in_changi\" WHERE \"iata\"='tr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airlines_based_in_changi\" (\n \"airline\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Which Commenced operations have an Airline of valuair?" }, { "role": "assistant", "content": "SELECT \"commenced_operations\" FROM \"airlines_based_in_changi\" WHERE \"airline\"='valuair';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airlines_based_in_changi\" (\n \"airline\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Which Commenced operations have an Airline of valuair?" }, { "role": "assistant", "content": "SELECT MAX(\"commenced_operations\") FROM \"airlines_based_in_changi\" WHERE \"airline\"='valuair';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airlines_based_in_changi\" (\n \"airline\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Which IATA has a ICAO of slk?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"airlines_based_in_changi\" WHERE \"icao\"='slk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_watched_programmes\" (\n \"rank\" real,\n \"series\" text,\n \"episode_title\" text,\n \"viewers\" real,\n \"date\" text\n);\n\nQuestion: How many Viewers have a Rank smaller than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"viewers\") FROM \"most_watched_programmes\" WHERE \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the longitude for the Township that has a ANSI code less than 1036534, a water (sqmi) of 0, and a GEO ID greater than 3809959540?" }, { "role": "assistant", "content": "SELECT COUNT(\"longitude\") FROM \"o\" WHERE \"ansi_code\"<1036534 AND \"water_sqmi\"=0 AND \"geo_id\">3809959540;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the population in 2010 for the longitude of -97.578927?" }, { "role": "assistant", "content": "SELECT COUNT(\"pop_2010\") FROM \"o\" WHERE \"longitude\"=-97.578927;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the total population in 2010 for the township located in Mountrail which has land less than 34.424 sq miles and a GEO ID less than 3806159940?" }, { "role": "assistant", "content": "SELECT SUM(\"pop_2010\") FROM \"o\" WHERE \"land_sqmi\"<34.424 AND \"county\"='mountrail' AND \"geo_id\"<3806159940;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the highest recorded latitude for the township that has an ANSI code greater than 1759541 and a population in 2010 of 72?" }, { "role": "assistant", "content": "SELECT MAX(\"latitude\") FROM \"o\" WHERE \"ansi_code\">1759541 AND \"pop_2010\"=72;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Which Athlete has a Rank larger than 1, and a Lane larger than 7, and a Nationality of china?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"semifinal_2\" WHERE \"rank\">1 AND \"lane\">7 AND \"nationality\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: How many Lanes have a Time larger than 13.59, and a Rank larger than 8?" }, { "role": "assistant", "content": "SELECT SUM(\"lane\") FROM \"semifinal_2\" WHERE \"time\">13.59 AND \"rank\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: How many lanes have a Nationality of france, and a Rank larger than 8?" }, { "role": "assistant", "content": "SELECT SUM(\"lane\") FROM \"semifinal_2\" WHERE \"nationality\"='france' AND \"rank\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_spot\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What game was developed by Nintendo for the Gamecube platform?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"game_spot\" WHERE \"developer_s\"='nintendo' AND \"platform_s\"='gamecube';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_spot\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the genre of Super Mario Galaxy?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"game_spot\" WHERE \"game\"='super mario galaxy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" real,\n \"population\" real,\n \"five_year_pct_change\" text,\n \"ten_year_pct_change\" text,\n \"rank_among_provinces\" real\n);\n\nQuestion: What is the average year having a rank among provinces over 5 and ten-year percentage change of 67.3?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"demography\" WHERE \"ten_year_pct_change\"='67.3' AND \"rank_among_provinces\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" real,\n \"population\" real,\n \"five_year_pct_change\" text,\n \"ten_year_pct_change\" text,\n \"rank_among_provinces\" real\n);\n\nQuestion: What is the highest population for the province having a rank under 5?" }, { "role": "assistant", "content": "SELECT MAX(\"population\") FROM \"demography\" WHERE \"rank_among_provinces\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" real,\n \"population\" real,\n \"five_year_pct_change\" text,\n \"ten_year_pct_change\" text,\n \"rank_among_provinces\" real\n);\n\nQuestion: What is the number of population values having a rank among provinces under 5 with a five-year percentage change of 3.6?" }, { "role": "assistant", "content": "SELECT COUNT(\"population\") FROM \"demography\" WHERE \"five_year_pct_change\"='3.6' AND \"rank_among_provinces\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" real,\n \"population\" real,\n \"five_year_pct_change\" text,\n \"ten_year_pct_change\" text,\n \"rank_among_provinces\" real\n);\n\nQuestion: What is the highest year having a ten-year percentage change of 7.9?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"demography\" WHERE \"ten_year_pct_change\"='7.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What's the comp for 1998-04-22?" }, { "role": "assistant", "content": "SELECT \"comp\" FROM \"1998_in_paraguayan_football\" WHERE \"date\"='1998-04-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What's the score at Olympic Stadium Tokyo, Japan?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"1998_in_paraguayan_football\" WHERE \"venue\"='olympic stadium tokyo, japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What's the comp in Olympic Stadium Tokyo, Japan?" }, { "role": "assistant", "content": "SELECT \"comp\" FROM \"1998_in_paraguayan_football\" WHERE \"venue\"='olympic stadium tokyo, japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What's the report in King Baudouin Stadium Brussels, Belgium?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"1998_in_paraguayan_football\" WHERE \"venue\"='king baudouin stadium brussels, belgium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eliminated_contestants_weigh_in_results\" (\n \"contestant\" text,\n \"starting_weight_kg\" real,\n \"final_weight_kg\" real,\n \"weight_lost_kg\" real,\n \"percentage_lost\" text,\n \"position_out_of_eliminated_contestants\" text\n);\n\nQuestion: What is the Percentage Lost for the contestant with a starting weight above 102 kg who lost 46.9 kg?" }, { "role": "assistant", "content": "SELECT \"percentage_lost\" FROM \"eliminated_contestants_weigh_in_results\" WHERE \"starting_weight_kg\">102 AND \"weight_lost_kg\"=46.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What lane has a time of 1:57.71?" }, { "role": "assistant", "content": "SELECT SUM(\"lane\") FROM \"semifinal_2\" WHERE \"time\"='1:57.71';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Who had a larger rank than 3, less than 6 lanes, and a time of 1:58.15?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_2\" WHERE \"rank\">3 AND \"lane\"<6 AND \"time\"='1:58.15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"registered_births_and_deaths\" (\n \"average_population_x_1000\" real,\n \"live_births\" text,\n \"deaths\" text,\n \"natural_change\" text,\n \"crude_birth_rate_per_1000\" real,\n \"crude_death_rate_per_1000\" real,\n \"natural_change_per_1000\" real\n);\n\nQuestion: Which Crude death rate (per 1000) has Deaths of 768, and a Crude birth rate (per 1000) smaller than 29.7?" }, { "role": "assistant", "content": "SELECT MIN(\"crude_death_rate_per_1000\") FROM \"registered_births_and_deaths\" WHERE \"deaths\"='768' AND \"crude_birth_rate_per_1000\"<29.7;" } ]