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 \"g_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What ship has a pennant number h05?" }, { "role": "assistant", "content": "SELECT \"ship\" FROM \"g_class\" WHERE \"pennant_number\"='h05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the launched date of the destroyer completed 25 February 1936?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"g_class\" WHERE \"completed\"='25 february 1936';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the launched date of the destroyer completed 1 July 1936?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"g_class\" WHERE \"completed\"='1 july 1936';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score when the VFL played at Western Oval?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_19\" WHERE \"venue\"='western oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_19\" (\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 North Melbourne's home opponent?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_19\" 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_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score when the VFL played at Princes Park?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_19\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpine_club_classification\" (\n \"ave_no\" real,\n \"name\" text,\n \"country\" text,\n \"highest_mountain\" text,\n \"height_m\" real\n);\n\nQuestion: Which sum of AVE-No has a Name of albula alps, and a Height (m) larger than 3418?" }, { "role": "assistant", "content": "SELECT SUM(\"ave_no\") FROM \"alpine_club_classification\" WHERE \"name\"='albula alps' AND \"height_m\">3418;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpine_club_classification\" (\n \"ave_no\" real,\n \"name\" text,\n \"country\" text,\n \"highest_mountain\" text,\n \"height_m\" real\n);\n\nQuestion: Which Height (m) has a Name of plessur alps, and a AVE-No larger than 63?" }, { "role": "assistant", "content": "SELECT MIN(\"height_m\") FROM \"alpine_club_classification\" WHERE \"name\"='plessur alps' AND \"ave_no\">63;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpine_club_classification\" (\n \"ave_no\" real,\n \"name\" text,\n \"country\" text,\n \"highest_mountain\" text,\n \"height_m\" real\n);\n\nQuestion: Which Name has a Height (m) of 2980?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"alpine_club_classification\" WHERE \"height_m\"=2980;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpine_club_classification\" (\n \"ave_no\" real,\n \"name\" text,\n \"country\" text,\n \"highest_mountain\" text,\n \"height_m\" real\n);\n\nQuestion: Which AVE-No has a Name of livigno alps?" }, { "role": "assistant", "content": "SELECT MIN(\"ave_no\") FROM \"alpine_club_classification\" WHERE \"name\"='livigno alps';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who was the winning driver when pole position was jenson button, the fastest lap was michael schumacher and the car was ferrari?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"grands_prix\" WHERE \"fastest_lap\"='michael schumacher' AND \"constructor\"='ferrari' AND \"pole_position\"='jenson button';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the pole position at the san marino grand prix with michael schumacher as winning driver?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"grands_prix\" WHERE \"winning_driver\"='michael schumacher' AND \"grand_prix\"='san marino 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 \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the Grand Prix for pole position of kimi r\u00e4ikk\u00f6nen" }, { "role": "assistant", "content": "SELECT \"grand_prix\" FROM \"grands_prix\" WHERE \"pole_position\"='kimi r\u00e4ikk\u00f6nen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"annual_events\" (\n \"event_name\" text,\n \"established\" real,\n \"category\" text,\n \"sub_category\" text,\n \"main_venue\" text\n);\n\nQuestion: How many Established groups have a multicultural sub category?" }, { "role": "assistant", "content": "SELECT COUNT(\"established\") FROM \"annual_events\" WHERE \"sub_category\"='multicultural';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"annual_events\" (\n \"event_name\" text,\n \"established\" real,\n \"category\" text,\n \"sub_category\" text,\n \"main_venue\" text\n);\n\nQuestion: Which is the category of the group was establishe in 1990?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"annual_events\" WHERE \"established\"=1990;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"annual_events\" (\n \"event_name\" text,\n \"established\" real,\n \"category\" text,\n \"sub_category\" text,\n \"main_venue\" text\n);\n\nQuestion: What is the category of the touchdown atlantic?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"annual_events\" WHERE \"event_name\"='touchdown atlantic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the result for 13 october 2004" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='13 october 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the date that has a friendly competition at rheinpark stadion, vaduz" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='friendly' AND \"venue\"='rheinpark stadion, vaduz';" } ]
[ { "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: Who is the constructor of John Surtees's Oulton Park circuit car?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"non_championship_race_results\" WHERE \"circuit\"='oulton park' AND \"winning_driver\"='john surtees';" } ]
[ { "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 was Matra the constructor?" }, { "role": "assistant", "content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"constructor\"='matra';" } ]
[ { "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 was at Hockenheim circuit?" }, { "role": "assistant", "content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"circuit\"='hockenheim';" } ]
[ { "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: Who was the winner of the XII Spring Trophy race with BRM as the constructor?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"non_championship_race_results\" WHERE \"constructor\"='brm' AND \"race_name\"='xii spring trophy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team at victoria park?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_8\" WHERE \"venue\"='victoria park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"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: Which venue has an Away team score of 17.14 (116)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_8\" WHERE \"away_team_score\"='17.14 (116)';" } ]
[ { "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: Which away team is from junction oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_8\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: Which Away team score has Home team score of 13.12 (90)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_8\" WHERE \"home_team_score\"='13.12 (90)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: What was the term of Hon Peter Morris?" }, { "role": "assistant", "content": "SELECT \"term_in_office\" FROM \"notes\" WHERE \"member\"='hon peter morris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: What party is the member that has an electorate of Lindsay?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"notes\" WHERE \"electorate\"='lindsay';" } ]
[ { "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 low lap total for the under 4 grid car driven by juan pablo montoya?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"race\" WHERE \"grid\"<4 AND \"driver\"='juan pablo montoya';" } ]
[ { "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 drove the grid 11 car?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=11;" } ]
[ { "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 total for cars with over 69 laps?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"laps\">69;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired with 22 laps and a grid of 29?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"125cc_classification\" WHERE \"laps\"=22 AND \"grid\"=29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest number of laps with a time of +6.643 and grid less than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"125cc_classification\" WHERE \"time_retired\"='+6.643' AND \"grid\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_effects\" (\n \"name\" text,\n \"dates_active\" text,\n \"windspeeds\" text,\n \"pressure\" text,\n \"deaths\" text\n);\n\nQuestion: When was there 204 deaths?" }, { "role": "assistant", "content": "SELECT \"dates_active\" FROM \"season_effects\" WHERE \"deaths\"='204';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west_indies\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: When is the birth date of player with right arm fast style?" }, { "role": "assistant", "content": "SELECT \"date_of_birth\" FROM \"west_indies\" WHERE \"bowling_style\"='right arm fast';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west_indies\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: What batting style corresponds to a bowling style of right arm medium for Stuart Williams?" }, { "role": "assistant", "content": "SELECT \"batting_style\" FROM \"west_indies\" WHERE \"bowling_style\"='right arm medium' AND \"player\"='stuart williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west_indies\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: What is the birth date for Mervyn Dillon?" }, { "role": "assistant", "content": "SELECT \"date_of_birth\" FROM \"west_indies\" WHERE \"player\"='mervyn dillon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position does Michael Ruffin play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"r\" WHERE \"player\"='michael ruffin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the center?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"r\" WHERE \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the Jazz player 1977-79?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"r\" WHERE \"years_for_jazz\"='1977-79';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Tell me the School/Club team of the player from the United States that play'de guard?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"r\" WHERE \"nationality\"='united states' AND \"position\"='guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What nationality is Bill Robinzine?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"r\" WHERE \"player\"='bill robinzine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What is the average of seasons for 10th place finishes?" }, { "role": "assistant", "content": "SELECT AVG(\"season\") FROM \"season_to_season\" WHERE \"position\"='10th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What season was there a 2nd place finish?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"season_to_season\" WHERE \"position\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What level for seasons after 2003, a Division of kakkonen (second division), and a Position of 12th?" }, { "role": "assistant", "content": "SELECT \"level\" FROM \"season_to_season\" WHERE \"season\">2003 AND \"division\"='kakkonen (second division)' AND \"position\"='12th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the streak on April 2?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"april\" WHERE \"date\"='april 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Who was the visiting team when the leading scorer was Jones : 20?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"april\" WHERE \"leading_scorer\"='jones : 20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"american_television_ratings\" (\n \"season\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" real\n);\n\nQuestion: How many people watched season 1?" }, { "role": "assistant", "content": "SELECT \"viewers_in_millions\" FROM \"american_television_ratings\" WHERE \"season\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"american_television_ratings\" (\n \"season\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" real\n);\n\nQuestion: What was the ranking of the season whose finale aired on May 15, 2011?" }, { "role": "assistant", "content": "SELECT \"ranking\" FROM \"american_television_ratings\" WHERE \"season_finale\"='may 15, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"american_television_ratings\" (\n \"season\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" real\n);\n\nQuestion: Which season premiered on November 27, 2012?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"american_television_ratings\" WHERE \"season_premiere\"='november 27, 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the PI GP of Rob Flockhart, who has a pick # less than 122 and a round # less than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pick_num\"<122 AND \"player\"='rob flockhart' AND \"rd_num\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the lowest reg gp of the player with a round # more than 2, a pick # of 80, and a PI GP larger than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\">2 AND \"pick_num\"=80 AND \"pl_gp\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"census_designated_places_in_new_york\" (\n \"cdp_name\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sq_mi\" real,\n \"water_sq_mi\" real,\n \"coordinates\" text,\n \"fips_code\" real,\n \"ansi_code\" real\n);\n\nQuestion: Name the highest FIPS code for coordinates of 41.827547, -74.118478 and land less than 1.196" }, { "role": "assistant", "content": "SELECT MAX(\"fips_code\") FROM \"census_designated_places_in_new_york\" WHERE \"coordinates\"='41.827547, -74.118478' AND \"land_sq_mi\"<1.196;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"census_designated_places_in_new_york\" (\n \"cdp_name\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sq_mi\" real,\n \"water_sq_mi\" real,\n \"coordinates\" text,\n \"fips_code\" real,\n \"ansi_code\" real\n);\n\nQuestion: Name the CDP name for FIPS code of 3659708" }, { "role": "assistant", "content": "SELECT \"cdp_name\" FROM \"census_designated_places_in_new_york\" WHERE \"fips_code\"=3659708;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"census_designated_places_in_new_york\" (\n \"cdp_name\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sq_mi\" real,\n \"water_sq_mi\" real,\n \"coordinates\" text,\n \"fips_code\" real,\n \"ansi_code\" real\n);\n\nQuestion: Name the FIPS code for county of wyoming and CDP name of pike" }, { "role": "assistant", "content": "SELECT \"fips_code\" FROM \"census_designated_places_in_new_york\" WHERE \"county\"='wyoming' AND \"cdp_name\"='pike';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"census_designated_places_in_new_york\" (\n \"cdp_name\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sq_mi\" real,\n \"water_sq_mi\" real,\n \"coordinates\" text,\n \"fips_code\" real,\n \"ansi_code\" real\n);\n\nQuestion: Name the sum of land for ANSI code of 2390496 and population less than 7,284" }, { "role": "assistant", "content": "SELECT SUM(\"land_sq_mi\") FROM \"census_designated_places_in_new_york\" WHERE \"ansi_code\"=2390496 AND \"pop_2010\"<'7,284';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: How many solo tackles for the player with over 0 TDs and over 0 sacks?" }, { "role": "assistant", "content": "SELECT MIN(\"solo\") FROM \"defense\" WHERE \"td_s\">0 AND \"sack\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: How many sacks for the player with over 1 tackle, under 3 assisted tackles, and over 0 yards?" }, { "role": "assistant", "content": "SELECT COUNT(\"sack\") FROM \"defense\" WHERE \"tackles\">1 AND \"assisted\"<3 AND \"yards\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\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 stamp design has a denomination of $1.18?" }, { "role": "assistant", "content": "SELECT \"design\" FROM \"2009\" WHERE \"denomination\"='$1.18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\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 denomination for the stamp issued 8 January 2009?" }, { "role": "assistant", "content": "SELECT \"denomination\" FROM \"2009\" WHERE \"date_of_issue\"='8 january 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\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 date was the John Belisle, Kosta Tsetsekas stamp issued?" }, { "role": "assistant", "content": "SELECT \"date_of_issue\" FROM \"2009\" WHERE \"design\"='john belisle, kosta tsetsekas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\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 first day cover cancellation for the Karen Smith Design stamp?" }, { "role": "assistant", "content": "SELECT \"first_day_cover_cancellation\" FROM \"2009\" WHERE \"design\"='karen smith design';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the date of Competition of 2008 africa cup of nations?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2008 africa cup of nations';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score on 22 january 2008?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='22 january 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which venue was used 22 january 2008?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='22 january 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What result has a Score of 1\u20130, and a Competition of 2014 fifa world cup qualification?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"score\"='1\u20130' AND \"competition\"='2014 fifa world cup qualification';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date was the Competition of 2014 fifa world cup qualification, with a Score of 1\u20130?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2014 fifa world cup qualification' AND \"score\"='1\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3501_3600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the object type when the right ascension (j2000) is 11h10m42.8s?" }, { "role": "assistant", "content": "SELECT \"object_type\" FROM \"3501_3600\" WHERE \"right_ascension_j2000\"='11h10m42.8s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3501_3600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the declination (j2000) when the ngc number is higher than 3593?" }, { "role": "assistant", "content": "SELECT \"declination_j2000\" FROM \"3501_3600\" WHERE \"ngc_number\">3593;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3501_3600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the constellation when the object type is spiral galaxy, the ngc number is less than 3593 and the right ascension (j2000) is 11h05m48.9s?" }, { "role": "assistant", "content": "SELECT \"constellation\" FROM \"3501_3600\" WHERE \"object_type\"='spiral galaxy' AND \"ngc_number\"<3593 AND \"right_ascension_j2000\"='11h05m48.9s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3501_3600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the right ascension (j2000) when the ngc number is 3576?" }, { "role": "assistant", "content": "SELECT \"right_ascension_j2000\" FROM \"3501_3600\" WHERE \"ngc_number\"=3576;" } ]
[ { "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 driver when the grid is 18?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"='18';" } ]
[ { "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 time/retired when the grid is 19?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was St Kilda's home team opponents score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score at Carlton's away match?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_14\" 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_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did Hawthorn play at home?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" 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_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in attendance at St Kilda's away match?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_14\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did the home team score 8.9 (57)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_14\" WHERE \"home_team_score\"='8.9 (57)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did the away team score 7.16 (58)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" WHERE \"away_team_score\"='7.16 (58)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: What is the date of the British Rail class 111 tslrb description?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"description\"='british rail class 111 tslrb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: What is the number & name with an Undergoing overhaul, restoration or repairs date?" }, { "role": "assistant", "content": "SELECT \"number_name\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"='undergoing overhaul, restoration or repairs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: What is the number & name of the livery in 1958?" }, { "role": "assistant", "content": "SELECT \"number_name\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"='1958';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"medal_count\" WHERE \"silver\">5 AND \"total\"=29 AND \"bronze\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest rank for a nation with 26 golds and over 17 silvers?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"medal_count\" WHERE \"gold\"=26 AND \"silver\">17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the catalog number with the date November 16, 2004?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='november 16, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the date of the item with a label of Sony BMG, Epic and a Catalog number 5187482?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='sony bmg, epic' AND \"catalog\"='5187482';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which Catalog has a Region of Canada and a Format of cd/dvd?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"region\"='canada' AND \"format\"='cd/dvd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the date for a CD format with a Region of Europe?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='europe' AND \"format\"='cd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What nationality is the la salle team?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"l\" WHERE \"school_club_team\"='la salle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What's the nationality of jim les?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"l\" WHERE \"player\"='jim les';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player has a nationality of spain?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"l\" WHERE \"nationality\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position is listed for the nebraska team?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"l\" WHERE \"school_club_team\"='nebraska';" } ]
[ { "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: On October 24, who played at home when there was a decision of Ward?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"october\" WHERE \"decision\"='ward' AND \"date\"='october 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: How many laps are there for grid 8?" }, { "role": "assistant", "content": "SELECT \"laps\" 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 driver for Grid 8?" }, { "role": "assistant", "content": "SELECT \"driver\" 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 average grid for Clay Regazzoni?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"driver\"='clay regazzoni';" } ]
[ { "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 average laps for the grid smaller than 21 for Renzo Zorzi?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"grid\"<21 AND \"driver\"='renzo zorzi';" } ]
[ { "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 average laps for Grid 9?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"grid\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ministries\" (\n \"order\" real,\n \"name\" text,\n \"party\" text,\n \"constituted\" text,\n \"concluded\" text\n);\n\nQuestion: Name the constituted for labor and scullin ministry" }, { "role": "assistant", "content": "SELECT \"constituted\" FROM \"ministries\" WHERE \"party\"='labor' AND \"name\"='scullin ministry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What location is the tournament with a 1st Prize larger than $202,500, and a Score of 274 (-14)?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tournament_results\" WHERE \"1st_prize\">'202,500' AND \"score\"='274 (-14)';" } ]