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_11\" (\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: Who played home team at Victoria Park?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"venue\"='victoria park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What Season has Goals greater than 0 and less than 33 Apps?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"club_statistics\" WHERE \"goals\">0 AND \"apps\"<33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many carries for the RB averaging 4.7, and a long of over 30 yards?" }, { "role": "assistant", "content": "SELECT SUM(\"car\") FROM \"running_backs\" WHERE \"avg\"=4.7 AND \"long\">30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many yards did kevin swayne average, with a long carry over 7?" }, { "role": "assistant", "content": "SELECT MIN(\"avg\") FROM \"running_backs\" WHERE \"player\"='kevin swayne' AND \"long\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many yards for the player with over 0 TDs and an average of 2.9?" }, { "role": "assistant", "content": "SELECT MIN(\"yards\") FROM \"running_backs\" WHERE \"td_s\">0 AND \"avg\"=2.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many TDs for the player averaging over 7, and over 39 yards?" }, { "role": "assistant", "content": "SELECT MIN(\"td_s\") FROM \"running_backs\" WHERE \"avg\">7 AND \"yards\">39;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"disc_one\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What is the catalogue for Harbor Lights as a title?" }, { "role": "assistant", "content": "SELECT \"catalogue\" FROM \"disc_one\" WHERE \"song_title\"='harbor lights';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"disc_one\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What cataglogue has 27 tracks?" }, { "role": "assistant", "content": "SELECT \"catalogue\" FROM \"disc_one\" WHERE \"track\"=27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_and_former_player_information\" (\n \"name\" text,\n \"total_w_l\" text,\n \"singles_w_l\" text,\n \"doubles_w_l\" text,\n \"no_of_ties\" real,\n \"first_year_played\" real,\n \"no_of_years_played\" real\n);\n\nQuestion: Which year first played with Double W-L of 8\u20133?" }, { "role": "assistant", "content": "SELECT \"first_year_played\" FROM \"current_and_former_player_information\" WHERE \"doubles_w_l\"='8\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the height that has a year after 1983 and is named Phoenix Tower?" }, { "role": "assistant", "content": "SELECT \"height_ft_m\" FROM \"tallest_buildings\" WHERE \"year\">1983 AND \"name\"='phoenix tower';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the oldest year listed with the 1500 Louisiana Street name?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"tallest_buildings\" WHERE \"name\"='1500 louisiana street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the Height of rank 11?" }, { "role": "assistant", "content": "SELECT \"height_ft_m\" FROM \"tallest_buildings\" WHERE \"rank\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"day_boarding\" text,\n \"school_colours\" text,\n \"abbreviation\" text,\n \"in_competition_since\" real\n);\n\nQuestion: What is the largest enrollment for anglican day schools founded after 1929?" }, { "role": "assistant", "content": "SELECT MAX(\"enrolment\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"denomination\"='anglican' AND \"day_boarding\"='day' AND \"founded\">1929;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What city of license is associated with call sign w244bk?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"call_sign\"='w244bk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What city of license has a Frequency under 107.7, and a call sign of w247aq?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"frequency_m_hz\"<107.7 AND \"call_sign\"='w247aq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which team was played against on the game where Earl Watson (6) had the highest assists on January 19?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_assists\"='earl watson (6)' AND \"date\"='january 19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plural_forms\" (\n \"singular_abbreviation\" text,\n \"singular_word\" text,\n \"plural_abbreviation\" text,\n \"plural_word\" text,\n \"discipline\" text\n);\n\nQuestion: A singular abbreviation of p. is used for what singular word?" }, { "role": "assistant", "content": "SELECT \"singular_word\" FROM \"plural_forms\" WHERE \"singular_abbreviation\"='p.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plural_forms\" (\n \"singular_abbreviation\" text,\n \"singular_word\" text,\n \"plural_abbreviation\" text,\n \"plural_word\" text,\n \"discipline\" text\n);\n\nQuestion: A plural abbreviation of pp. is used for what singular word?" }, { "role": "assistant", "content": "SELECT \"singular_word\" FROM \"plural_forms\" WHERE \"plural_abbreviation\"='pp.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plural_forms\" (\n \"singular_abbreviation\" text,\n \"singular_word\" text,\n \"plural_abbreviation\" text,\n \"plural_word\" text,\n \"discipline\" text\n);\n\nQuestion: The plural word of hands uses what singular word?" }, { "role": "assistant", "content": "SELECT \"singular_word\" FROM \"plural_forms\" WHERE \"plural_word\"='hands';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plural_forms\" (\n \"singular_abbreviation\" text,\n \"singular_word\" text,\n \"plural_abbreviation\" text,\n \"plural_word\" text,\n \"discipline\" text\n);\n\nQuestion: The plural word of following lines or pages has what plural abbreviation?" }, { "role": "assistant", "content": "SELECT \"plural_abbreviation\" FROM \"plural_forms\" WHERE \"plural_word\"='following lines or pages';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plural_forms\" (\n \"singular_abbreviation\" text,\n \"singular_word\" text,\n \"plural_abbreviation\" text,\n \"plural_word\" text,\n \"discipline\" text\n);\n\nQuestion: The plural abbreviation of ll. uses what plural word?" }, { "role": "assistant", "content": "SELECT \"plural_word\" FROM \"plural_forms\" WHERE \"plural_abbreviation\"='ll.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plural_forms\" (\n \"singular_abbreviation\" text,\n \"singular_word\" text,\n \"plural_abbreviation\" text,\n \"plural_word\" text,\n \"discipline\" text\n);\n\nQuestion: The singular word of hand uses what plural word?" }, { "role": "assistant", "content": "SELECT \"plural_word\" FROM \"plural_forms\" WHERE \"singular_word\"='hand';" } ]
[ { "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: How much did the home team st kilda score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"home_team\"='st kilda';" } ]
[ { "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: When the crowd was larger than 7,500 what was the away teams score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_14\" WHERE \"crowd\">'7,500';" } ]
[ { "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's the total number of people to attend games at junction oval?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_14\" WHERE \"venue\"='junction oval';" } ]
[ { "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: When the Away team scored 11.8 (74) how many people showed up?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_14\" WHERE \"away_team_score\"='11.8 (74)';" } ]
[ { "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: How many people have attended victoria park?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_14\" WHERE \"venue\"='victoria park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"president\" (\n \"election\" real,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: How many people voted in the election of 1941?" }, { "role": "assistant", "content": "SELECT \"number_of_votes\" FROM \"president\" WHERE \"election\"=1941;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"president\" (\n \"election\" real,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: Which candidate lost the election that 770,046 people voted in?" }, { "role": "assistant", "content": "SELECT \"candidate\" FROM \"president\" WHERE \"outcome_of_election\"='lost' AND \"number_of_votes\"='770,046';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"president\" (\n \"election\" real,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: Which candidate won 61.47% of the votes?" }, { "role": "assistant", "content": "SELECT \"candidate\" FROM \"president\" WHERE \"share_of_votes\"='61.47%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"president\" (\n \"election\" real,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: What percentage of votes did the candidate win in the election of 1969?" }, { "role": "assistant", "content": "SELECT \"share_of_votes\" FROM \"president\" WHERE \"election\"=1969;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives_of_the_great_western_railway\" (\n \"manufacturer\" text,\n \"type\" text,\n \"quantity\" real,\n \"m_swj_nos\" text,\n \"gwr_nos\" text\n);\n\nQuestion: Which GWR numbers had a quantity less than 2 when the M&SWJ number was 9?" }, { "role": "assistant", "content": "SELECT \"gwr_nos\" FROM \"locomotives_of_the_great_western_railway\" WHERE \"quantity\"<2 AND \"m_swj_nos\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives_of_the_great_western_railway\" (\n \"manufacturer\" text,\n \"type\" text,\n \"quantity\" real,\n \"m_swj_nos\" text,\n \"gwr_nos\" text\n);\n\nQuestion: Which manucfaturer's type was 2-6-0?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"locomotives_of_the_great_western_railway\" WHERE \"type\"='2-6-0';" } ]
[ { "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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game when the Devils had a record of 14\u201310\u20132?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"december\" WHERE \"record\"='14\u201310\u20132';" } ]
[ { "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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the Devils had a record of 21\u201314\u20133?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"december\" WHERE \"record\"='21\u201314\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"belmont_stakes_feature_key_prep_races_li\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance\" text,\n \"surface_track\" text,\n \"winning_horse\" text,\n \"winning_jockey\" text\n);\n\nQuestion: What distance did the winning horse run in the Summer Doldrums." }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"belmont_stakes_feature_key_prep_races_li\" WHERE \"winning_horse\"='summer doldrums';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"belmont_stakes_feature_key_prep_races_li\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance\" text,\n \"surface_track\" text,\n \"winning_horse\" text,\n \"winning_jockey\" text\n);\n\nQuestion: Who is the jockey for the winning horse Rafael Bejarano?" }, { "role": "assistant", "content": "SELECT \"winning_horse\" FROM \"belmont_stakes_feature_key_prep_races_li\" WHERE \"winning_jockey\"='rafael bejarano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"belmont_stakes_feature_key_prep_races_li\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance\" text,\n \"surface_track\" text,\n \"winning_horse\" text,\n \"winning_jockey\" text\n);\n\nQuestion: What is the race with the track distance of 6 furlongs and spectacular bid stakes?" }, { "role": "assistant", "content": "SELECT \"track\" FROM \"belmont_stakes_feature_key_prep_races_li\" WHERE \"distance\"='6 furlongs' AND \"race\"='spectacular bid stakes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"belmont_stakes_feature_key_prep_races_li\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance\" text,\n \"surface_track\" text,\n \"winning_horse\" text,\n \"winning_jockey\" text\n);\n\nQuestion: what race did Dominican win with a distance of 1-1/16 miles?" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"belmont_stakes_feature_key_prep_races_li\" WHERE \"winning_horse\"='dominican' AND \"distance\"='1-1/16 miles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What tournament since 1973 has a result of 1st?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"result\"='1st' AND \"year\">1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: In what tournament was there an extra of 400 m hurdles?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"extra\"='400 m hurdles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What was the Result in Year 1973?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"achievements\" WHERE \"year\"=1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: In which year was the Tournament of european indoor championships played where the Extra was 800 m and the Result was 2nd?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"achievements\" WHERE \"extra\"='800 m' AND \"tournament\"='european indoor championships' AND \"result\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: What player is from Chula Vista, Ca?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2000_team\" WHERE \"hometown\"='chula vista, ca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"mlb_draft\" text\n);\n\nQuestion: What MLB draft has Shaun Boyd?" }, { "role": "assistant", "content": "SELECT \"mlb_draft\" FROM \"2000_team\" WHERE \"player\"='shaun boyd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the college/junior/club team (league) when the round is more than 2 and the player is bert robertsson (d)?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\">2 AND \"player\"='bert robertsson (d)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the college/junior/club team (league) when the round is less than 7?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the nhl team for round 10?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"draft_picks\" WHERE \"round\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the highest round when the player is troy creurer (d)?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"player\"='troy creurer (d)';" } ]
[ { "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: Who was the opponent on week 3?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_college_chapters_and_colonies\" (\n \"number\" real,\n \"chapter\" text,\n \"installation_date\" text,\n \"location\" text,\n \"status\" text\n);\n\nQuestion: What chapter is located in Normal, Illinois?" }, { "role": "assistant", "content": "SELECT \"chapter\" FROM \"list_of_college_chapters_and_colonies\" WHERE \"location\"='normal, illinois';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"pos\" real,\n \"postseason\" text,\n \"turkish_cup\" text\n);\n\nQuestion: What is the average position for tb2l teams promoted champion?" }, { "role": "assistant", "content": "SELECT AVG(\"pos\") FROM \"season_by_season\" WHERE \"league\"='tb2l' AND \"postseason\"='promoted champion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"pos\" real,\n \"postseason\" text,\n \"turkish_cup\" text\n);\n\nQuestion: How many teams were promoted in the postseason in a tier above 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"pos\") FROM \"season_by_season\" WHERE \"postseason\"='promoted' AND \"tier\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 Home team score At Windy Hill?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_15\" 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 \"round_15\" (\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 big of a crowd was attending the game whose Away team scored 9.10 (64)?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_15\" WHERE \"away_team_score\"='9.10 (64)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_finals_19_10_9\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who is the partner in the final with a score of 2\u20136, 7\u20136, 7\u20136?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_finals_19_10_9\" WHERE \"score_in_the_final\"='2\u20136, 7\u20136, 7\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_finals_19_10_9\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: On what surface was Ivan Lendl a partner with a runner-up outcome and final score of 2\u20136, 6\u20137?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_finals_19_10_9\" WHERE \"outcome\"='runner-up' AND \"partner\"='ivan lendl' AND \"score_in_the_final\"='2\u20136, 6\u20137';" } ]
[ { "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: What was the highest crowd at the venue MCG?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_8\" WHERE \"venue\"='mcg';" } ]
[ { "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: What is the away team score at the Windy Hill venue?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_8\" 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 \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score of the game against the pirates with over 48,308 attending?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\">'48,308' AND \"opponent\"='pirates';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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: Where was the game with a crowd of 18,817 and an away team score of 11.14 (80) held?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"crowd\">'18,817' AND \"away_team_score\"='11.14 (80)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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: Where was the game held when the home team scored 12.21 (93)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"home_team_score\"='12.21 (93)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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: Where was the game when Melbourne was the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 away score when the game was at Brunswick Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"state\" text,\n \"date\" text,\n \"winning_driver\" text\n);\n\nQuestion: How many rounds were run at Calder Park?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"calendar\" WHERE \"circuit\"='calder park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"state\" text,\n \"date\" text,\n \"winning_driver\" text\n);\n\nQuestion: In which state can you find the Sandown circuit?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"calendar\" WHERE \"circuit\"='sandown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"state\" text,\n \"date\" text,\n \"winning_driver\" text\n);\n\nQuestion: How many rounds were run in New South Wales?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"calendar\" WHERE \"state\"='new south wales';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: Who is the driver from 1969?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"by_year\" WHERE \"year\"='1969';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: Who was the driver in 1964?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"by_year\" WHERE \"year\"='1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the highest diff with drawn of 6 and play larger than 18?" }, { "role": "assistant", "content": "SELECT MAX(\"diff\") FROM \"torneo_apertura_opening_tournament\" WHERE \"drawn\"=6 AND \"played\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: How many games were played when the loss is less than 5 and points greater than 41?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"torneo_apertura_opening_tournament\" WHERE \"lost\"<5 AND \"points\">41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: How many genes are in species burkholderia pseudomallei with 4,126,292 base pairs?" }, { "role": "assistant", "content": "SELECT \"genes\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"species\"='burkholderia pseudomallei' AND \"base_pairs\"='4,126,292';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: Which strain has 1,312 genes?" }, { "role": "assistant", "content": "SELECT \"strain\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"genes\"='1,312';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: Which gene has 4,895,836 base pairs?" }, { "role": "assistant", "content": "SELECT \"genes\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"base_pairs\"='4,895,836';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: Which species has 3,441 genes?" }, { "role": "assistant", "content": "SELECT \"species\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"genes\"='3,441';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" text,\n \"genes\" text\n);\n\nQuestion: How many base pairs are there in the tohamai strain?" }, { "role": "assistant", "content": "SELECT \"base_pairs\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"strain\"='tohamai';" } ]
[ { "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 home team score at junction oval?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"venue\"='junction oval';" } ]
[ { "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 away team score at western oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"venue\"='western oval';" } ]
[ { "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 the lowest crowd at kardinia park" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_10\" WHERE \"venue\"='kardinia park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: What was the score for the tournament in Budapest?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"2008\" WHERE \"tournament\"='budapest';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Which tournament did Patrick Rafter win?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"2008\" WHERE \"winner\"='patrick rafter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Which winner won by a score of 6\u20137(4), 7\u20136(3), [11\u20139]?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"2008\" WHERE \"score\"='6\u20137(4), 7\u20136(3), [11\u20139]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: what was the score when goran ivani\u0161evi\u0107 was runner up and the tournament was in algarve?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"2008\" WHERE \"runner_up\"='goran ivani\u0161evi\u0107' AND \"tournament\"='algarve';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: What was the score when Stefan Edberg won?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"2008\" WHERE \"winner\"='stefan edberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\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: Which Away team that has a Crowd greater than 15,481, and a Home team score of 20.17 (137)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"crowd\">'15,481' AND \"home_team_score\"='20.17 (137)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 Away team score when home's score is 10.16 (76)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_5\" WHERE \"home_team_score\"='10.16 (76)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\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: Which Date has an Away team of south melbourne?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_5\" 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_5\" (\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 Away team score for mcg?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_5\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 total Crowd with a Home team of collingwood?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_5\" 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_16\" (\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: When mcg is the Venue what's the Away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: When the Away team footscray played on the Date of 19 july 1980, what was the amount of people in the Crowd?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_16\" WHERE \"date\"='19 july 1980' AND \"away_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: When the Home team of collingwood played, what was the opposing Away team score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_16\" 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_16\" (\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: When the Crowd is larger than 23,327, what Home team is playing?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"crowd\">'23,327';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: When vfl park is the venue what's the Away team playing?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"venue\"='vfl park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: If collingwood was the Home team, what Date did they play?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_16\" 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 \"existing_stadiums\" (\n \"stadium\" text,\n \"capacity\" text,\n \"club\" text,\n \"division\" text,\n \"rank_in_respective_divisions\" text\n);\n\nQuestion: What division has a Rank in Respective Divisions of 5, and is the Altrincham club?" }, { "role": "assistant", "content": "SELECT \"division\" FROM \"existing_stadiums\" WHERE \"rank_in_respective_divisions\"='5' AND \"club\"='altrincham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_stadiums\" (\n \"stadium\" text,\n \"capacity\" text,\n \"club\" text,\n \"division\" text,\n \"rank_in_respective_divisions\" text\n);\n\nQuestion: Which club has a capacity of 25138?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"existing_stadiums\" WHERE \"capacity\"='25138';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_stadiums\" (\n \"stadium\" text,\n \"capacity\" text,\n \"club\" text,\n \"division\" text,\n \"rank_in_respective_divisions\" text\n);\n\nQuestion: What Rank in Respective Divisions has a capacity of 4100?" }, { "role": "assistant", "content": "SELECT \"rank_in_respective_divisions\" FROM \"existing_stadiums\" WHERE \"capacity\"='4100';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"existing_stadiums\" (\n \"stadium\" text,\n \"capacity\" text,\n \"club\" text,\n \"division\" text,\n \"rank_in_respective_divisions\" text\n);\n\nQuestion: What stadium has a club of west ham united?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"existing_stadiums\" WHERE \"club\"='west ham united';" } ]
[ { "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 result of week 16?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=16;" } ]