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 \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which NBA draft has a School of st. mary's high school?" }, { "role": "assistant", "content": "SELECT \"nba_draft\" FROM \"2007_boys_team\" WHERE \"school\"='st. mary''s high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which school has a Player of donte greene?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"2007_boys_team\" WHERE \"player\"='donte greene';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_16_december_2007\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"rank\" real,\n \"points\" real,\n \"a_krajka\" real,\n \"gj_leka\" real,\n \"b_haxhia\" real,\n \"d_tukiqi\" real,\n \"r_magjistari\" real,\n \"gj_xhuvani\" real,\n \"a_sk_nderaj\" real\n);\n\nQuestion: For R. Magjistari scores over 12, what is the highest number of points?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"final_16_december_2007\" WHERE \"r_magjistari\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_16_december_2007\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"rank\" real,\n \"points\" real,\n \"a_krajka\" real,\n \"gj_leka\" real,\n \"b_haxhia\" real,\n \"d_tukiqi\" real,\n \"r_magjistari\" real,\n \"gj_xhuvani\" real,\n \"a_sk_nderaj\" real\n);\n\nQuestion: For R. Magjistari scores under 6, D. Tukiqi scores of 6, and ranks under 5, what is the average A. Krajka score?" }, { "role": "assistant", "content": "SELECT AVG(\"a_krajka\") FROM \"final_16_december_2007\" WHERE \"r_magjistari\"<6 AND \"d_tukiqi\"=6 AND \"rank\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_information\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2006_2007_season\" text\n);\n\nQuestion: Where did the Vit\u00f3ria de Set\u00fabal club place in the 2006-2007 season?" }, { "role": "assistant", "content": "SELECT \"2006_2007_season\" FROM \"club_information\" WHERE \"club\"='vit\u00f3ria de set\u00fabal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the total number of TD's for long more than 6 and cars less than 4" }, { "role": "assistant", "content": "SELECT COUNT(\"td_s\") FROM \"running_backs\" WHERE \"long\">6 AND \"car\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the sum of Long for yards less than 197 and players of matt nagy" }, { "role": "assistant", "content": "SELECT SUM(\"long\") FROM \"running_backs\" WHERE \"yards\"<197 AND \"player\"='matt nagy';" } ]
[ { "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: Who was the visitor team in tampa bay?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"march\" WHERE \"home\"='tampa bay';" } ]
[ { "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: Who had a 32-29-8 record at home?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"march\" WHERE \"record\"='32-29-8';" } ]
[ { "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: Who had a 33-30-8 record at home?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"march\" WHERE \"record\"='33-30-8';" } ]
[ { "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 home teams score when North Melbourne played as the away team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_2\" 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_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: Who was the away team at Windy Hill?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: Where did Fitzroy play as the home team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_2\" WHERE \"home_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was away team at the home game of south melbourne?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_10\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score when they visited south melbourne?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the crowd when the away team scored 15.18 (108)?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_10\" WHERE \"away_team_score\"='15.18 (108)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when they scored 12.9 (81) at the game?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_10\" WHERE \"away_team_score\"='12.9 (81)';" } ]
[ { "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 highest crowd with north melbourne as away team?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_2\" 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_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 away team has a Home team score of 17.13 (115)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"home_team_score\"='17.13 (115)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which venue has a Home team of south melbourne?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_2\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What home score has an Away team of fitzroy?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 has a Venue of corio oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_9\" 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_9\" (\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 an Away team score of 7.9 (51)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"away_team_score\"='7.9 (51)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 away team has a Home team score of 4.4 (28)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_9\" WHERE \"home_team_score\"='4.4 (28)';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: Which team has an Away team of carlton?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"away_team\"='carlton';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: Which date has an Away team of richmond?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_9\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"province\" text,\n \"capital\" text,\n \"population_2005\" real,\n \"population_pct\" real,\n \"area_km\" real,\n \"area_pct\" real,\n \"density\" real\n);\n\nQuestion: How many regions have a capital of matanzas and a 2005 population under 670427?" }, { "role": "assistant", "content": "SELECT COUNT(\"area_km\") FROM \"summary\" WHERE \"capital\"='matanzas' AND \"population_2005\"<670427;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"province\" text,\n \"capital\" text,\n \"population_2005\" real,\n \"population_pct\" real,\n \"area_km\" real,\n \"area_pct\" real,\n \"density\" real\n);\n\nQuestion: What is the average area that has a Capital of camag\u00fcey, with a Population (%) larger than 7.02?" }, { "role": "assistant", "content": "SELECT AVG(\"area_km\") FROM \"summary\" WHERE \"capital\"='camag\u00fcey' AND \"population_pct\">7.02;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\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 Kings game attended by more than 18,630 people?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"october\" WHERE \"attendance\">'18,630';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\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 average attendance for a Kings game when they had a record of 1\u20135\u20130?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"october\" WHERE \"record\"='1\u20135\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wrestling_titles_by_team\" (\n \"team\" text,\n \"seasons\" text,\n \"regular_season\" text,\n \"tournament\" real,\n \"total\" real\n);\n\nQuestion: What team has over 1 tournament title, 0 in the regular season, and 2 total?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"wrestling_titles_by_team\" WHERE \"tournament\">1 AND \"regular_season\"='0' AND \"total\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wrestling_titles_by_team\" (\n \"team\" text,\n \"seasons\" text,\n \"regular_season\" text,\n \"tournament\" real,\n \"total\" real\n);\n\nQuestion: What is the total on average for teams with 3 tournaments?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"wrestling_titles_by_team\" WHERE \"tournament\"=3;" } ]
[ { "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 lowest grid when the laps is more than 7 and the driver is rubens barrichello?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"laps\">7 AND \"driver\"='rubens barrichello';" } ]
[ { "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 grid when the laps is more than 0, the time/retired is engine and the driver is pedro de la rosa?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"race\" WHERE \"laps\">0 AND \"time_retired\"='engine' AND \"driver\"='pedro de la rosa';" } ]
[ { "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 is the driver with the grid of 13?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: How many championships did the team or teams established in 1976 win?" }, { "role": "assistant", "content": "SELECT SUM(\"championships\") FROM \"professional_sports\" WHERE \"established\"=1976;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: Which WNBA team that won at least 2 championships was established most recently?" }, { "role": "assistant", "content": "SELECT MAX(\"established\") FROM \"professional_sports\" WHERE \"league\"='wnba' AND \"championships\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: What are the venues that host WNBA games?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"professional_sports\" WHERE \"league\"='wnba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"zimbabwe\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: Name the bowling style of the player born 16 march 1974" }, { "role": "assistant", "content": "SELECT \"bowling_style\" FROM \"zimbabwe\" WHERE \"date_of_birth\"='16 march 1974';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"zimbabwe\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: Name the batting style for heath streak" }, { "role": "assistant", "content": "SELECT \"batting_style\" FROM \"zimbabwe\" WHERE \"player\"='heath streak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the name of a building that has 52 floors?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=52;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: How many floors does the Custom House Tower have?" }, { "role": "assistant", "content": "SELECT COUNT(\"floors\") FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='custom house tower';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: How many floors does the building on 800 Boylston Street have?" }, { "role": "assistant", "content": "SELECT MAX(\"floors\") FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='800 boylston street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the street address for the Prudential Tower building?" }, { "role": "assistant", "content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='prudential tower';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: There is a building at 800 Boylston Street, how many floors does it have?" }, { "role": "assistant", "content": "SELECT SUM(\"floors\") FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='800 boylston street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What was the highest number of WJC Jews that had a WJC rank of 6 and a ARDA rank of more than 8?" }, { "role": "assistant", "content": "SELECT MAX(\"number_of_jews_wjc\") FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"rank_wjc\"=6 AND \"rank_arda\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What was the WJC rank in San Francisco metro area with the ASARB Jews less than 261,100 and WJC Jews of more than 210,000?" }, { "role": "assistant", "content": "SELECT AVG(\"rank_wjc\") FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"number_of_jews_asarb\"<'261,100' AND \"metro_area\"='san francisco' AND \"number_of_jews_wjc\">'210,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What was the number of WJC Jews with a WJC rank of 6?" }, { "role": "assistant", "content": "SELECT \"number_of_jews_wjc\" FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"rank_wjc\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What was the total number of WJC rank when the ARDA rank was less than 2 and ASARB Jews less than 2,028,200?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank_wjc\") FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"rank_arda\"<2 AND \"number_of_jews_asarb\"<'2,028,200';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: How many number of WJC Jews in the Los Angeles Metro Area has a ARDA rank of more than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"number_of_jews_wjc\") FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"metro_area\"='los angeles' AND \"rank_arda\">2;" } ]
[ { "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 drove during the race with less than 19 laps and a time listed as ignition?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"<19 AND \"time_retired\"='ignition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is his record for fights that went over 2 rounds in the Event of raging wolf 6: mayhem in the mist?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\">2 AND \"event\"='raging wolf 6: mayhem in the mist';" } ]
[ { "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: Where was the game played when the home team scored 16.19 (115)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"home_team_score\"='16.19 (115)';" } ]
[ { "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 is the highest number of people that attended a game at Moorabbin Oval?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_17\" WHERE \"venue\"='moorabbin oval';" } ]
[ { "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 did the home team Hawthorn score in the game attended by more than 14,922 people?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"crowd\">'14,922' AND \"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_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 is the least amount of people that attended a game when Essendon was the away team?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_17\" 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_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: Which date did South Melbourne play as the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_17\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners_by_year\" (\n \"year\" text,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: What is the constructor for Jackie Stewart's car?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"list_of_winners_by_year\" WHERE \"driver\"='jackie stewart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners_by_year\" (\n \"year\" text,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: What is the location where Denny Hulme was the driver?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"list_of_winners_by_year\" WHERE \"driver\"='denny hulme';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: What is number of the train that originated in Secunderabad Junction?" }, { "role": "assistant", "content": "SELECT \"train_no\" FROM \"train_services\" WHERE \"origin\"='secunderabad junction';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: From where did the train that arrived in the Anand Vihar Terminal originate?" }, { "role": "assistant", "content": "SELECT \"origin\" FROM \"train_services\" WHERE \"destination\"='anand vihar terminal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: From where did Train No. 15929/30 originate?" }, { "role": "assistant", "content": "SELECT \"origin\" FROM \"train_services\" WHERE \"train_no\"='15929/30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: What is the frequency of the train to Bangalore?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"train_services\" WHERE \"destination\"='bangalore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: What is the frequency of the Chennai Egmore Dibrugarh Express to Dibrugarh?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"train_services\" WHERE \"destination\"='dibrugarh' AND \"train_name\"='chennai egmore dibrugarh express';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"norwegian_americans_by_state\" (\n \"state\" text,\n \"norwegian_americans_2000\" real,\n \"percent_2000\" text,\n \"norwegian_americans_2009\" real,\n \"percent_2009\" text\n);\n\nQuestion: How many Norwegian Americans have Norwegian Americans (2000) of 109,744?" }, { "role": "assistant", "content": "SELECT COUNT(\"norwegian_americans_2009\") FROM \"norwegian_americans_by_state\" WHERE \"norwegian_americans_2000\"='109,744';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"norwegian_americans_by_state\" (\n \"state\" text,\n \"norwegian_americans_2000\" real,\n \"percent_2000\" text,\n \"norwegian_americans_2009\" real,\n \"percent_2009\" text\n);\n\nQuestion: Which state has a Percent (2009) of 6.2%?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"norwegian_americans_by_state\" WHERE \"percent_2009\"='6.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"origins_in_corporate_strategy\" (\n \"component\" text,\n \"integrated\" text,\n \"allied_related\" text,\n \"allied_unrelated\" text,\n \"holding\" text\n);\n\nQuestion: What is the holding of the customers?" }, { "role": "assistant", "content": "SELECT \"holding\" FROM \"origins_in_corporate_strategy\" WHERE \"component\"='customers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"origins_in_corporate_strategy\" (\n \"component\" text,\n \"integrated\" text,\n \"allied_related\" text,\n \"allied_unrelated\" text,\n \"holding\" text\n);\n\nQuestion: What Allied-Unrelated is labeled as \"common\"?" }, { "role": "assistant", "content": "SELECT \"allied_unrelated\" FROM \"origins_in_corporate_strategy\" WHERE \"allied_related\"='common';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"origins_in_corporate_strategy\" (\n \"component\" text,\n \"integrated\" text,\n \"allied_related\" text,\n \"allied_unrelated\" text,\n \"holding\" text\n);\n\nQuestion: Which integrated has an allied-related of some shared?" }, { "role": "assistant", "content": "SELECT \"integrated\" FROM \"origins_in_corporate_strategy\" WHERE \"allied_related\"='some shared';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"origins_in_corporate_strategy\" (\n \"component\" text,\n \"integrated\" text,\n \"allied_related\" text,\n \"allied_unrelated\" text,\n \"holding\" text\n);\n\nQuestion: What integrated has an allied-related of centralized?" }, { "role": "assistant", "content": "SELECT \"integrated\" FROM \"origins_in_corporate_strategy\" WHERE \"allied_related\"='centralized';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"origins_in_corporate_strategy\" (\n \"component\" text,\n \"integrated\" text,\n \"allied_related\" text,\n \"allied_unrelated\" text,\n \"holding\" text\n);\n\nQuestion: What component has an integrated of one?" }, { "role": "assistant", "content": "SELECT \"component\" FROM \"origins_in_corporate_strategy\" WHERE \"integrated\"='one';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"electoral_results_1990_2008\" (\n \"election\" real,\n \"candidates\" real,\n \"seats_won\" real,\n \"votes\" real,\n \"pct_of_vote\" real\n);\n\nQuestion: How many candidates had 0 percent of the vote in 1999?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"electoral_results_1990_2008\" WHERE \"pct_of_vote\"=0 AND \"election\"=1999 AND \"seats_won\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score of the game with Manu gin\u00f3bili (44) as the leading scorer?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"february\" WHERE \"leading_scorer\"='manu gin\u00f3bili (44)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the game on February 21, 2008?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"february\" WHERE \"date\"='february 21, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the home team of the game with manu gin\u00f3bili (34) as the leading scorer?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"february\" WHERE \"leading_scorer\"='manu gin\u00f3bili (34)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the game on February 25, 2008?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"february\" WHERE \"date\"='february 25, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What type is shown with a moving to of valenciennes?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"out\" WHERE \"moving_to\"='valenciennes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer window with n/a as the Transfer fee, free agent for the Moving to, and Joe Sagar as the name?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"out\" WHERE \"transfer_fee\"='n/a' AND \"moving_to\"='free agent' AND \"name\"='joe sagar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name of the person with a type of end of contract, nat of sco, and the Moving to is cardiff city?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"out\" WHERE \"type\"='end of contract' AND \"nat\"='sco' AND \"moving_to\"='cardiff city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What Transfer window that has a Transfer fee of free, with a Moving to of derby county?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"out\" WHERE \"transfer_fee\"='free' AND \"moving_to\"='derby county';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nl_los_angeles_dodgers_4_vs_al_new_york_\" (\n \"game\" real,\n \"score\" text,\n \"date\" text,\n \"location\" text,\n \"attendance\" real,\n \"time_of_game\" text\n);\n\nQuestion: What is the first game number that had attendance of 56,505?" }, { "role": "assistant", "content": "SELECT MIN(\"game\") FROM \"nl_los_angeles_dodgers_4_vs_al_new_york_\" WHERE \"attendance\"='56,505';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 size for the away team footscray?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_21\" WHERE \"away_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the away team score 10.12 (72)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_21\" WHERE \"away_team_score\"='10.12 (72)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Race Name has Goodwood in the Curcuit?" }, { "role": "assistant", "content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"circuit\"='goodwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Constructor has the Winning Driver, Jim Clark and the Circuit, Syracuse?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"non_championship_race_results\" WHERE \"winning_driver\"='jim clark' AND \"circuit\"='syracuse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Constructor has the Winning Driver, Jo Siffert?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"non_championship_race_results\" WHERE \"winning_driver\"='jo siffert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Constructor has Pergusa in the Circuit?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"non_championship_race_results\" WHERE \"circuit\"='pergusa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the smallest crowd that attended a game where the away team scored 14.19 (103)?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_1\" WHERE \"away_team_score\"='14.19 (103)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date was a game played at MCG?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_1\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average total medals of the team with 2 gold and less than 1 silver?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"gold\"=2 AND \"silver\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest amount of silver medals Iceland, who has less than 87 medals, has?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"nation\"='iceland' AND \"total\"<87;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least amount of bronze Andorra, who has more than 6 total medals, has?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='andorra' AND \"total\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest amount of bronze Liechtenstein, who has more than 11 gold, has?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='liechtenstein' AND \"gold\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average amount of silver medals Montenegro, who has less than 15 bronze and more than 11 total medals, has?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"bronze\"<15 AND \"nation\"='montenegro' AND \"total\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"support_of_leading_parties_and_blocs_by_\" (\n \"region\" text,\n \"voter_registration\" real,\n \"voter_turnout\" real,\n \"b_yu_t\" real,\n \"ou_psd\" real\n);\n\nQuestion: What is the lower turnout that has a byut of 50.7 and an ou psd smaller than 36.8?" }, { "role": "assistant", "content": "SELECT MIN(\"voter_turnout\") FROM \"support_of_leading_parties_and_blocs_by_\" WHERE \"b_yu_t\"=50.7 AND \"ou_psd\"<36.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"support_of_leading_parties_and_blocs_by_\" (\n \"region\" text,\n \"voter_registration\" real,\n \"voter_turnout\" real,\n \"b_yu_t\" real,\n \"ou_psd\" real\n);\n\nQuestion: What is the voter registration that has a BYut of 48.2?" }, { "role": "assistant", "content": "SELECT COUNT(\"voter_registration\") FROM \"support_of_leading_parties_and_blocs_by_\" WHERE \"b_yu_t\"=48.2;" } ]
[ { "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: Who was the home team at VFL Park?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"venue\"='vfl park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team at Kardinia Park?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"venue\"='kardinia park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What type of paper is the 1 cent denominations made on?" }, { "role": "assistant", "content": "SELECT \"paper_type\" FROM \"2007\" WHERE \"denomination\"='1 cent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"date_of_issue\" text,\n \"denomination\" text,\n \"design\" text,\n \"paper_type\" text,\n \"first_day_cover_cancellation\" text\n);\n\nQuestion: What is the paper type that the one that was issued on 26 july 2007 done on?" }, { "role": "assistant", "content": "SELECT \"paper_type\" FROM \"2007\" WHERE \"date_of_issue\"='26 july 2007';" } ]