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 \"tamazight_vowel_allophony\" (\n \"phoneme\" text,\n \"realization\" text,\n \"environment\" text,\n \"example\" text,\n \"gloss\" text\n);\n\nQuestion: Name the phoneme when the realizationis [\u0251]" }, { "role": "assistant", "content": "SELECT \"phoneme\" FROM \"tamazight_vowel_allophony\" WHERE \"realization\"='[\u0251]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines_and_performance\" (\n \"name\" text,\n \"power\" text,\n \"torque\" text,\n \"size\" text,\n \"engine_code\" text,\n \"0_100km_h_s\" real,\n \"top_speed\" text,\n \"years\" text\n);\n\nQuestion: What is the power of the engine with an engine code m44b19?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"engines_and_performance\" WHERE \"engine_code\"='m44b19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest numbered grid for piercarlo ghinzani with over 3 laps?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"driver\"='piercarlo ghinzani' AND \"laps\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps for a grid of over 18 and retired due to electrical failure?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"grid\">18 AND \"time_retired\"='electrical';" } ]
[ { "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 crowd attendance for the game with an away team score of 14.10 (94)?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_2\" WHERE \"away_team_score\"='14.10 (94)';" } ]
[ { "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 average crowd attendance for the Junction Oval venue?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_2\" 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_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 is the home team for the Princes Park venue?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"venue\"='princes park';" } ]
[ { "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 is the average home team score for Footscray?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_2\" 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_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 home teams had Geelong as the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"away_team\"='geelong';" } ]
[ { "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: When did the Rockies play the Giants with an attendance over 24,100?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='giants' AND \"attendance\">'24,100';" } ]
[ { "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 date of the game when the Rockies had a record of 61\u201366?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='61\u201366';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"data_prior_to_the_2012_ncaa_tournament\" (\n \"coach\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: How many seasons has John Mcfadden coached?" }, { "role": "assistant", "content": "SELECT COUNT(\"seasons\") FROM \"data_prior_to_the_2012_ncaa_tournament\" WHERE \"coach\"='john mcfadden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"annual_ridership_2012\" real,\n \"rider_per_mile\" real,\n \"opened\" real,\n \"stations\" real,\n \"lines\" real\n);\n\nQuestion: What is the station with the most riders that has an annaul ridership of 4,445,100 and line smaller than 1??" }, { "role": "assistant", "content": "SELECT MAX(\"stations\") FROM \"see_also\" WHERE \"annual_ridership_2012\"='4,445,100' AND \"lines\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"annual_ridership_2012\" real,\n \"rider_per_mile\" real,\n \"opened\" real,\n \"stations\" real,\n \"lines\" real\n);\n\nQuestion: What is the number of annual ridership with a station that has more than 13 stations and larger than 4 lines?" }, { "role": "assistant", "content": "SELECT SUM(\"annual_ridership_2012\") FROM \"see_also\" WHERE \"stations\"=13 AND \"lines\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"annual_ridership_2012\" real,\n \"rider_per_mile\" real,\n \"opened\" real,\n \"stations\" real,\n \"lines\" real\n);\n\nQuestion: How many lines have fewer than 44 stations and fewer than 881 riders per mile?" }, { "role": "assistant", "content": "SELECT COUNT(\"lines\") FROM \"see_also\" WHERE \"stations\"<44 AND \"rider_per_mile\"<881;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"annual_ridership_2012\" real,\n \"rider_per_mile\" real,\n \"opened\" real,\n \"stations\" real,\n \"lines\" real\n);\n\nQuestion: Which station has 3,871 riders per mile, and an annual ridership in 2012 of larger than 15,399,400?" }, { "role": "assistant", "content": "SELECT MAX(\"stations\") FROM \"see_also\" WHERE \"rider_per_mile\"='3,871' AND \"annual_ridership_2012\">'15,399,400';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What is the highest season for the 7th position?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"season_to_season\" WHERE \"position\"='7th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the final of the Tournament of Blenheim?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles\" WHERE \"tournament\"='blenheim';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the final on August 14, 2006?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles\" WHERE \"date\"='august 14, 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the final with a clay surface at the Tournament of Lyneham?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles\" WHERE \"surface\"='clay' AND \"tournament\"='lyneham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what surface was the score 6\u20132, 6\u20131?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_titles\" WHERE \"score\"='6\u20132, 6\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the score for the Tournament of Cordenons?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_titles\" WHERE \"tournament\"='cordenons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what date was the surface clay with Cyril Saulnier as the opponent in the final?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"surface\"='clay' AND \"opponent_in_the_final\"='cyril saulnier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_coat_of_arms\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: Which artist has a Mintage of 500?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"provincial_coat_of_arms\" WHERE \"mintage\"=500;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_coat_of_arms\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: Which Artist has an Issue Price of $1,541.95?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"provincial_coat_of_arms\" WHERE \"issue_price\"='$1,541.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the final on a hard surface with a score of 6\u20133 7\u20136(5)?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles\" WHERE \"surface\"='hard' AND \"score\"='6\u20133 7\u20136(5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent in the Tournament of Lahore final?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles\" WHERE \"tournament\"='lahore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what date did the opponent in the Toshiaki Sakai final play on a grass surface?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='toshiaki sakai' AND \"surface\"='grass';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what surface did a score of 4\u20136 6\u20133 6\u20134 occur at the Tournament of Lahore?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_titles\" WHERE \"tournament\"='lahore' AND \"score\"='4\u20136 6\u20133 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament had Toshiaki Sakai as an opponent in the final on a grass surface?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='toshiaki sakai' AND \"surface\"='grass';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eastern_conference_semi_finals_vs_4_wash\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: what was the score on the game that happened on May 15?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"eastern_conference_semi_finals_vs_4_wash\" WHERE \"date\"='may 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the status of bel with a Transfer window of winter?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"loaned_out\" WHERE \"country\"='bel' AND \"transfer_window\"='winter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the union moving name and is from cmr?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"loaned_out\" WHERE \"moving_to\"='union' AND \"country\"='cmr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer window for bel?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"loaned_out\" WHERE \"country\"='bel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer period for habarugira?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"loaned_out\" WHERE \"name\"='habarugira';" } ]
[ { "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: How big was the crowd in game that featured the visiting team of north melbourne?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_11\" WHERE \"away_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals for the nation with less than 1 total?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medals_table\" WHERE \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals for the nation ranked above 2, and under 0 golds?" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"medals_table\" WHERE \"rank\"<2 AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silvers for japan (1 gold)?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medals_table\" WHERE \"nation\"='japan' AND \"gold\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"papakura_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which authority had a role of 651?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"papakura_local_board\" WHERE \"roll\"=651;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"papakura_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: For the roll of 651, what was the lowest Decile?" }, { "role": "assistant", "content": "SELECT MIN(\"decile\") FROM \"papakura_local_board\" WHERE \"roll\"=651;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"papakura_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What were the years for Redhill school, authority of state?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"papakura_local_board\" WHERE \"authority\"='state' AND \"name\"='redhill school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"papakura_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What was the sum roll of Karaka area?" }, { "role": "assistant", "content": "SELECT SUM(\"roll\") FROM \"papakura_local_board\" WHERE \"area\"='karaka';" } ]
[ { "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: What home team played North Melbourne?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"away_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 is the average crowd where the home team scored 8.15 (63)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_9\" WHERE \"home_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 \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the nationality of the player with a round after 4 and plays right wing?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\">4 AND \"position\"='right wing';" } ]
[ { "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 \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the college/junior/club team (league) of left wing Ondrej Roman?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"position\"='left wing' AND \"player\"='ondrej roman';" } ]
[ { "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: Who played in lake oval while away?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_14\" WHERE \"venue\"='lake 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: What was the home score when the away team scored 16.11 (107)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"away_team_score\"='16.11 (107)';" } ]
[ { "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 was the home score when the away team scored 5.9 (39)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"away_team_score\"='5.9 (39)';" } ]
[ { "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 did the away team score 17.11 (113)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" WHERE \"away_team_score\"='17.11 (113)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the low crowd size when the away team scored 17.11 (113)?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_14\" WHERE \"away_team_score\"='17.11 (113)';" } ]
[ { "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\" text\n);\n\nQuestion: What week number saw a w 31-16 result?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"result\"='w 31-16';" } ]
[ { "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\" text\n);\n\nQuestion: When was the game before week 8 with a result of bye?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<8 AND \"result\"='bye';" } ]
[ { "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\" text\n);\n\nQuestion: What week number had the New York Giants as opponent?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='new york giants';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who built the under grid 6 car with under 49 laps?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"<6 AND \"laps\"<49;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who built the grid 2 car?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who built the car that retired due to suspension before 65 laps?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\"<65 AND \"time_retired\"='suspension';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_schools_in_dysart_usd\" (\n \"information\" text,\n \"dysart\" text,\n \"shadow_ridge\" text,\n \"valley_vista\" text,\n \"willow_canyon\" text\n);\n\nQuestion: What Valley Vista has a Dysart of 1668?" }, { "role": "assistant", "content": "SELECT \"valley_vista\" FROM \"high_schools_in_dysart_usd\" WHERE \"dysart\"='1668';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_schools_in_dysart_usd\" (\n \"information\" text,\n \"dysart\" text,\n \"shadow_ridge\" text,\n \"valley_vista\" text,\n \"willow_canyon\" text\n);\n\nQuestion: What Valley Vista has a Willow Canyon of 2169?" }, { "role": "assistant", "content": "SELECT \"valley_vista\" FROM \"high_schools_in_dysart_usd\" WHERE \"willow_canyon\"='2169';" } ]
[ { "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 were in the crowd at Lake Oval?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_14\" WHERE \"venue\"='lake 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: Where was the game played when Geelong was the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_14\" WHERE \"away_team\"='geelong';" } ]
[ { "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 team was the home team on 27 june 1981, at vfl park?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"date\"='27 june 1981' AND \"venue\"='vfl park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the tyre with a 56 chassis?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"teams_and_drivers\" WHERE \"chassis\"='56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prospective_members\" (\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_nominal\" text,\n \"gdp_per_capita_nominal\" text\n);\n\nQuestion: Which country has a GDP (nominal) of $29.9 billion?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"prospective_members\" WHERE \"gdp_nominal\"='$29.9 billion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prospective_members\" (\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_nominal\" text,\n \"gdp_per_capita_nominal\" text\n);\n\nQuestion: Which country has a GDP (nominal) of $29.9 billion?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"prospective_members\" WHERE \"gdp_nominal\"='$29.9 billion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prospective_members\" (\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_nominal\" text,\n \"gdp_per_capita_nominal\" text\n);\n\nQuestion: Which GDP (nominal) has a Population of 5,550,239?" }, { "role": "assistant", "content": "SELECT \"gdp_nominal\" FROM \"prospective_members\" WHERE \"population\"='5,550,239';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prospective_members\" (\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_nominal\" text,\n \"gdp_per_capita_nominal\" text\n);\n\nQuestion: Which population has a GDP (nominal) of $6.4 billion?" }, { "role": "assistant", "content": "SELECT \"population\" FROM \"prospective_members\" WHERE \"gdp_nominal\"='$6.4 billion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prospective_members\" (\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_nominal\" text,\n \"gdp_per_capita_nominal\" text\n);\n\nQuestion: Which country has a GDP (nominal) of $29.9 billion?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"prospective_members\" WHERE \"gdp_nominal\"='$29.9 billion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prospective_members\" (\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_nominal\" text,\n \"gdp_per_capita_nominal\" text\n);\n\nQuestion: What is the GDP (nominal) with Population of 5,125,693?" }, { "role": "assistant", "content": "SELECT \"gdp_per_capita_nominal\" FROM \"prospective_members\" WHERE \"population\"='5,125,693';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the earliest year for 9 points?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"complete_formula_one_results\" WHERE \"points\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the low score for the jaguar r3 chasis?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='jaguar r3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"notes\" text\n);\n\nQuestion: What is the notes when the displacement is 220cid (3,604cc)?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"engines\" WHERE \"displacement\"='220cid (3,604cc)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"notes\" text\n);\n\nQuestion: What is then engine when the notes state srt8?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"engines\" WHERE \"notes\"='srt8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"notes\" text\n);\n\nQuestion: What is the power when the displacement is 182cid (2,988cc) and the notes are eu spec?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"engines\" WHERE \"displacement\"='182cid (2,988cc)' AND \"notes\"='eu spec';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"notes\" text\n);\n\nQuestion: What is the engine for year 2012-?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"engines\" WHERE \"years\"='2012-';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the match with Columbus as the home team on March 7?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"home\"='columbus' AND \"date\"='march 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the game on March 18?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"date\"='march 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_professionals\" (\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight_lbs\" real,\n \"born\" text,\n \"college\" text,\n \"drafted\" text\n);\n\nQuestion: Which height has a College of wyoming, and a Name of guy frazier?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"nfl_professionals\" WHERE \"college\"='wyoming' AND \"name\"='guy frazier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"season\" text,\n \"date\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: Which season's winner is Panathinaikos and is located in Athens?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"finals\" WHERE \"location\"='athens' AND \"winners\"='panathinaikos';" } ]
[ { "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 date did an Away team score 14.16 (100)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" WHERE \"away_team_score\"='14.16 (100)';" } ]
[ { "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 score of the Away team that played against a Home team that scored 17.19 (121)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"home_team_score\"='17.19 (121)';" } ]
[ { "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 Away team scored 14.17 (101) and had a crowd attendance larger than 14,000?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"crowd\">'14,000' AND \"home_team_score\"='14.17 (101)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: What is the date recorded of Hate?" }, { "role": "assistant", "content": "SELECT \"recorded\" FROM \"track_listing\" WHERE \"translation\"='hate';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Who is the composer on the tracks less than 4?" }, { "role": "assistant", "content": "SELECT \"composer\" FROM \"track_listing\" WHERE \"track\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: What is the title of track 7?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"track_listing\" WHERE \"track\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: What is the recorded date of track 8?" }, { "role": "assistant", "content": "SELECT \"recorded\" FROM \"track_listing\" WHERE \"track\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet_details\" (\n \"class\" text,\n \"type\" text,\n \"operator\" text,\n \"no_built\" real,\n \"year_built\" text,\n \"cars_per_set\" real,\n \"unit_nos\" text\n);\n\nQuestion: How many number Builts had unit numbers of 375301-310?" }, { "role": "assistant", "content": "SELECT SUM(\"no_built\") FROM \"fleet_details\" WHERE \"unit_nos\"='375301-310';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game where Montreal was the home team and the Devils had a record of 40\u201324\u20136?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"march\" WHERE \"home\"='montreal' AND \"record\"='40\u201324\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"mall_name\" text,\n \"location\" text,\n \"retail_space_sq_feet_m\" text,\n \"stores\" text,\n \"year_opened\" real\n);\n\nQuestion: Which location has 140 stores?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"statistics\" WHERE \"stores\"='140';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"mall_name\" text,\n \"location\" text,\n \"retail_space_sq_feet_m\" text,\n \"stores\" text,\n \"year_opened\" real\n);\n\nQuestion: Which year did the Short Pump Town Center Mall open?" }, { "role": "assistant", "content": "SELECT \"year_opened\" FROM \"statistics\" WHERE \"mall_name\"='short pump town center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"mall_name\" text,\n \"location\" text,\n \"retail_space_sq_feet_m\" text,\n \"stores\" text,\n \"year_opened\" real\n);\n\nQuestion: What is the retail space of the Stony Point Fashion Park Mall?" }, { "role": "assistant", "content": "SELECT \"retail_space_sq_feet_m\" FROM \"statistics\" WHERE \"mall_name\"='stony point fashion park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"mall_name\" text,\n \"location\" text,\n \"retail_space_sq_feet_m\" text,\n \"stores\" text,\n \"year_opened\" real\n);\n\nQuestion: Which Mall has 140 stores?" }, { "role": "assistant", "content": "SELECT \"mall_name\" FROM \"statistics\" WHERE \"stores\"='140';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_derby_del_sole_results\" (\n \"season\" text,\n \"match\" text,\n \"result\" text,\n \"league\" text,\n \"date\" text\n);\n\nQuestion: What match was on 30 january 1938?" }, { "role": "assistant", "content": "SELECT \"match\" FROM \"list_of_derby_del_sole_results\" WHERE \"date\"='30 january 1938';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_derby_del_sole_results\" (\n \"season\" text,\n \"match\" text,\n \"result\" text,\n \"league\" text,\n \"date\" text\n);\n\nQuestion: What was the result of the napoli-roma match?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"list_of_derby_del_sole_results\" WHERE \"match\"='napoli-roma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the player that is from seattle prep?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2006_boys_team\" WHERE \"school\"='seattle prep';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown of the player which has a height of 6-0?" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"2006_boys_team\" WHERE \"height\"='6-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown for the player that went to the college of washington" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"2006_boys_team\" WHERE \"college\"='washington';" } ]
[ { "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 away team's score at Princes Park?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_15\" WHERE \"venue\"='princes 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: When did Richmond play an away game against Collingwood?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_15\" WHERE \"away_team\"='richmond';" } ]