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 \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Score of the Competition with a 5-0 Result?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"goals_for_senior_national_team\" WHERE \"result\"='5-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Date of the Competition with a Score of 4-0 and 5-0 Result?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"goals_for_senior_national_team\" WHERE \"result\"='5-0' AND \"score\"='4-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_400_bc\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the title for YI?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"list_of_state_leaders_in_400_bc\" WHERE \"name\"='yi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_400_bc\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the state song from?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"list_of_state_leaders_in_400_bc\" WHERE \"state\"='song';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_400_bc\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the state Yi?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"list_of_state_leaders_in_400_bc\" WHERE \"name\"='yi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_400_bc\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What state has the king title?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"list_of_state_leaders_in_400_bc\" WHERE \"title\"='king';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the score when the partner was arnaud cl\u00e9ment?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"partner\"='arnaud cl\u00e9ment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome when the partner was kristof vliegen?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"partner\"='kristof vliegen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Surface of the match with winner as outcome and a score of 7\u20135, 7\u20135?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"outcome\"='winner' AND \"score\"='7\u20135, 7\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome when christophe rochus was partner, on 31 july 2005?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"partner\"='christophe rochus' AND \"date\"='31 july 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponents on a clay surface with christophe rochus as partner?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"surface\"='clay' AND \"partner\"='christophe rochus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Date when christophe rochus was partner, and the score was 2\u20136, 7\u20136 (7\u20135) , 0\u20136?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"partner\"='christophe rochus' AND \"score\"='2\u20136, 7\u20136 (7\u20135) , 0\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution_name\" text,\n \"city_town\" text,\n \"state_province\" text,\n \"total_enrollment\" text,\n \"year_founded\" real\n);\n\nQuestion: In what City/town was their institution founded in 1860?" }, { "role": "assistant", "content": "SELECT \"city_town\" FROM \"members\" WHERE \"year_founded\"=1860;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution_name\" text,\n \"city_town\" text,\n \"state_province\" text,\n \"total_enrollment\" text,\n \"year_founded\" real\n);\n\nQuestion: What year was Waynesburg University founded in Pennsylvania?" }, { "role": "assistant", "content": "SELECT \"year_founded\" FROM \"members\" WHERE \"state_province\"='pennsylvania' AND \"institution_name\"='waynesburg university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution_name\" text,\n \"city_town\" text,\n \"state_province\" text,\n \"total_enrollment\" text,\n \"year_founded\" real\n);\n\nQuestion: What is Howard Payne University's total enrollment?" }, { "role": "assistant", "content": "SELECT \"total_enrollment\" FROM \"members\" WHERE \"institution_name\"='howard payne university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the To par when fredrik andersson hed was runner-up?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"european_tour_wins_7\" WHERE \"runner_s_up\"='fredrik andersson hed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Margin of victory when rhys davies was runner-up?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"european_tour_wins_7\" WHERE \"runner_s_up\"='rhys davies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Winning score when the To par was \u221221?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"european_tour_wins_7\" WHERE \"to_par\"='\u221221';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Date for the wgc-accenture match play championship?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"european_tour_wins_7\" WHERE \"tournament\"='wgc-accenture match play championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Margin of victory on 27 feb 2011?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"european_tour_wins_7\" WHERE \"date\"='27 feb 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Tournament when the winning score was 65-67-68-67=267?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"european_tour_wins_7\" WHERE \"winning_score\"='65-67-68-67=267';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missions\" (\n \"mission\" text,\n \"date\" text,\n \"launch_site\" text,\n \"motor\" text,\n \"apogee\" text\n);\n\nQuestion: Which Mission has a Apogee of 705 km?" }, { "role": "assistant", "content": "SELECT \"mission\" FROM \"missions\" WHERE \"apogee\"='705 km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missions\" (\n \"mission\" text,\n \"date\" text,\n \"launch_site\" text,\n \"motor\" text,\n \"apogee\" text\n);\n\nQuestion: What kind of Motor has a Apogee of 713 km?" }, { "role": "assistant", "content": "SELECT \"motor\" FROM \"missions\" WHERE \"apogee\"='713 km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missions\" (\n \"mission\" text,\n \"date\" text,\n \"launch_site\" text,\n \"motor\" text,\n \"apogee\" text\n);\n\nQuestion: What kind of Mission has a Apogee of 707 km?" }, { "role": "assistant", "content": "SELECT \"mission\" FROM \"missions\" WHERE \"apogee\"='707 km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missions\" (\n \"mission\" text,\n \"date\" text,\n \"launch_site\" text,\n \"motor\" text,\n \"apogee\" text\n);\n\nQuestion: Which Apogee has a Mission of maxus 3?" }, { "role": "assistant", "content": "SELECT \"apogee\" FROM \"missions\" WHERE \"mission\"='maxus 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missions\" (\n \"mission\" text,\n \"date\" text,\n \"launch_site\" text,\n \"motor\" text,\n \"apogee\" text\n);\n\nQuestion: Which Mission is on 2003 apr 1?" }, { "role": "assistant", "content": "SELECT \"mission\" FROM \"missions\" WHERE \"date\"='2003 apr 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_ratings\" (\n \"season\" text,\n \"ep_num\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"ranking\" text,\n \"viewers_households_in_millions\" text,\n \"rating\" text\n);\n\nQuestion: What was the ranking for the episode number before 24 that had a rating of 25.7?" }, { "role": "assistant", "content": "SELECT \"ranking\" FROM \"season_ratings\" WHERE \"ep_num\"<24 AND \"rating\"='25.7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_ratings\" (\n \"season\" text,\n \"ep_num\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"ranking\" text,\n \"viewers_households_in_millions\" text,\n \"rating\" text\n);\n\nQuestion: How many million viewers watched the season finale on March 12, 1979?" }, { "role": "assistant", "content": "SELECT \"viewers_households_in_millions\" FROM \"season_ratings\" WHERE \"season_finale\"='march 12, 1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_ratings\" (\n \"season\" text,\n \"ep_num\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"ranking\" text,\n \"viewers_households_in_millions\" text,\n \"rating\" text\n);\n\nQuestion: What is the rating of the season 10?" }, { "role": "assistant", "content": "SELECT \"rating\" FROM \"season_ratings\" WHERE \"season\"='season 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_ratings\" (\n \"season\" text,\n \"ep_num\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"ranking\" text,\n \"viewers_households_in_millions\" text,\n \"rating\" text\n);\n\nQuestion: What was the rating of the season that had 18.17 million household viewers?" }, { "role": "assistant", "content": "SELECT \"rating\" FROM \"season_ratings\" WHERE \"viewers_households_in_millions\"='18.17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many totals have 2 for the bronze?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"bronze\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_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 smallest silver that has a bronze less than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What college received Pick 5?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_1\" WHERE \"pick\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: For the United States International University, what was the highest pick number allowed?" }, { "role": "assistant", "content": "SELECT MAX(\"pick\") FROM \"round_1\" WHERE \"college\"='united states international university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: what was the date of the game on week 2?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"week\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"strong_verb_vowel_alternation_table\" (\n \"inf_stem\" text,\n \"sing_pres\" text,\n \"plur_pres\" text,\n \"sing_pret\" text,\n \"plur_pret\" text,\n \"subj_pres\" text,\n \"subj_pret\" text,\n \"past_part\" text\n);\n\nQuestion: What is the subjunctive present that is associated with a plural preterite of u, a singular preterite of ou, and a singular present of \u00fb?" }, { "role": "assistant", "content": "SELECT \"subj_pres\" FROM \"strong_verb_vowel_alternation_table\" WHERE \"plur_pret\"='u' AND \"sing_pret\"='ou' AND \"sing_pres\"='\u00fb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"strong_verb_vowel_alternation_table\" (\n \"inf_stem\" text,\n \"sing_pres\" text,\n \"plur_pres\" text,\n \"sing_pret\" text,\n \"plur_pret\" text,\n \"subj_pres\" text,\n \"subj_pret\" text,\n \"past_part\" text\n);\n\nQuestion: What is the plural present that has a past participle of e and an infinitive stem of e?" }, { "role": "assistant", "content": "SELECT \"plur_pres\" FROM \"strong_verb_vowel_alternation_table\" WHERE \"past_part\"='e' AND \"inf_stem\"='e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"strong_verb_vowel_alternation_table\" (\n \"inf_stem\" text,\n \"sing_pres\" text,\n \"plur_pres\" text,\n \"sing_pret\" text,\n \"plur_pret\" text,\n \"subj_pres\" text,\n \"subj_pret\" text,\n \"past_part\" text\n);\n\nQuestion: What is the infinitive stem that has a subjunctive present of ou?" }, { "role": "assistant", "content": "SELECT \"inf_stem\" FROM \"strong_verb_vowel_alternation_table\" WHERE \"subj_pres\"='ou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"strong_verb_vowel_alternation_table\" (\n \"inf_stem\" text,\n \"sing_pres\" text,\n \"plur_pres\" text,\n \"sing_pret\" text,\n \"plur_pret\" text,\n \"subj_pres\" text,\n \"subj_pret\" text,\n \"past_part\" text\n);\n\nQuestion: What is the infinitive stem that is associated with a subjunctive present of a and a plural preterite of uo?" }, { "role": "assistant", "content": "SELECT \"inf_stem\" FROM \"strong_verb_vowel_alternation_table\" WHERE \"subj_pres\"='a' AND \"plur_pret\"='uo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"strong_verb_vowel_alternation_table\" (\n \"inf_stem\" text,\n \"sing_pres\" text,\n \"plur_pres\" text,\n \"sing_pret\" text,\n \"plur_pret\" text,\n \"subj_pres\" text,\n \"subj_pret\" text,\n \"past_part\" text\n);\n\nQuestion: What is the singular present that is associated with a singular preterite of ou and a subjunctive present of ie?" }, { "role": "assistant", "content": "SELECT \"sing_pres\" FROM \"strong_verb_vowel_alternation_table\" WHERE \"sing_pret\"='ou' AND \"subj_pres\"='ie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"strong_verb_vowel_alternation_table\" (\n \"inf_stem\" text,\n \"sing_pres\" text,\n \"plur_pres\" text,\n \"sing_pret\" text,\n \"plur_pret\" text,\n \"subj_pres\" text,\n \"subj_pret\" text,\n \"past_part\" text\n);\n\nQuestion: What is the plural preterite that is associated with a subjunctive preterite of \u00fc and has an infinitive stem of e + l/r + cons.?" }, { "role": "assistant", "content": "SELECT \"plur_pret\" FROM \"strong_verb_vowel_alternation_table\" WHERE \"subj_pret\"='\u00fc' AND \"inf_stem\"='e + l/r + cons.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vessels\" (\n \"name\" text,\n \"built\" real,\n \"tonnage\" text,\n \"yard_no\" real,\n \"history\" text\n);\n\nQuestion: What is the history behind the vessel Speedrunner IV (SSC4) built after 1997?" }, { "role": "assistant", "content": "SELECT \"history\" FROM \"vessels\" WHERE \"built\">1997 AND \"name\"='speedrunner iv (ssc4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vessels\" (\n \"name\" text,\n \"built\" real,\n \"tonnage\" text,\n \"yard_no\" real,\n \"history\" text\n);\n\nQuestion: What is the most recent year that Queen Nefertiti (pegasus two) was built?" }, { "role": "assistant", "content": "SELECT MAX(\"built\") FROM \"vessels\" WHERE \"name\"='queen nefertiti (pegasus two)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vessels\" (\n \"name\" text,\n \"built\" real,\n \"tonnage\" text,\n \"yard_no\" real,\n \"history\" text\n);\n\nQuestion: What is the history behind Speedrunner III (SSC3)?" }, { "role": "assistant", "content": "SELECT \"history\" FROM \"vessels\" WHERE \"name\"='speedrunner iii (ssc3)';" } ]
[ { "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 was the opponent on november 8, 1981?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 8, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"sport\" text,\n \"record\" text,\n \"nation_athlete_s\" text,\n \"date\" text,\n \"time_seconds\" real\n);\n\nQuestion: What is the longest Time (seconds), when the Nation - athlete(s) is Sylke Otto - Germany?" }, { "role": "assistant", "content": "SELECT MAX(\"time_seconds\") FROM \"track_records\" WHERE \"nation_athlete_s\"='sylke otto - germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"sport\" text,\n \"record\" text,\n \"nation_athlete_s\" text,\n \"date\" text,\n \"time_seconds\" real\n);\n\nQuestion: What is the Date, when the Sport is luge - men's doubles, and when the Record is, \"start\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"track_records\" WHERE \"sport\"='luge - men''s doubles' AND \"record\"='start';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"sport\" text,\n \"record\" text,\n \"nation_athlete_s\" text,\n \"date\" text,\n \"time_seconds\" real\n);\n\nQuestion: What is the Nation - athlete(s), when the Sport is luge - men's singles, and when the Record is, \"track\"?" }, { "role": "assistant", "content": "SELECT \"nation_athlete_s\" FROM \"track_records\" WHERE \"sport\"='luge - men''s singles' AND \"record\"='track';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"sport\" text,\n \"record\" text,\n \"nation_athlete_s\" text,\n \"date\" text,\n \"time_seconds\" real\n);\n\nQuestion: What is the Date, when the Record is, \"track\", when the Time (seconds) is longer than 43.564, and when the Sport is luge - women's singles?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"track_records\" WHERE \"record\"='track' AND \"time_seconds\">43.564 AND \"sport\"='luge - women''s singles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_list_of_the_22_mononuclidic_ele\" (\n \"element\" text,\n \"nuclide\" text,\n \"z_p\" real,\n \"n_n\" real,\n \"isotopic_mass_u\" text\n);\n\nQuestion: What is the highest Z (p) when arsenic is the element, and the N (n) is more than 42" }, { "role": "assistant", "content": "SELECT MAX(\"z_p\") FROM \"complete_list_of_the_22_mononuclidic_ele\" WHERE \"element\"='arsenic' AND \"n_n\">42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_list_of_the_22_mononuclidic_ele\" (\n \"element\" text,\n \"nuclide\" text,\n \"z_p\" real,\n \"n_n\" real,\n \"isotopic_mass_u\" text\n);\n\nQuestion: What is the highest Z (p) when the N (n) is less than 30, and scandium is the element?" }, { "role": "assistant", "content": "SELECT AVG(\"z_p\") FROM \"complete_list_of_the_22_mononuclidic_ele\" WHERE \"n_n\"<30 AND \"element\"='scandium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_list_of_the_22_mononuclidic_ele\" (\n \"element\" text,\n \"nuclide\" text,\n \"z_p\" real,\n \"n_n\" real,\n \"isotopic_mass_u\" text\n);\n\nQuestion: What is the isotopic mass (u) when the nuclide is 89 y?" }, { "role": "assistant", "content": "SELECT \"isotopic_mass_u\" FROM \"complete_list_of_the_22_mononuclidic_ele\" WHERE \"nuclide\"='89 y';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_list_of_the_22_mononuclidic_ele\" (\n \"element\" text,\n \"nuclide\" text,\n \"z_p\" real,\n \"n_n\" real,\n \"isotopic_mass_u\" text\n);\n\nQuestion: What is the Element when the Nuclide is 55 mn?" }, { "role": "assistant", "content": "SELECT \"element\" FROM \"complete_list_of_the_22_mononuclidic_ele\" WHERE \"nuclide\"='55 mn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_australia_1911_12\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is Venue, when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"england_in_australia_1911_12\" WHERE \"date\"='23,24,26,27,28,29 feb, 1 mar 1912';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_australia_1911_12\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is Date, when Venue is Melbourne Cricket Ground, and when Result is Eng By Inns&225 Runs?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"england_in_australia_1911_12\" WHERE \"venue\"='melbourne cricket ground' AND \"result\"='eng by inns&225 runs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_australia_1911_12\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Venue is Sydney Cricket Ground, and when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"england_in_australia_1911_12\" WHERE \"venue\"='sydney cricket ground' AND \"date\"='23,24,26,27,28,29 feb, 1 mar 1912';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_australia_1911_12\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is Away Captain, when Date is 30 Dec, 1,2,3 Jan 1911/2?" }, { "role": "assistant", "content": "SELECT \"away_captain\" FROM \"england_in_australia_1911_12\" WHERE \"date\"='30 dec, 1,2,3 jan 1911/2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_australia_1911_12\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is Venue, when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"england_in_australia_1911_12\" WHERE \"date\"='23,24,26,27,28,29 feb, 1 mar 1912';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_australia_1911_12\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is Home Captain, when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912?" }, { "role": "assistant", "content": "SELECT \"home_captain\" FROM \"england_in_australia_1911_12\" WHERE \"date\"='23,24,26,27,28,29 feb, 1 mar 1912';" } ]
[ { "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\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is Catalog, when the Region is UK, and when Label is Razor Records?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"region\"='uk' AND \"label\"='razor records';" } ]
[ { "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\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the latest Date, when Label is Captain Oi! Records?" }, { "role": "assistant", "content": "SELECT MAX(\"date\") FROM \"release_history\" WHERE \"label\"='captain oi! records';" } ]
[ { "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\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is Region, when Date is 2004?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"=2004;" } ]
[ { "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\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is Catalog, when Format is CD, when Region is US, when Date is before 2004, and when Label is Taang! Records?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='cd' AND \"region\"='us' AND \"date\"<2004 AND \"label\"='taang! records';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"meistriliiga_clubs_2013\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season_in_top_division\" real,\n \"number_of_seasons_in_meistriliiga\" real,\n \"first_season_of_current_spell_in_top_division\" real,\n \"top_division_titles\" real\n);\n\nQuestion: What is the largest amount of top division titles featuring the tammeka club?" }, { "role": "assistant", "content": "SELECT MAX(\"top_division_titles\") FROM \"meistriliiga_clubs_2013\" WHERE \"club\"='tammeka';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"meistriliiga_clubs_2013\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season_in_top_division\" real,\n \"number_of_seasons_in_meistriliiga\" real,\n \"first_season_of_current_spell_in_top_division\" real,\n \"top_division_titles\" real\n);\n\nQuestion: What is the largest number of top division titles with a 2012 position of 10th?" }, { "role": "assistant", "content": "SELECT MAX(\"top_division_titles\") FROM \"meistriliiga_clubs_2013\" WHERE \"position_in_2012\"='10th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"meistriliiga_clubs_2013\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season_in_top_division\" real,\n \"number_of_seasons_in_meistriliiga\" real,\n \"first_season_of_current_spell_in_top_division\" real,\n \"top_division_titles\" real\n);\n\nQuestion: How many seasons in Meistriliiga when the club was kuressaare also had a first season in top division of more than 2000?" }, { "role": "assistant", "content": "SELECT COUNT(\"number_of_seasons_in_meistriliiga\") FROM \"meistriliiga_clubs_2013\" WHERE \"club\"='kuressaare' AND \"first_season_in_top_division\">2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"judges\" (\n \"name\" text,\n \"appointed\" real,\n \"term_expiration\" real,\n \"appointing_governor\" text,\n \"law_school_attended\" text\n);\n\nQuestion: Who attended Columbia law school and was appointed in 2004?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"judges\" WHERE \"law_school_attended\"='columbia law school' AND \"appointed\"=2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"judges\" (\n \"name\" text,\n \"appointed\" real,\n \"term_expiration\" real,\n \"appointing_governor\" text,\n \"law_school_attended\" text\n);\n\nQuestion: Which Term expiration has an Appointing Governor of george pataki, republican, and an Appointed larger than 2004?" }, { "role": "assistant", "content": "SELECT SUM(\"term_expiration\") FROM \"judges\" WHERE \"appointing_governor\"='george pataki, republican' AND \"appointed\">2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"judges\" (\n \"name\" text,\n \"appointed\" real,\n \"term_expiration\" real,\n \"appointing_governor\" text,\n \"law_school_attended\" text\n);\n\nQuestion: Which law school did judge sheila abdus-salaam attend, who was appointed in 2004?" }, { "role": "assistant", "content": "SELECT \"law_school_attended\" FROM \"judges\" WHERE \"appointed\">2004 AND \"name\"='judge sheila abdus-salaam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"races\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"season_rank\" text\n);\n\nQuestion: What is the number of races having top 5s over 2 and average starts of 6.5?" }, { "role": "assistant", "content": "SELECT \"races\" FROM \"career_statistics\" WHERE \"top_5\">2 AND \"avg_start\"=6.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"races\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"season_rank\" text\n);\n\nQuestion: What is the lowest average finish having top 5s of 0?" }, { "role": "assistant", "content": "SELECT MIN(\"avg_finish\") FROM \"career_statistics\" WHERE \"top_5\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What Volume:Issue that has Peter Cetera as the artist and was on top for longer than 1 week?" }, { "role": "assistant", "content": "SELECT \"volume_issue\" FROM \"see_also\" WHERE \"weeks_on_top\">1 AND \"artist\"='peter cetera';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the longest weeks on top when the Artist was Bruce Hornsby and the Range?" }, { "role": "assistant", "content": "SELECT MAX(\"weeks_on_top\") FROM \"see_also\" WHERE \"artist\"='bruce hornsby and the range';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Score of the game with arsenal win 4-2 on penalties in the attendance field?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"attendance\"='arsenal win 4-2 on penalties';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What team was the Away team when the Tie no was 3?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Tie no when the away team was Burnley?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"away_team\"='burnley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What shows for Tie no when Sheffield United was the Away team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"away_team\"='sheffield united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What rank is the team with 1 silver, 3 bronze and a total of less than 8 medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"overall\" WHERE \"silver\"=1 AND \"bronze\"=3 AND \"total\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: Which Balls Faced has a Average of 39.13 and Runs Scored larger than 313?" }, { "role": "assistant", "content": "SELECT SUM(\"balls_faced\") FROM \"australia\" WHERE \"average\"=39.13 AND \"runs_scored\">313;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: Which Name has an Average of 48.83?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"australia\" WHERE \"average\"=48.83;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: Which average S.R. has an Average of 39.13 and Balls Faced larger than 318?" }, { "role": "assistant", "content": "SELECT AVG(\"s_r\") FROM \"australia\" WHERE \"average\"=39.13 AND \"balls_faced\">318;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: How many S.R. that has Runs Scored of 161 and an Average larger than 26.83?" }, { "role": "assistant", "content": "SELECT SUM(\"s_r\") FROM \"australia\" WHERE \"runs_scored\"=161 AND \"average\">26.83;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: What kind of Average has a S.R. of 70.43 and Runs Scored smaller than 293?" }, { "role": "assistant", "content": "SELECT MIN(\"average\") FROM \"australia\" WHERE \"s_r\"=70.43 AND \"runs_scored\"<293;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: Which S.R. has a Average smaller than 23.63 Runs Scored of 49?" }, { "role": "assistant", "content": "SELECT \"s_r\" FROM \"australia\" WHERE \"average\"<23.63 AND \"runs_scored\"=49;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"h\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: What is the Acquisition that has less than 22, in the 2002 season?" }, { "role": "assistant", "content": "SELECT \"acquisition_via\" FROM \"h\" WHERE \"number\"<22 AND \"season\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"h\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: What is the number of the acquisition of import in the 2002 season?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"h\" WHERE \"acquisition_via\"='import' AND \"season\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"h\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: What is the name from the 2002 season, and acquired via free agency?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"h\" WHERE \"season\"='2002' AND \"acquisition_via\"='free agency';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"h\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: What is the name of the player acquired via import and larger than 22?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"h\" WHERE \"acquisition_via\"='import' AND \"number\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1876_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"prohibition_ticket\" text,\n \"greenback_ticket\" text\n);\n\nQuestion: Who was on the prohibition ticket when Abraham J. Cuddeback was on the Greenback ticket?" }, { "role": "assistant", "content": "SELECT \"prohibition_ticket\" FROM \"1876_state_election_results\" WHERE \"greenback_ticket\"='abraham j. cuddeback';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1876_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"prohibition_ticket\" text,\n \"greenback_ticket\" text\n);\n\nQuestion: Which office was Richard M. Griffin vying for on the Greenback ticket?" }, { "role": "assistant", "content": "SELECT \"office\" FROM \"1876_state_election_results\" WHERE \"greenback_ticket\"='richard m. griffin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1876_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"prohibition_ticket\" text,\n \"greenback_ticket\" text\n);\n\nQuestion: Who was on the Prohibition ticket when Thomas Armstrong ran on the Greenback ticket?" }, { "role": "assistant", "content": "SELECT \"prohibition_ticket\" FROM \"1876_state_election_results\" WHERE \"greenback_ticket\"='thomas armstrong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1876_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"prohibition_ticket\" text,\n \"greenback_ticket\" text\n);\n\nQuestion: Who was on the prohibition ticket when the Greenback ticket had Thomas Armstrong?" }, { "role": "assistant", "content": "SELECT \"prohibition_ticket\" FROM \"1876_state_election_results\" WHERE \"greenback_ticket\"='thomas armstrong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1876_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"prohibition_ticket\" text,\n \"greenback_ticket\" text\n);\n\nQuestion: Who was on the Republican ticket for the office of Inspector of state prisons?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1876_state_election_results\" WHERE \"office\"='inspector of state prisons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1876_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"prohibition_ticket\" text,\n \"greenback_ticket\" text\n);\n\nQuestion: What office did Henry Hagner run for on the prohibition ticket?" }, { "role": "assistant", "content": "SELECT \"office\" FROM \"1876_state_election_results\" WHERE \"prohibition_ticket\"='henry hagner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hits_on_german_ships\" (\n \"ship\" text,\n \"15_inch\" real,\n \"13_5_inch_1400lb\" real,\n \"13_5_inch_1250lb\" real,\n \"12_inch\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of 13.5 inch/1400 lb that has a 0 13.5 inch/1250 lb; 3 for a total and a 15 inch less than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"13_5_inch_1400lb\") FROM \"hits_on_german_ships\" WHERE \"13_5_inch_1250lb\"=0 AND \"total\"=3 AND \"15_inch\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the home of the team with a 16-8 record?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"december\" WHERE \"record\"='16-8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game that ended with a score of 96-89?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"december\" WHERE \"score\"='96-89';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: How many people went to the game with Indiana visiting?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"december\" WHERE \"visitor\"='indiana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the Cleveland home game with a 20-8 record?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"december\" WHERE \"home\"='cleveland' AND \"record\"='20-8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the New Jersey home game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"december\" WHERE \"home\"='new jersey';" } ]