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 \"second_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: When Aalborg BK is Team 1, what is the 1st leg?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"second_qualifying_round\" WHERE \"team_1\"='aalborg bk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"order\" real,\n \"title\" text,\n \"story_timeline\" text,\n \"published\" real,\n \"in_order_of_publication\" text\n);\n\nQuestion: What is the story timeline that was published first prior to 1984?" }, { "role": "assistant", "content": "SELECT \"story_timeline\" FROM \"references\" WHERE \"published\"<1984 AND \"in_order_of_publication\"='first';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"order\" real,\n \"title\" text,\n \"story_timeline\" text,\n \"published\" real,\n \"in_order_of_publication\" text\n);\n\nQuestion: How many total publications were the first of the series?" }, { "role": "assistant", "content": "SELECT COUNT(\"published\") FROM \"references\" WHERE \"in_order_of_publication\"='first';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"ice_level_reporters\" text\n);\n\nQuestion: Who did the play-by-play before 1998 on Fox network?" }, { "role": "assistant", "content": "SELECT \"play_by_play\" FROM \"1990s\" WHERE \"year\"<1998 AND \"network\"='fox';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"ice_level_reporters\" text\n);\n\nQuestion: Who did the play-by-play before 1992 with the Ice level reporter Mike Emrick?" }, { "role": "assistant", "content": "SELECT \"play_by_play\" FROM \"1990s\" WHERE \"year\"<1992 AND \"ice_level_reporters\"='mike emrick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"ice_level_reporters\" text\n);\n\nQuestion: Who is the Ice level reporter after 1992 with the color commentator John Davidson and the play-by-play Marv Albert?" }, { "role": "assistant", "content": "SELECT \"ice_level_reporters\" FROM \"1990s\" WHERE \"color_commentator_s\"='john davidson' AND \"play_by_play\"='marv albert' AND \"year\">1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"ice_level_reporters\" text\n);\n\nQuestion: What is the network with the play-by-play Marv Albert before 1994?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"1990s\" WHERE \"play_by_play\"='marv albert' AND \"year\"<1994;" } ]
[ { "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 total crowd of the Carlton game?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_13\" 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 \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What was the highest long of Charles Pauley with fewer than 60 yards?" }, { "role": "assistant", "content": "SELECT MAX(\"long\") FROM \"wide_receivers\" WHERE \"player\"='charles pauley' AND \"yards\"<60;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: \ufeffWhat is the score of the game on May 26?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"date\"='may 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What was the location and attendance on the May 22 game?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"playoffs\" WHERE \"date\"='may 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: What is the final placing of the team with 0 ples, more than 16 races, and 16 podiums?" }, { "role": "assistant", "content": "SELECT \"final_placing\" FROM \"career_summary\" WHERE \"poles\"=0 AND \"races\">16 AND \"podiums\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: What is the sum of podiums of the teams with a final placing of 14th, seasons after 2008, and less than 1 races?" }, { "role": "assistant", "content": "SELECT SUM(\"podiums\") FROM \"career_summary\" WHERE \"final_placing\"='14th' AND \"season\">2008 AND \"races\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: What is the total number of seasons with more than 0 wins and a 1st final placing?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"career_summary\" WHERE \"wins\">0 AND \"final_placing\"='1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: What is the average wins of a team with more than 0 ples and less than 3 podiums?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"career_summary\" WHERE \"poles\">0 AND \"podiums\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: I want the ends for transfer fee of free and goals being 0 for roy carroll" }, { "role": "assistant", "content": "SELECT \"ends\" FROM \"squad_information\" WHERE \"transfer_fee\"='free' AND \"goals\"=0 AND \"name\"='roy carroll';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: I want the total number of ends for filip \u0161ebo and Goals more than 2" }, { "role": "assistant", "content": "SELECT COUNT(\"ends\") FROM \"squad_information\" WHERE \"name\"='filip \u0161ebo' AND \"goals\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score of the home team whose opponent scored 5.10 (40)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team_score\"='5.10 (40)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the away team whose opponent scored 11.8 (74)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_8\" WHERE \"home_team_score\"='11.8 (74)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the crowd of away team Richmond?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_8\" 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_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How much did the away team Geelong score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_8\" 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 \"thursday\" (\n \"network\" text,\n \"8_00_pm\" text,\n \"8_30_pm\" text,\n \"9_00_pm\" text,\n \"9_30_pm\" text,\n \"10_00_pm\" text\n);\n\nQuestion: What is on at 9:00pm on the channel of smallville?" }, { "role": "assistant", "content": "SELECT \"9_00_pm\" FROM \"thursday\" WHERE \"8_00_pm\"='smallville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"network\" text,\n \"8_00_pm\" text,\n \"8_30_pm\" text,\n \"9_00_pm\" text,\n \"9_30_pm\" text,\n \"10_00_pm\" text\n);\n\nQuestion: What is the network that plays ugly betty?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"thursday\" WHERE \"8_30_pm\"='ugly betty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"network\" text,\n \"8_00_pm\" text,\n \"8_30_pm\" text,\n \"9_00_pm\" text,\n \"9_30_pm\" text,\n \"10_00_pm\" text\n);\n\nQuestion: What is the 8:30pm show on fox?" }, { "role": "assistant", "content": "SELECT \"8_30_pm\" FROM \"thursday\" WHERE \"network\"='fox';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"network\" text,\n \"8_00_pm\" text,\n \"8_30_pm\" text,\n \"9_00_pm\" text,\n \"9_30_pm\" text,\n \"10_00_pm\" text\n);\n\nQuestion: What is the 8:30pm channel that has local programming at ten and nine thirty is my thursday night movie?" }, { "role": "assistant", "content": "SELECT \"8_30_pm\" FROM \"thursday\" WHERE \"10_00_pm\"='local programming' AND \"9_30_pm\"='my thursday night movie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"network\" text,\n \"8_00_pm\" text,\n \"8_30_pm\" text,\n \"9_00_pm\" text,\n \"9_30_pm\" text,\n \"10_00_pm\" text\n);\n\nQuestion: Name the 10:00pm when 8:0pm is my thursday night movie" }, { "role": "assistant", "content": "SELECT \"10_00_pm\" FROM \"thursday\" WHERE \"8_00_pm\"='my thursday night movie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_single_day_gross\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"single_day_net_gross\" real,\n \"day_in_release\" text,\n \"day_of_week\" real\n);\n\nQuestion: What is the average year for releases on Friday and weeks larger than 2 days?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"biggest_single_day_gross\" WHERE \"day_in_release\"='friday' AND \"day_of_week\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"year\" real,\n \"rank\" real,\n \"games\" real,\n \"winpct\" real,\n \"postseason\" text\n);\n\nQuestion: What number of win% has a postseason of did not qualify and rank larger than 8?" }, { "role": "assistant", "content": "SELECT COUNT(\"winpct\") FROM \"season_by_season_records\" WHERE \"postseason\"='did not qualify' AND \"rank\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"year\" real,\n \"rank\" real,\n \"games\" real,\n \"winpct\" real,\n \"postseason\" text\n);\n\nQuestion: What year ranked larger than 5?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"season_by_season_records\" WHERE \"rank\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"year\" real,\n \"rank\" real,\n \"games\" real,\n \"winpct\" real,\n \"postseason\" text\n);\n\nQuestion: What postseason has a win% between 0.40700000000000003 and 108 with a rank of 1?" }, { "role": "assistant", "content": "SELECT \"postseason\" FROM \"season_by_season_records\" WHERE \"winpct\">0.40700000000000003 AND \"games\"<108 AND \"rank\"=1;" } ]
[ { "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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps in total does the driver named Eddie Irvine have?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race_results\" WHERE \"driver\"='eddie irvine';" } ]
[ { "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's the average crowd size when the venue is western oval?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_3\" WHERE \"venue\"='western oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"for_top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What team has Carlos S\u00e1nchez as a goalkeeper and an average below 1.12?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"for_top_goalkeepers\" WHERE \"average\"<1.12 AND \"goalkeeper\"='carlos s\u00e1nchez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"for_top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the average of the team who has Jacobo as a goalkeeper and has played more than 32 matches?" }, { "role": "assistant", "content": "SELECT AVG(\"average\") FROM \"for_top_goalkeepers\" WHERE \"goalkeeper\"='jacobo' AND \"matches\">32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\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 Fitzroy?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_17\" 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 \"1980s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"studio_host\" text\n);\n\nQuestion: Which network has a play-by-play announcer of John Wells?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"1980s\" WHERE \"play_by_play\"='john wells';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"studio_host\" text\n);\n\nQuestion: On CBC, who was the colour commentator in 1987?" }, { "role": "assistant", "content": "SELECT \"colour_commentator_s\" FROM \"1980s\" WHERE \"network\"='cbc' AND \"year\"=1987;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"studio_host\" text\n);\n\nQuestion: Who was the colour commentator when the play-by-play announcer was Bob Cole?" }, { "role": "assistant", "content": "SELECT \"colour_commentator_s\" FROM \"1980s\" WHERE \"play_by_play\"='bob cole';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"studio_host\" text\n);\n\nQuestion: Who is the studio host that has a play-by-play announcer of Bob Cole and a colour commentator of Harry Neale?" }, { "role": "assistant", "content": "SELECT \"studio_host\" FROM \"1980s\" WHERE \"play_by_play\"='bob cole' AND \"colour_commentator_s\"='harry neale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"studio_host\" text\n);\n\nQuestion: In 1981, with a studio host of Dave Hodge, who was the colour commentator?" }, { "role": "assistant", "content": "SELECT \"colour_commentator_s\" FROM \"1980s\" WHERE \"studio_host\"='dave hodge' AND \"year\"=1981;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"place\" text,\n \"points\" real\n);\n\nQuestion: What Song is by the Artist 'mor ve \u00f6tesi'?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"final\" WHERE \"artist\"='mor ve \u00f6tesi';" } ]
[ { "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: How much did the home team score that played the away team who scored 10.14 (74)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_18\" 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_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: How big was the crowd when the home team scored 5.14 (44)?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_18\" WHERE \"home_team_score\"='5.14 (44)';" } ]
[ { "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 date did the home team Richmond play?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_18\" 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_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 size was the biggest crowd that watched the home team Hawthorn play?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_18\" WHERE \"home_team\"='hawthorn';" } ]
[ { "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 name of the away team that scored 9.12 (66)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_18\" 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 \"other_recent_call_ups\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is the high cap total for a lock with the vicenza rangers?" }, { "role": "assistant", "content": "SELECT MAX(\"caps\") FROM \"other_recent_call_ups\" WHERE \"position\"='lock' AND \"club_province\"='vicenza rangers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_recent_call_ups\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: When was nese malifa born?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"other_recent_call_ups\" WHERE \"player\"='nese malifa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_recent_call_ups\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What position for jj gagiano?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"other_recent_call_ups\" WHERE \"player\"='jj gagiano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_recent_call_ups\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What club/province has 41 caps?" }, { "role": "assistant", "content": "SELECT \"club_province\" FROM \"other_recent_call_ups\" WHERE \"caps\"=41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the date for the australian grand prix." }, { "role": "assistant", "content": "SELECT \"date\" FROM \"grands_prix\" WHERE \"grand_prix\"='australian grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Who did the fastest lap when pole position was damon hill and the location was magny-cours?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"grands_prix\" WHERE \"pole_position\"='damon hill' AND \"location\"='magny-cours';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the date for the canadian grand prix?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"grands_prix\" WHERE \"grand_prix\"='canadian grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What is the low rebound total for players from Oklahoma before 1975?" }, { "role": "assistant", "content": "SELECT MIN(\"rebs\") FROM \"a\" WHERE \"school_country\"='oklahoma' AND \"from\"<1975;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What is the earliest year a SG has over 650 assists?" }, { "role": "assistant", "content": "SELECT MIN(\"from\") FROM \"a\" WHERE \"pos\"='sg' AND \"asts\">650;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administered_by_independent_administrati\" (\n \"english_name\" text,\n \"japanese_orthography\" text,\n \"pronouciation\" text,\n \"abbreviation\" text,\n \"provider_iai\" text,\n \"foundation\" real\n);\n\nQuestion: What is the number of the Foundation with Japanese orthography of \u56fd\u7acb\u770b\u8b77\u5927\u5b66\u6821?" }, { "role": "assistant", "content": "SELECT SUM(\"foundation\") FROM \"administered_by_independent_administrati\" WHERE \"japanese_orthography\"='\u56fd\u7acb\u770b\u8b77\u5927\u5b66\u6821';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: what is the least yards when the average is 7 and the long is less than 7?" }, { "role": "assistant", "content": "SELECT MIN(\"yards\") FROM \"wide_receivers\" WHERE \"avg\"=7 AND \"long\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: what is the average td's for the player jacques rumph with yards more than 214?" }, { "role": "assistant", "content": "SELECT AVG(\"td_s\") FROM \"wide_receivers\" WHERE \"player\"='jacques rumph' AND \"yards\">214;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which women's doubles has Howard Bach Tony Gunawan as Men's doubles and Taufik Hidayat as Men's Singles?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"21st_century\" WHERE \"men_s_doubles\"='howard bach tony gunawan' AND \"men_s_singles\"='taufik hidayat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which Men's doubles has Miyuki Maeda Satoko Suetsuna as Women's double?" }, { "role": "assistant", "content": "SELECT \"men_s_doubles\" FROM \"21st_century\" WHERE \"women_s_doubles\"='miyuki maeda satoko suetsuna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average laps for ralph firman with a grid of over 19?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"driver\"='ralph firman' AND \"grid\">19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What grid features 6 laps?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"race\" WHERE \"laps\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What's the sum of asts for boston college with a rebs over 63?" }, { "role": "assistant", "content": "SELECT SUM(\"asts\") FROM \"e\" WHERE \"school_country\"='boston college' AND \"rebs\">63;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What's the average rebs before 1972?" }, { "role": "assistant", "content": "SELECT AVG(\"rebs\") FROM \"e\" WHERE \"from\"<1972;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What's the highest rebs for a pos of pg before 2004?" }, { "role": "assistant", "content": "SELECT MAX(\"rebs\") FROM \"e\" WHERE \"pos\"='pg' AND \"from\"<2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What's the pos for an asts less than 117?" }, { "role": "assistant", "content": "SELECT \"pos\" FROM \"e\" WHERE \"asts\"<117;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What's the total of rebs for UCLA after 1973?" }, { "role": "assistant", "content": "SELECT COUNT(\"rebs\") FROM \"e\" WHERE \"school_country\"='ucla' AND \"from\">1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: How many release dates has Canada had?" }, { "role": "assistant", "content": "SELECT COUNT(\"release_date\") FROM \"release_history\" WHERE \"country\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What constructor is grid 1 with a time/retired of engine?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='engine' AND \"grid\"=1;" } ]
[ { "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 constructed grid 14?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: I want to know the 2001 that has a 2004 of a and 2003 of a with 2012 of 3r" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"2004\"='a' AND \"2003\"='a' AND \"2012\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Tell me the 2008 for when 2001 of wta premier 5 tournaments" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2001\"='wta premier 5 tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: I want to know the 2013 when 2001 was wta premier 5 tournaments" }, { "role": "assistant", "content": "SELECT \"2013\" FROM \"singles_performance_timeline\" WHERE \"2001\"='wta premier 5 tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Tell me the 2007 for 2010 olympic games" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"singles_performance_timeline\" WHERE \"2010\"='olympic games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Tell me the 2004 for 2012 of 21" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"singles_performance_timeline\" WHERE \"2012\"='21';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: On which date did the away team score 3.4 (22)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_1\" WHERE \"away_team_score\"='3.4 (22)';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: When Richmond was the Home team, who was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" 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_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Which home team plays in the Corio Oval venue?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"venue\"='corio 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 \"date\" text\n);\n\nQuestion: When the game was played at the EMCG venue, who was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"venue\"='emcg';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: who is the constructor when the driver is jenson button?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='jenson button';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: what is the grid when the time/retired is +27.112?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"race\" WHERE \"time_retired\"='+27.112';" } ]
[ { "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: I want the fewest Laps for Huub Rothengatter and grid less than 24" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"driver\"='huub rothengatter' AND \"grid\"<24;" } ]
[ { "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: Tell me the time/retired with Laps of 47 and driver of ren\u00e9 arnoux" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"laps\"=47 AND \"driver\"='ren\u00e9 arnoux';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"albums\" (\n \"romaji_title\" text,\n \"japanese_title\" text,\n \"release_date\" text,\n \"reference\" text,\n \"oricon\" real\n);\n\nQuestion: Which Oricon has a Romaji title of nakitakunalu?" }, { "role": "assistant", "content": "SELECT MAX(\"oricon\") FROM \"albums\" WHERE \"romaji_title\"='nakitakunalu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"albums\" (\n \"romaji_title\" text,\n \"japanese_title\" text,\n \"release_date\" text,\n \"reference\" text,\n \"oricon\" real\n);\n\nQuestion: Which Reference has a Release date of 1996/10/10?" }, { "role": "assistant", "content": "SELECT \"reference\" FROM \"albums\" WHERE \"release_date\"='1996/10/10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"11_seats\" (\n \"riding\" text,\n \"candidate\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What is the occupation of the candidate that resides in Windsor Junction?" }, { "role": "assistant", "content": "SELECT \"occupation\" FROM \"11_seats\" WHERE \"residence\"='windsor junction';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"11_seats\" (\n \"riding\" text,\n \"candidate\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: How many votes did 3rd ranking candidate Mary Louise Lorefice receive?" }, { "role": "assistant", "content": "SELECT COUNT(\"votes\") FROM \"11_seats\" WHERE \"rank\"='3rd' AND \"candidate\"='mary louise lorefice';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"11_seats\" (\n \"riding\" text,\n \"candidate\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What occupation does Mary Louise Lorefice have?" }, { "role": "assistant", "content": "SELECT \"occupation\" FROM \"11_seats\" WHERE \"candidate\"='mary louise lorefice';" } ]
[ { "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: Which team has an away score of 7.9 (51)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_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_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 is the date of the game at Geelong?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_7\" 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_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: Where was the game with a score of 13.13 (91) played?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"away_team_score\"='13.13 (91)';" } ]
[ { "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: When was the game at Essendon?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_7\" 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_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: Where did the away team score 14.12 (96)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"away_team_score\"='14.12 (96)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"series_name\" text,\n \"champion\" text,\n \"team_champion\" text,\n \"secondary_class_champion\" text\n);\n\nQuestion: What is the series name where cram competition is the team champion?" }, { "role": "assistant", "content": "SELECT \"series_name\" FROM \"champions\" WHERE \"team_champion\"='cram competition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"series_name\" text,\n \"champion\" text,\n \"team_champion\" text,\n \"secondary_class_champion\" text\n);\n\nQuestion: What is the highest season with International Formula Master as the series name and Marcello Puglisi (formula master italia) as the secondary class champion?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"champions\" WHERE \"series_name\"='international formula master' AND \"secondary_class_champion\"='marcello puglisi (formula master italia)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"series_name\" text,\n \"champion\" text,\n \"team_champion\" text,\n \"secondary_class_champion\" text\n);\n\nQuestion: Who is the secondary class champion in the season after 2008?" }, { "role": "assistant", "content": "SELECT \"secondary_class_champion\" FROM \"champions\" WHERE \"season\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"series_name\" text,\n \"champion\" text,\n \"team_champion\" text,\n \"secondary_class_champion\" text\n);\n\nQuestion: What are the seasons where Marcello Puglisi (formula master italia) was the secondary class champion?" }, { "role": "assistant", "content": "SELECT SUM(\"season\") FROM \"champions\" WHERE \"secondary_class_champion\"='marcello puglisi (formula master italia)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"series_name\" text,\n \"champion\" text,\n \"team_champion\" text,\n \"secondary_class_champion\" text\n);\n\nQuestion: Who was the champion of JD Motorsport after 2005?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"champions\" WHERE \"season\">2005 AND \"team_champion\"='jd motorsport';" } ]
[ { "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: Who is the constructor with the grid of 8?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"classification\" WHERE \"grid\"=8;" } ]
[ { "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 time/retired when the grid is less than 3 and 45 laps?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\"<3 AND \"laps\"=45;" } ]