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 \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many points did the home team Essendon score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"home_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"actor\" text,\n \"character\" text,\n \"duration\" text,\n \"no_of_series\" text,\n \"episodes\" real\n);\n\nQuestion: What character is in over 22 episodes?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"cast\" WHERE \"episodes\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"actor\" text,\n \"character\" text,\n \"duration\" text,\n \"no_of_series\" text,\n \"episodes\" real\n);\n\nQuestion: What is the lowest number of episodes for anabel barnston?" }, { "role": "assistant", "content": "SELECT MIN(\"episodes\") FROM \"cast\" WHERE \"actor\"='anabel barnston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"actor\" text,\n \"character\" text,\n \"duration\" text,\n \"no_of_series\" text,\n \"episodes\" real\n);\n\nQuestion: What character is played by dani harmer for under 23 episodes?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"cast\" WHERE \"episodes\"<23 AND \"actor\"='dani harmer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"actor\" text,\n \"character\" text,\n \"duration\" text,\n \"no_of_series\" text,\n \"episodes\" real\n);\n\nQuestion: How many episodes have a duration of 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"episodes\") FROM \"cast\" WHERE \"duration\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the home team score 22.11 (143)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" WHERE \"home_team_score\"='22.11 (143)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the home team whose opponent scored 18.16 (124)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"away_team_score\"='18.16 (124)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the size of the crowd for the game where the away team scored 18.16 (124)?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_14\" WHERE \"away_team_score\"='18.16 (124)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the away team who play Collingwood?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_14\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date did Collingwood play as the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"owned_and_operated\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_rf\" text,\n \"year_of_affiliation\" real,\n \"year_of_disaffiliation\" real\n);\n\nQuestion: What is the most recent year of disaffiliation of a CHCH-TV station that affiliated after 2001?" }, { "role": "assistant", "content": "SELECT MAX(\"year_of_disaffiliation\") FROM \"owned_and_operated\" WHERE \"station\"='chch-tv' AND \"year_of_affiliation\">2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"owned_and_operated\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_rf\" text,\n \"year_of_affiliation\" real,\n \"year_of_disaffiliation\" real\n);\n\nQuestion: What is the earliest year of disaffiliation of a CHCH-TV station, licensed in Hamilton, Ontario?" }, { "role": "assistant", "content": "SELECT MIN(\"year_of_disaffiliation\") FROM \"owned_and_operated\" WHERE \"city_of_license_market\"='hamilton, ontario';" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals did west germany win when they had less than 2 silver medals?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='west germany' AND \"silver\"<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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals were won when the total was larger than 2 and the more than 2 gold medals were won?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"total\">2 AND \"gold\">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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals were won when more than 2 bronze medals were won?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") 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 \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What was the PI GP fpr pick# 235 for Rd# larger than 12?" }, { "role": "assistant", "content": "SELECT MIN(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pick_num\"=235 AND \"rd_num\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the largest crowd when South Melbourne was the away team?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_10\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is richmond's scores when they are the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is south melbourne's scores when they are the away team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What dates were the matches at windy hill?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_10\" WHERE \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average number of laps for the driver Piero Taruffi?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"driver\"='piero taruffi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver has 12 laps and a grid of less than 10?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"=12 AND \"grid\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"design\" text,\n \"illustration\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the Illustration with a Design of tim nokes, and a First Day Cover Cancellation with calgary, alberta?" }, { "role": "assistant", "content": "SELECT \"illustration\" FROM \"2008\" WHERE \"design\"='tim nokes' AND \"first_day_cover_cancellation\"='calgary, alberta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"design\" text,\n \"illustration\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the Date of Issue with a Theme with mental health?" }, { "role": "assistant", "content": "SELECT \"date_of_issue\" FROM \"2008\" WHERE \"theme\"='mental health';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"design\" text,\n \"illustration\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the Theme with a Design with sputnik design partners?" }, { "role": "assistant", "content": "SELECT \"theme\" FROM \"2008\" WHERE \"design\"='sputnik design partners';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"design\" text,\n \"illustration\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the Paper Type with a First Day Cover Cancellation with ottawa, on?" }, { "role": "assistant", "content": "SELECT \"paper_type\" FROM \"2008\" WHERE \"first_day_cover_cancellation\"='ottawa, on';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"design\" text,\n \"illustration\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the Paper Type with an Illustration with martin dee, ubc public affairs?" }, { "role": "assistant", "content": "SELECT \"paper_type\" FROM \"2008\" WHERE \"illustration\"='martin dee, ubc public affairs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"date_of_issue\" text,\n \"theme\" text,\n \"design\" text,\n \"illustration\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the Theme with a Paper Type of tullis russell coatings, and a Date with Issue of 1 october 2008?" }, { "role": "assistant", "content": "SELECT \"theme\" FROM \"2008\" WHERE \"paper_type\"='tullis russell coatings' AND \"date_of_issue\"='1 october 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the tie number when the away team is Lewes?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"away_team\"='lewes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the away team when the home team is Cheltenham Town?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"home_team\"='cheltenham town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the home team of the game with tie number 34?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the away team of the game with tie number 31?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many goals for were scored for the team(s) that won fewer than 4 games and lost more than 6?" }, { "role": "assistant", "content": "SELECT SUM(\"goals_for\") FROM \"final_standing\" WHERE \"wins\"<4 AND \"losses\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the average losses for the team(s) that played more than 8 games?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"final_standing\" WHERE \"games_played\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet_details\" (\n \"class\" text,\n \"type\" text,\n \"introduced\" text,\n \"fleet_size\" real,\n \"numbers\" text\n);\n\nQuestion: What is the fleet size of the Vanguard 0-6-0dh class?" }, { "role": "assistant", "content": "SELECT \"fleet_size\" FROM \"fleet_details\" WHERE \"class\"='vanguard 0-6-0dh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet_details\" (\n \"class\" text,\n \"type\" text,\n \"introduced\" text,\n \"fleet_size\" real,\n \"numbers\" text\n);\n\nQuestion: What is the year of introduction for the Electro-Diesel locomotive?" }, { "role": "assistant", "content": "SELECT \"introduced\" FROM \"fleet_details\" WHERE \"type\"='electro-diesel locomotive';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet_details\" (\n \"class\" text,\n \"type\" text,\n \"introduced\" text,\n \"fleet_size\" real,\n \"numbers\" text\n);\n\nQuestion: What is the average fleet size for the Shunter type introduced in 1959?" }, { "role": "assistant", "content": "SELECT AVG(\"fleet_size\") FROM \"fleet_details\" WHERE \"type\"='shunter' AND \"introduced\"='1959';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet_details\" (\n \"class\" text,\n \"type\" text,\n \"introduced\" text,\n \"fleet_size\" real,\n \"numbers\" text\n);\n\nQuestion: What is the smallest fleet size with a type of shunter introduced in 1953?" }, { "role": "assistant", "content": "SELECT MIN(\"fleet_size\") FROM \"fleet_details\" WHERE \"type\"='shunter' AND \"introduced\"='1953';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"time_slot_est\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_overall\" text\n);\n\nQuestion: What show that was aired on January 24, 2008 with a rating larger than 3.6 had the lowest viewers? How Many Viewers in the millions?" }, { "role": "assistant", "content": "SELECT MIN(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"air_date\"='january 24, 2008' AND \"rating\">3.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which round has a car with a chassis of sf01?" }, { "role": "assistant", "content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"chassis\"='sf01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Which country has swimsuit more than 9.46 and interview more than 9.22 with average less than 9.6?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"scores\" WHERE \"average\"<9.6 AND \"interview\">9.22 AND \"swimsuit\">9.46;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Which is the total number of evening gowns for swimsui less than 9.36 and average less than 9.23?" }, { "role": "assistant", "content": "SELECT COUNT(\"evening_gown\") FROM \"scores\" WHERE \"swimsuit\"<9.36 AND \"average\"<9.23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the lowest average for interview more than 9.57 and delaware and evening gown more than 9.77" }, { "role": "assistant", "content": "SELECT MIN(\"average\") FROM \"scores\" WHERE \"interview\">9.57 AND \"country\"='delaware' AND \"evening_gown\">9.77;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the sum of swimsuit for average more than 9.23 for delaware for interview more than 9.73" }, { "role": "assistant", "content": "SELECT SUM(\"swimsuit\") FROM \"scores\" WHERE \"average\">9.23 AND \"country\"='delaware' AND \"interview\">9.73;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the sum of average for interview more than 9.57 and swimsuit more than 9.65" }, { "role": "assistant", "content": "SELECT SUM(\"average\") FROM \"scores\" WHERE \"interview\">9.57 AND \"swimsuit\">9.65;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the evening gown for swimsuit more than 9.51 for maryland" }, { "role": "assistant", "content": "SELECT \"evening_gown\" FROM \"scores\" WHERE \"swimsuit\">9.51 AND \"country\"='maryland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ranking_points\" (\n \"finishing_position\" text,\n \"points_awarded_platinum\" real,\n \"points_awarded_gold\" real,\n \"points_awarded_silver\" real,\n \"points_awarded_satellite\" real\n);\n\nQuestion: What points awarded are higher than 6 but smaller than 9" }, { "role": "assistant", "content": "SELECT MAX(\"points_awarded_platinum\") FROM \"ranking_points\" WHERE \"points_awarded_gold\"=9 AND \"points_awarded_silver\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: In the Canadian Grand Prix, what tyre was used when Jacky Ickx held pole position?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"season_review\" WHERE \"pole_position\"='jacky ickx' AND \"race\"='canadian grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: When Jackie Stewart had the fastest lap and Jochen Rindt held the pole position with a D tyre, what was the circuit?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"season_review\" WHERE \"tyre\"='d' AND \"pole_position\"='jochen rindt' AND \"fastest_lap\"='jackie stewart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What was the circuit when Jochen Rindt won?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"season_review\" WHERE \"winning_driver\"='jochen rindt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What tyre was used in Kyalami?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"season_review\" WHERE \"circuit\"='kyalami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver had a grid number of 10?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which constructor had a grid number of less than 3 and where the Time/Retired was 1:34:31.522?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"<3 AND \"time_retired\"='1:34:31.522';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which constructor had a Time/Retired of collision, where the grid number was less than 18 and Nick Heidfeld was the driver?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='collision' AND \"grid\"<18 AND \"driver\"='nick heidfeld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score for the record 20-14 when the attendance was over 35,196 and the Indians were opponents?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\">'35,196' AND \"opponent\"='indians' AND \"record\"='20-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record on May 20?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What is the height in feet of player number 24?" }, { "role": "assistant", "content": "SELECT \"height_in_ft\" FROM \"a\" WHERE \"no_s\"='24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Who is the school, club, team or country that the Rockets played for 1967-68?" }, { "role": "assistant", "content": "SELECT \"school_club_team_country\" FROM \"a\" WHERE \"years_for_rockets\"='1967-68';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: Which player has a Position of infielder, and a Hometown of atlanta, ga?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"1995_team\" WHERE \"position\"='infielder' AND \"hometown\"='atlanta, ga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: What MLB draft has a School of green valley high school?" }, { "role": "assistant", "content": "SELECT \"mlb_draft\" FROM \"1995_team\" WHERE \"school\"='green valley high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: Which position has a School of green valley high school?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"1995_team\" WHERE \"school\"='green valley high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: Which position has a Player of chad hutchinson?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"1995_team\" WHERE \"player\"='chad hutchinson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: Which position has a School of petal high school?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"1995_team\" WHERE \"school\"='petal high school';" } ]
[ { "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 of week 8?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=8;" } ]
[ { "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: Which week has the lowest attendance of 48,102?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='48,102';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_day_international_cricket_man_of_the\" (\n \"runs\" text,\n \"against\" text,\n \"city_country\" text,\n \"venue\" text,\n \"result\" text,\n \"year\" text\n);\n\nQuestion: What was the year with runs of 144?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"one_day_international_cricket_man_of_the\" WHERE \"runs\"='144';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_day_international_cricket_man_of_the\" (\n \"runs\" text,\n \"against\" text,\n \"city_country\" text,\n \"venue\" text,\n \"result\" text,\n \"year\" text\n);\n\nQuestion: Name the place where adelaide oval is" }, { "role": "assistant", "content": "SELECT \"city_country\" FROM \"one_day_international_cricket_man_of_the\" WHERE \"venue\"='adelaide oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"stations\" text,\n \"place\" text,\n \"managed_by\" text,\n \"platforms\" real,\n \"zone\" real\n);\n\nQuestion: Name the average zone for waddon marsh tram stop" }, { "role": "assistant", "content": "SELECT AVG(\"zone\") FROM \"w\" WHERE \"stations\"='waddon marsh tram stop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"stations\" text,\n \"place\" text,\n \"managed_by\" text,\n \"platforms\" real,\n \"zone\" real\n);\n\nQuestion: Name the stations for zone 5 and 1 platform by tramlink" }, { "role": "assistant", "content": "SELECT \"stations\" FROM \"w\" WHERE \"managed_by\"='tramlink' AND \"zone\"=5 AND \"platforms\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"stations\" text,\n \"place\" text,\n \"managed_by\" text,\n \"platforms\" real,\n \"zone\" real\n);\n\nQuestion: Name the total number of platforms that waddon railway station has" }, { "role": "assistant", "content": "SELECT COUNT(\"platforms\") FROM \"w\" WHERE \"stations\"='waddon railway station';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"stations\" text,\n \"place\" text,\n \"managed_by\" text,\n \"platforms\" real,\n \"zone\" real\n);\n\nQuestion: Name the average zone for waddon railway station and has more than 2 platforms" }, { "role": "assistant", "content": "SELECT AVG(\"zone\") FROM \"w\" WHERE \"stations\"='waddon railway station' AND \"platforms\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Bob Ostovich's opponents record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='bob ostovich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What location is Jimmy Smith fighting in?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jimmy smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"d_47\" text,\n \"d_48\" text,\n \"d_49\" text,\n \"d_50\" text\n);\n\nQuestion: I want to know the D 49 + for D 42 \u221a of d 42 \u221a" }, { "role": "assistant", "content": "SELECT \"d_49\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_42\"='d 42 \u221a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"d_47\" text,\n \"d_48\" text,\n \"d_49\" text,\n \"d_50\" text\n);\n\nQuestion: Tell me the D 50 + for D 48 + of d 53 +" }, { "role": "assistant", "content": "SELECT \"d_50\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_48\"='d 53 +';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"d_47\" text,\n \"d_48\" text,\n \"d_49\" text,\n \"d_50\" text\n);\n\nQuestion: I want to know the D 47 for D 46 O of majority\u2192" }, { "role": "assistant", "content": "SELECT \"d_47\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_46_o\"='majority\u2192';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"coach\" text,\n \"season\" text,\n \"record\" text,\n \"home\" text,\n \"away\" text,\n \"win_pct\" real,\n \"average_total_home_attendance\" text\n);\n\nQuestion: What is the sum of all win% with average home/total attendance of 3,927 (19,633)?" }, { "role": "assistant", "content": "SELECT SUM(\"win_pct\") FROM \"year_by_year_performance\" WHERE \"average_total_home_attendance\"='3,927 (19,633)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"coach\" text,\n \"season\" text,\n \"record\" text,\n \"home\" text,\n \"away\" text,\n \"win_pct\" real,\n \"average_total_home_attendance\" text\n);\n\nQuestion: What is the away score with a record of 7-4, win% of 0.637, and 2010 season?" }, { "role": "assistant", "content": "SELECT \"away\" FROM \"year_by_year_performance\" WHERE \"record\"='7-4' AND \"win_pct\"=0.637 AND \"season\"='2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"coach\" text,\n \"season\" text,\n \"record\" text,\n \"home\" text,\n \"away\" text,\n \"win_pct\" real,\n \"average_total_home_attendance\" text\n);\n\nQuestion: What was the lowest win% with an away score of 3-2 in 2011 season?" }, { "role": "assistant", "content": "SELECT MIN(\"win_pct\") FROM \"year_by_year_performance\" WHERE \"away\"='3-2' AND \"season\"='2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"coach\" text,\n \"season\" text,\n \"record\" text,\n \"home\" text,\n \"away\" text,\n \"win_pct\" real,\n \"average_total_home_attendance\" text\n);\n\nQuestion: What was the away score with a win% of 0.75 and average total/home attendance of 4,686 (18,744)?" }, { "role": "assistant", "content": "SELECT \"away\" FROM \"year_by_year_performance\" WHERE \"win_pct\"=0.75 AND \"average_total_home_attendance\"='4,686 (18,744)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"coach\" text,\n \"season\" text,\n \"record\" text,\n \"home\" text,\n \"away\" text,\n \"win_pct\" real,\n \"average_total_home_attendance\" text\n);\n\nQuestion: What is the lowest win% in the 1999-2013 season?" }, { "role": "assistant", "content": "SELECT MIN(\"win_pct\") FROM \"year_by_year_performance\" WHERE \"season\"='1999-2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_american_meetings\" (\n \"year\" real,\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text\n);\n\nQuestion: What's the record during 1925?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"the_american_meetings\" WHERE \"year\"=1925;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_american_meetings\" (\n \"year\" real,\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text\n);\n\nQuestion: What is the earliest year that the discus throw event occur?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"the_american_meetings\" WHERE \"event\"='discus throw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_by_ward\" (\n \"ward\" text,\n \"bello\" text,\n \"ben_tahir\" text,\n \"doucet\" text,\n \"furtenbacher\" text,\n \"gauthier\" text,\n \"haydon\" text,\n \"larter\" text,\n \"lawrance\" text,\n \"libweshya\" text,\n \"liscumb\" text\n);\n\nQuestion: What Haydon had a 33 Ben-Tahir?" }, { "role": "assistant", "content": "SELECT \"haydon\" FROM \"results_by_ward\" WHERE \"ben_tahir\"='33';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_by_ward\" (\n \"ward\" text,\n \"bello\" text,\n \"ben_tahir\" text,\n \"doucet\" text,\n \"furtenbacher\" text,\n \"gauthier\" text,\n \"haydon\" text,\n \"larter\" text,\n \"lawrance\" text,\n \"libweshya\" text,\n \"liscumb\" text\n);\n\nQuestion: What Gauthier had a 15 Liscumb?" }, { "role": "assistant", "content": "SELECT \"gauthier\" FROM \"results_by_ward\" WHERE \"liscumb\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_by_ward\" (\n \"ward\" text,\n \"bello\" text,\n \"ben_tahir\" text,\n \"doucet\" text,\n \"furtenbacher\" text,\n \"gauthier\" text,\n \"haydon\" text,\n \"larter\" text,\n \"lawrance\" text,\n \"libweshya\" text,\n \"liscumb\" text\n);\n\nQuestion: What Ben-Tahir has a 6 Liscumb and 3 Libweshya?" }, { "role": "assistant", "content": "SELECT \"ben_tahir\" FROM \"results_by_ward\" WHERE \"liscumb\"='6' AND \"libweshya\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_by_ward\" (\n \"ward\" text,\n \"bello\" text,\n \"ben_tahir\" text,\n \"doucet\" text,\n \"furtenbacher\" text,\n \"gauthier\" text,\n \"haydon\" text,\n \"larter\" text,\n \"lawrance\" text,\n \"libweshya\" text,\n \"liscumb\" text\n);\n\nQuestion: What Bello has a 27 Liscumb and 6539 Libweshya?" }, { "role": "assistant", "content": "SELECT \"bello\" FROM \"results_by_ward\" WHERE \"liscumb\"='27' AND \"libweshya\"='6539';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_by_ward\" (\n \"ward\" text,\n \"bello\" text,\n \"ben_tahir\" text,\n \"doucet\" text,\n \"furtenbacher\" text,\n \"gauthier\" text,\n \"haydon\" text,\n \"larter\" text,\n \"lawrance\" text,\n \"libweshya\" text,\n \"liscumb\" text\n);\n\nQuestion: What is the Furtenbacher with a 6 Liscumb, 10 Lawrance, and a 24 Ben-Tahir?" }, { "role": "assistant", "content": "SELECT \"furtenbacher\" FROM \"results_by_ward\" WHERE \"liscumb\"='6' AND \"lawrance\"='10' AND \"ben_tahir\"='24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_by_ward\" (\n \"ward\" text,\n \"bello\" text,\n \"ben_tahir\" text,\n \"doucet\" text,\n \"furtenbacher\" text,\n \"gauthier\" text,\n \"haydon\" text,\n \"larter\" text,\n \"lawrance\" text,\n \"libweshya\" text,\n \"liscumb\" text\n);\n\nQuestion: What is the Ben-Tahir with a 3269 Doucet?" }, { "role": "assistant", "content": "SELECT \"ben_tahir\" FROM \"results_by_ward\" WHERE \"doucet\"='3269';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many attended the game that was a Loss of k. gross (1-1)?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"loss\"='k. gross (1-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\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 tie number 65?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"replays\" WHERE \"tie_no\"='65';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Home team had attendance 160?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"replays\" WHERE \"attendance\"='160';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game with a decision of Ellis and Vancouver as the visitor?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"february\" WHERE \"decision\"='ellis' AND \"visitor\"='vancouver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game with Mason as the decision and Nashville as the home team?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"february\" WHERE \"decision\"='mason' AND \"home\"='nashville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the date with Ellis as the decision and St. Louis as the visitor?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"decision\"='ellis' AND \"visitor\"='st. louis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which visiting team had a record of 31\u201331\u20138?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"march\" WHERE \"record\"='31\u201331\u20138';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Where is Jeff Lebo's hometown?" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"1985_boys_team\" WHERE \"player\"='jeff lebo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Who is the player from Houston, TX?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"1985_boys_team\" WHERE \"hometown\"='houston, tx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the earliest year with an entry from Rotary Watches Stanley BRM and a BRM P207 with more than 0 points?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='rotary watches stanley brm' AND \"chassis\"='brm p207' AND \"points\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points were there in a year earlier than 1977, a Cosworth V8 engine, and an entry from HB Bewaking alarm systems?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1977 AND \"engine\"='cosworth v8' AND \"entrant\"='hb bewaking alarm systems';" } ]