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 \"united_states_irs_forms_990_for_competit\" (\n \"organization_name\" text,\n \"state\" text,\n \"year\" real,\n \"total_assets\" text,\n \"form\" real,\n \"pages\" real\n);\n\nQuestion: How many forms have less than 18 pages?" }, { "role": "assistant", "content": "SELECT COUNT(\"form\") FROM \"united_states_irs_forms_990_for_competit\" WHERE \"pages\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_irs_forms_990_for_competit\" (\n \"organization_name\" text,\n \"state\" text,\n \"year\" real,\n \"total_assets\" text,\n \"form\" real,\n \"pages\" real\n);\n\nQuestion: What is the sum of forms with greater than 17 pages and a total of $1,801,154?" }, { "role": "assistant", "content": "SELECT SUM(\"form\") FROM \"united_states_irs_forms_990_for_competit\" WHERE \"pages\">17 AND \"total_assets\"='$1,801,154';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\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 venue hosted South Melbourne?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_2\" 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_2\" (\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 scored of the Away team that played against Richmond?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_2\" 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 \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result week 6?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"regular_season_schedule\" WHERE \"week\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_team_players_in_season_1946_47\" (\n \"name\" text,\n \"pos\" text,\n \"caps\" real,\n \"goals\" real,\n \"club\" text\n);\n\nQuestion: How many goals did sture m\u00e5rtensson score?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"national_team_players_in_season_1946_47\" WHERE \"name\"='sture m\u00e5rtensson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_team_players_in_season_1946_47\" (\n \"name\" text,\n \"pos\" text,\n \"caps\" real,\n \"goals\" real,\n \"club\" text\n);\n\nQuestion: How many goals for the player with 2 caps at degerfors if?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"national_team_players_in_season_1946_47\" WHERE \"caps\"=2 AND \"club\"='degerfors if';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"year\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What catalog came out after 2000?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"year\">2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: What is the name of the player who begin playing for the LA Lakers in 1974?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"r\" WHERE \"from\"='1974';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance on week 7?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_by_game_results\" WHERE \"week\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What opponent did they have a bye result against before week 14?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_by_game_results\" WHERE \"result\"='bye' AND \"week\"<14;" } ]
[ { "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: Which average crowd has a Home team score of 11.15 (81)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_14\" WHERE \"home_team_score\"='11.15 (81)';" } ]
[ { "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: Which home team has an Away team of fitzroy?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"away_team\"='fitzroy';" } ]
[ { "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: Which away team has a score of 9.12 (66)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_14\" WHERE \"away_team_score\"='9.12 (66)';" } ]
[ { "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: At what venue did the away team score 10.10 (70)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_9\" WHERE \"away_team_score\"='10.10 (70)';" } ]
[ { "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 North Melbourne's score when they were the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"home_team\"='north 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 Richmond's score as the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_9\" 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_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 venue did Essendon play as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_9\" WHERE \"away_team\"='essendon';" } ]
[ { "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: Who was the opponent when Richmond played as the home team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_13\" 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_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: What was the attendance at the Kardinia Park game?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_13\" 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 \"round_7\" (\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 score of the team North Melbourne played at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\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 the game at Arden Street Oval take place?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_7\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 date of the game with 36,766 fans?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_1\" WHERE \"crowd\">'36,766';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 crowd size of the game where the away team scored 8.15 (63)?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_1\" WHERE \"away_team_score\"='8.15 (63)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"education\" (\n \"institution\" text,\n \"government\" real,\n \"aided\" real,\n \"unaided\" real,\n \"total\" real\n);\n\nQuestion: Which higher secondary school listing has the lowest total and an Aided amount larger than 14?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"education\" WHERE \"institution\"='higher secondary school' AND \"aided\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"education\" (\n \"institution\" text,\n \"government\" real,\n \"aided\" real,\n \"unaided\" real,\n \"total\" real\n);\n\nQuestion: Which Institution has a Total smaller than 13, a Government amount of 1, and an Aided amount of 0?" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"education\" WHERE \"total\"<13 AND \"government\"=1 AND \"aided\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which IATA is associated with China and an ICAO of ZSPD?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"references\" WHERE \"country\"='china' AND \"icao\"='zspd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which airport is associated with Macau?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"references\" WHERE \"city\"='macau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the IATA for Nanjing?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"references\" WHERE \"city\"='nanjing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which airport has an ICAO of RCKH?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"references\" WHERE \"icao\"='rckh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which airport has an IATA of TYN?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"references\" WHERE \"iata\"='tyn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which country contains the Shanghai Pudong International airport?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"airport\"='shanghai pudong international airport';" } ]
[ { "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 Footscray's score when it played as the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"home_team\"='footscray';" } ]
[ { "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: hat was Hawthorn's score as the away team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_8\" WHERE \"away_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_16\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the Outcome against Opponent in the Final Carlos Kirmayr?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles_titles_16\" WHERE \"opponent_in_the_final\"='carlos kirmayr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_16\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the Score in the Final against Opponent in the Final Manuel Orantes, prior to 1978?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"singles_titles_16\" WHERE \"date\"<1978 AND \"opponent_in_the_final\"='manuel orantes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_16\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Against Opponent in the Final Ivan Lendl, on a Surface of clay, with an Outcome of runner-up, where was the Championship?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"singles_titles_16\" WHERE \"outcome\"='runner-up' AND \"surface\"='clay' AND \"opponent_in_the_final\"='ivan lendl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_16\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the earliest Date on a Surface of clay in a Championship in Linz, Austria?" }, { "role": "assistant", "content": "SELECT MIN(\"date\") FROM \"singles_titles_16\" WHERE \"surface\"='clay' AND \"championship\"='linz, austria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"sportsperson\" text,\n \"nation_of_birth\" text,\n \"team\" text,\n \"competition_federation_or_league\" text,\n \"sport\" text\n);\n\nQuestion: Who playes the sport of athletics?" }, { "role": "assistant", "content": "SELECT \"sportsperson\" FROM \"list_of_winners\" WHERE \"sport\"='athletics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"sportsperson\" text,\n \"nation_of_birth\" text,\n \"team\" text,\n \"competition_federation_or_league\" text,\n \"sport\" text\n);\n\nQuestion: What team has a year listed of 2008?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"list_of_winners\" WHERE \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\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 venue was the game played in when the away team was fitzroy?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_3\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\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 number of people in the crowd when the away team scored 10.14 (74)?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_3\" WHERE \"away_team_score\"='10.14 (74)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\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 did the away team score when the home team scored 14.15 (99)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"home_team_score\"='14.15 (99)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upcoming_films\" (\n \"name\" text,\n \"type\" text,\n \"planned_release\" text,\n \"cc_license\" text,\n \"sources_available\" text,\n \"open_source_movie\" text\n);\n\nQuestion: What is the film type for the movie Sanctuary?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"upcoming_films\" WHERE \"name\"='sanctuary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upcoming_films\" (\n \"name\" text,\n \"type\" text,\n \"planned_release\" text,\n \"cc_license\" text,\n \"sources_available\" text,\n \"open_source_movie\" text\n);\n\nQuestion: What different types are there with a CC License of by-nc-sa 2.5?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"upcoming_films\" WHERE \"cc_license\"='by-nc-sa 2.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upcoming_films\" (\n \"name\" text,\n \"type\" text,\n \"planned_release\" text,\n \"cc_license\" text,\n \"sources_available\" text,\n \"open_source_movie\" text\n);\n\nQuestion: What are the open source movies with planned releases in 2013?" }, { "role": "assistant", "content": "SELECT \"open_source_movie\" FROM \"upcoming_films\" WHERE \"planned_release\"='2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What was the lowest rank by average of a couple who had an average of 23 and a total of 115?" }, { "role": "assistant", "content": "SELECT MIN(\"rank_by_average\") FROM \"average_chart\" WHERE \"average\"=23 AND \"total\"=115;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naming_rules\" (\n \"chapter\" text,\n \"colonized\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What is the colonized date for Michigan?" }, { "role": "assistant", "content": "SELECT \"colonized\" FROM \"naming_rules\" WHERE \"state\"='michigan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naming_rules\" (\n \"chapter\" text,\n \"colonized\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What is the colonized year for the chartered year 1958?" }, { "role": "assistant", "content": "SELECT \"colonized\" FROM \"naming_rules\" WHERE \"chartered\"='1958';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naming_rules\" (\n \"chapter\" text,\n \"colonized\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: When was shippensburg university Colonized?" }, { "role": "assistant", "content": "SELECT \"colonized\" FROM \"naming_rules\" WHERE \"school\"='shippensburg university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naming_rules\" (\n \"chapter\" text,\n \"colonized\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What is the colonized date for the n/a charter range for appalachian state?" }, { "role": "assistant", "content": "SELECT \"colonized\" FROM \"naming_rules\" WHERE \"charter_range\"='n/a' AND \"school\"='appalachian state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naming_rules\" (\n \"chapter\" text,\n \"colonized\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What state has colony as a status and shippensburg university as the school?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"naming_rules\" WHERE \"status\"='colony' AND \"school\"='shippensburg university';" } ]
[ { "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: Which team has a Home Team score of 5.12 (42)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"home_team_score\"='5.12 (42)';" } ]
[ { "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: What was the Home Team Score for the Windy Hill Venue?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_13\" 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_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: What is the Essendon Home Team's venue?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" 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 \"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: Which Away team has Away team score 5.8 (38)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"away_team_score\"='5.8 (38)';" } ]
[ { "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: How large a crowd did the Fitzroy Away team draw?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_13\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Van Waiters position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"player\"='van waiters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: What is the capacity of the team in tucson, USA?" }, { "role": "assistant", "content": "SELECT \"capacity\" FROM \"see_also\" WHERE \"country\"='usa' AND \"city\"='tucson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"episode_number\" real,\n \"title\" text,\n \"podcast_date\" text,\n \"run_time\" text,\n \"historical_references\" text\n);\n\nQuestion: What is the date for the podcast episode number 103?" }, { "role": "assistant", "content": "SELECT \"podcast_date\" FROM \"season_1\" WHERE \"episode_number\"=103;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"episode_number\" real,\n \"title\" text,\n \"podcast_date\" text,\n \"run_time\" text,\n \"historical_references\" text\n);\n\nQuestion: What is the name of the podcast on November 21, 2004?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"season_1\" WHERE \"podcast_date\"='november 21, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: Which school added a player to the Lakers in 1948?" }, { "role": "assistant", "content": "SELECT \"school_country\" FROM \"d\" WHERE \"from\"='1948';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: Which school added a player to the Lakers in 1948?" }, { "role": "assistant", "content": "SELECT \"school_country\" FROM \"d\" WHERE \"from\"='1948';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_raiding_history\" (\n \"date\" text,\n \"ship\" text,\n \"nationality\" text,\n \"tonnage\" real,\n \"fate\" text\n);\n\nQuestion: What was the tonnage of the Great Britain ship Batna?" }, { "role": "assistant", "content": "SELECT \"tonnage\" FROM \"summary_of_raiding_history\" WHERE \"nationality\"='great britain' AND \"ship\"='batna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals were won when there were 4 gold and 22 in total?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"men_s_medal_table\" WHERE \"gold\"=4 AND \"total\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: What car number has 130 points?" }, { "role": "assistant", "content": "SELECT \"car_num\" FROM \"race_results\" WHERE \"points\"=130;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: What is the lowest number of laps for ryan newman with over 96 points, a cur number under 24," }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"race_results\" WHERE \"points\">96 AND \"car_num\"<24 AND \"driver\"='ryan newman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: What is the sum of car numbers with less than 126 points and 147 laps?" }, { "role": "assistant", "content": "SELECT SUM(\"car_num\") FROM \"race_results\" WHERE \"points\"<126 AND \"laps\"=147;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: How many total laps for the driver with Winnings of $116,033, and a Car # smaller than 18?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race_results\" WHERE \"winnings\"='$116,033' AND \"car_num\"<18;" } ]
[ { "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 was the crowd when the home team had a score of 16.21 (117)?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_15\" WHERE \"home_team_score\"='16.21 (117)';" } ]
[ { "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 was the home team's score at kardinia park?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_15\" 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 \"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 venue when melbourne is the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_15\" 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_4\" (\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 smallest crowd that Footscray had as the away team?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_4\" WHERE \"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_4\" (\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 home team scored 12.15 (87)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_4\" WHERE \"home_team_score\"='12.15 (87)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Where is the Mackey Arena located?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"venue\"='mackey arena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What state has the University of California, Los Angeles?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"first_and_second_rounds\" WHERE \"host\"='university of california, los angeles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What region does the University of California, Los Angeles play in?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"first_and_second_rounds\" WHERE \"state\"='california' AND \"host\"='university of california, los angeles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What venue is in Santa Barbara, California?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"state\"='california' AND \"city\"='santa barbara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What Venue is in Colorado?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"state\"='colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What city is Mackey Arena in?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"venue\"='mackey arena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"100m\" real,\n \"150m\" text,\n \"time\" text\n);\n\nQuestion: What lane is David Carry in heat 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"lane\") FROM \"semifinals\" WHERE \"heat\"=1 AND \"name\"='david carry';" } ]
[ { "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 \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the opponent after week 9 at rich stadium?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">9 AND \"game_site\"='rich stadium';" } ]
[ { "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 \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance on 1997-12-14?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='1997-12-14';" } ]
[ { "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: For the 1967 Cleveland Browns season what is the total number of times they played the Minnesota Vikings and had an atttendance smaller than 68,431?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='minnesota vikings' AND \"attendance\"<'68,431';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest attendance for a game before 10 weeks on November 12, 1967" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"<10 AND \"date\"='november 12, 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"incident_no\" text,\n \"date\" text,\n \"place\" text,\n \"killed\" real,\n \"injured\" real\n);\n\nQuestion: What is the smallest number of injured in mayurbhanj, odisha and less than 1 killed?" }, { "role": "assistant", "content": "SELECT MIN(\"injured\") FROM \"2010\" WHERE \"place\"='mayurbhanj, odisha' AND \"killed\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 Venue when the Crowd was larger than 11,000 and the Away team score was 7.9 (51)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_18\" WHERE \"crowd\">'11,000' AND \"away_team_score\"='7.9 (51)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 had a score of 11.16 (82), what is the average Crowd?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_18\" WHERE \"away_team_score\"='11.16 (82)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 has a score of 6.17 (53)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"away_team_score\"='6.17 (53)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 has Carlton for it's Home team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 Venue has Footscray as it's Home team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_team\"='footscray';" } ]
[ { "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 home team has Richmond listed as their Away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"away_team\"='richmond';" } ]
[ { "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 is the name of the away team that has the home team score of 15.17 (107)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_9\" WHERE \"home_team_score\"='15.17 (107)';" } ]
[ { "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 is the number of the crowd for the home team of South Melbourne?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_9\" WHERE \"home_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_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 is the away team score for the home team listed as Footscray?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"home_team\"='footscray';" } ]
[ { "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: In which venue did the home team score 11.20 (86)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"home_team_score\"='11.20 (86)';" } ]
[ { "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: Which venue exceeded a crowd size of 33,642?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"crowd\">'33,642';" } ]
[ { "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: Which home team scored 7.10 (52)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"home_team_score\"='7.10 (52)';" } ]
[ { "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: What is the largest crowd size that had a home team score of 17.18 (120)?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_13\" WHERE \"home_team_score\"='17.18 (120)';" } ]
[ { "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: In which venue did the away team score 9.11 (65)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team_score\"='9.11 (65)';" } ]