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 \"top_40_albums_of_2004\" (\n \"position\" real,\n \"album_title\" text,\n \"artist\" text,\n \"highest_position\" real,\n \"sales\" real\n);\n\nQuestion: What is the lowest high position for 10 years of hits, and over 870,000 sales?" }, { "role": "assistant", "content": "SELECT MIN(\"highest_position\") FROM \"top_40_albums_of_2004\" WHERE \"album_title\"='10 years of hits' AND \"sales\">'870,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_40_albums_of_2004\" (\n \"position\" real,\n \"album_title\" text,\n \"artist\" text,\n \"highest_position\" real,\n \"sales\" real\n);\n\nQuestion: What is the average high position for the album unwritten?" }, { "role": "assistant", "content": "SELECT AVG(\"highest_position\") FROM \"top_40_albums_of_2004\" WHERE \"album_title\"='unwritten';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"formula_one_2004_race_schedule\" (\n \"round\" real,\n \"race_title\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: When did the Grand Prix de Monaco race?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"formula_one_2004_race_schedule\" WHERE \"race_title\"='grand prix de monaco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"formula_one_2004_race_schedule\" (\n \"round\" real,\n \"race_title\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What circuit had 16 rounds?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"formula_one_2004_race_schedule\" WHERE \"round\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"formula_one_2004_race_schedule\" (\n \"round\" real,\n \"race_title\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: Which Grand Prix had 9 rounds?" }, { "role": "assistant", "content": "SELECT \"grand_prix\" FROM \"formula_one_2004_race_schedule\" WHERE \"round\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fares\" (\n \"fare_categories\" text,\n \"base_fares\" text,\n \"day_pass\" text,\n \"7_day_pass\" text,\n \"30_day_pass\" text\n);\n\nQuestion: What is the Base Fare in the senior/disabled category?" }, { "role": "assistant", "content": "SELECT \"base_fares\" FROM \"fares\" WHERE \"fare_categories\"='senior/disabled';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fares\" (\n \"fare_categories\" text,\n \"base_fares\" text,\n \"day_pass\" text,\n \"7_day_pass\" text,\n \"30_day_pass\" text\n);\n\nQuestion: Which 30-day Pass has a Base Fare of $3?" }, { "role": "assistant", "content": "SELECT \"30_day_pass\" FROM \"fares\" WHERE \"base_fares\"='$3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bus_fleet\" (\n \"year\" text,\n \"make_model\" text,\n \"length\" text,\n \"engine_type\" text,\n \"numbers\" text\n);\n\nQuestion: What is the length for years 2012-2013?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"bus_fleet\" WHERE \"year\"='2012-2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bus_fleet\" (\n \"year\" text,\n \"make_model\" text,\n \"length\" text,\n \"engine_type\" text,\n \"numbers\" text\n);\n\nQuestion: If length is ft (m) with numbers of 6600-6684 (84 buses) for 2003, what is the engine type?" }, { "role": "assistant", "content": "SELECT \"engine_type\" FROM \"bus_fleet\" WHERE \"length\"='ft (m)' AND \"year\"='2003' AND \"numbers\"='6600-6684 (84 buses)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bus_fleet\" (\n \"year\" text,\n \"make_model\" text,\n \"length\" text,\n \"engine_type\" text,\n \"numbers\" text\n);\n\nQuestion: For numbers of 2600-2825 (223 buses), what is the length?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"bus_fleet\" WHERE \"numbers\"='2600-2825 (223 buses)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bus_fleet\" (\n \"year\" text,\n \"make_model\" text,\n \"length\" text,\n \"engine_type\" text,\n \"numbers\" text\n);\n\nQuestion: What is the lenth of a 2003 Make & Model of nabi 35-lfw?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"bus_fleet\" WHERE \"year\"='2003' AND \"make_model\"='nabi 35-lfw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bus_fleet\" (\n \"year\" text,\n \"make_model\" text,\n \"length\" text,\n \"engine_type\" text,\n \"numbers\" text\n);\n\nQuestion: What is the length for a diesel engine with numbers of tbd (13 buses)?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"bus_fleet\" WHERE \"engine_type\"='diesel' AND \"numbers\"='tbd (13 buses)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bus_fleet\" (\n \"year\" text,\n \"make_model\" text,\n \"length\" text,\n \"engine_type\" text,\n \"numbers\" text\n);\n\nQuestion: What year has a make & model of mci d4000n?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"bus_fleet\" WHERE \"make_model\"='mci d4000n';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_sunk_or_captured_by_moewe_on_her_s\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real\n);\n\nQuestion: What type has a Date of 8 dec 16, and a Ship of duchess of cornwall?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"ships_sunk_or_captured_by_moewe_on_her_s\" WHERE \"date\"='8 dec 16' AND \"ship\"='duchess of cornwall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_sunk_or_captured_by_moewe_on_her_s\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real\n);\n\nQuestion: Which Nationality has a Tonnage GRT larger than 2,890, and a Ship of mount temple?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"ships_sunk_or_captured_by_moewe_on_her_s\" WHERE \"tonnage_grt\">'2,890' AND \"ship\"='mount temple';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_sunk_or_captured_by_moewe_on_her_s\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real\n);\n\nQuestion: Which nationality has a Ship of minteh?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"ships_sunk_or_captured_by_moewe_on_her_s\" WHERE \"ship\"='minteh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_sunk_or_captured_by_moewe_on_her_s\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real\n);\n\nQuestion: What is the total Tonnage GRT with a Type of cargo ship, and a Nationality of norway?" }, { "role": "assistant", "content": "SELECT SUM(\"tonnage_grt\") FROM \"ships_sunk_or_captured_by_moewe_on_her_s\" WHERE \"type\"='cargo ship' AND \"nationality\"='norway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_sunk_or_captured_by_moewe_on_her_s\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real\n);\n\nQuestion: Which Date has a Ship of hallbjorg?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"ships_sunk_or_captured_by_moewe_on_her_s\" WHERE \"ship\"='hallbjorg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the score of set 3 when the total is 45\u201331?" }, { "role": "assistant", "content": "SELECT \"set_3\" FROM \"pool_e\" WHERE \"total\"='45\u201331';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the score for set 2 when set 3 was 15\u20136?" }, { "role": "assistant", "content": "SELECT \"set_2\" FROM \"pool_e\" WHERE \"set_3\"='15\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the total when the score of set 1 was 15\u201311?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"pool_e\" WHERE \"set_1\"='15\u201311';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the total when the score of set 1 is 15\u201311?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"pool_e\" WHERE \"set_1\"='15\u201311';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: On what date was the total 25\u201345?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"pool_e\" WHERE \"total\"='25\u201345';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the Away team when the score of the Home team was 13.14 (92)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_team_score\"='13.14 (92)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was St Kilda's score as the Away team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" 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_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At what Venue was the Home team score 17.19 (121)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"home_team_score\"='17.19 (121)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At the venue Vfl Park, what was the Home team score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_7\" 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 \"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: How many Reg GP does daniel rahimi have with a rd # greater than 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='daniel rahimi' 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 Pick # with michael grabner and less than 20 Reg GP?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='michael grabner' AND \"reg_gp\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_fells\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: Which class has a peak named fountains fell south top?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"southern_fells\" WHERE \"peak\"='fountains fell south top';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_fells\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: What is the total of Prom in M for Peak great knoutberry hill?" }, { "role": "assistant", "content": "SELECT SUM(\"prom_m\") FROM \"southern_fells\" WHERE \"peak\"='great knoutberry hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"southern_fells\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: What is the average height for hewitt class, with prom less than 86, and a Peak of gragareth?" }, { "role": "assistant", "content": "SELECT AVG(\"height_m\") FROM \"southern_fells\" WHERE \"class\"='hewitt' AND \"prom_m\"<86 AND \"peak\"='gragareth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: In which movie is Selva Nambi a co-singer?" }, { "role": "assistant", "content": "SELECT \"movie\" FROM \"tamil_songs\" WHERE \"co_singers\"='selva nambi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: Who was the music director in 1994?" }, { "role": "assistant", "content": "SELECT \"music_director\" FROM \"tamil_songs\" WHERE \"year\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_london_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What years was Denis Lawson nominated for an award?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"2008_london_revival\" WHERE \"nominee\"='denis lawson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_london_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Did Jason Pennycooke win the award he was nominated for?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"2008_london_revival\" WHERE \"nominee\"='jason pennycooke';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_london_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: How many years was Best Musical Revival nominated?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"2008_london_revival\" WHERE \"nominee\"='best musical revival';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_london_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What award was Denis Lawson nominated for in the Best Actor in a Musical category?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"2008_london_revival\" WHERE \"category\"='best actor in a musical' AND \"nominee\"='denis lawson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_6_4_titles_2_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which opponent has an Outcome of winner, and a Date of 5 november 2011?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_6_4_titles_2_runners_up\" WHERE \"outcome\"='winner' AND \"date\"='5 november 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_6_4_titles_2_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which date has a Score of 4\u20136, 2\u20136?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_6_4_titles_2_runners_up\" WHERE \"score\"='4\u20136, 2\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_6_4_titles_2_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which date has a Opponent of juan m\u00f3naco, and a Score of 6\u20132, 4\u20136, 7\u20136 (7\u20133)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_6_4_titles_2_runners_up\" WHERE \"opponent\"='juan m\u00f3naco' AND \"score\"='6\u20132, 4\u20136, 7\u20136 (7\u20133)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_6_4_titles_2_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which outcome has a Opponent of fernando verdasco?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles_6_4_titles_2_runners_up\" WHERE \"opponent\"='fernando verdasco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_6_4_titles_2_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which surface has an Opponent of fernando verdasco?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_6_4_titles_2_runners_up\" WHERE \"opponent\"='fernando verdasco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_6_4_titles_2_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which surface has a Date of 5 november 2011?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_6_4_titles_2_runners_up\" WHERE \"date\"='5 november 2011';" } ]
[ { "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: When the Venue was mcg what was the sum of all Crowds for that venue?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_16\" WHERE \"venue\"='mcg';" } ]
[ { "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: If the Away team is essendon, what was the Date they played?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_16\" 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_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: On what Date did the Away team essendon play?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_16\" 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_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: When the Home team was north melbourne what was the Date of the game?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_16\" WHERE \"home_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the record as of September 1?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the losing score on September 1?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='september 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_tournament_timeline\" (\n \"tournament\" text,\n \"1980\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1988 value when the 1987 value was 1r?" }, { "role": "assistant", "content": "SELECT \"1988\" FROM \"grand_slam_singles_tournament_timeline\" WHERE \"1987\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_tournament_timeline\" (\n \"tournament\" text,\n \"1980\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1981 value at the Tournament of Wimbledon?" }, { "role": "assistant", "content": "SELECT \"1981\" FROM \"grand_slam_singles_tournament_timeline\" WHERE \"tournament\"='wimbledon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roller_coasters\" (\n \"name\" text,\n \"model\" text,\n \"park\" text,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: What is the name of the rollercoaster that opened in 2004 in bobbejaanland?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"roller_coasters\" WHERE \"opened\"='2004' AND \"park\"='bobbejaanland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roller_coasters\" (\n \"name\" text,\n \"model\" text,\n \"park\" text,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the junior coaster model that opened in 2008?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"roller_coasters\" WHERE \"opened\"='2008' AND \"model\"='junior coaster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roller_coasters\" (\n \"name\" text,\n \"model\" text,\n \"park\" text,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: What is the model for Thor's Hammer which is listed as operating?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"roller_coasters\" WHERE \"status\"='operating' AND \"name\"='thor''s hammer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roller_coasters\" (\n \"name\" text,\n \"model\" text,\n \"park\" text,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: What is the name of the coaster that opened in 2011 and is a euro-fighter model?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"roller_coasters\" WHERE \"model\"='euro-fighter' AND \"opened\"='2011';" } ]
[ { "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 driver won the iv j.c.c. jersey road race?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"non_championship_race_results\" WHERE \"race_name\"='iv j.c.c. jersey road race';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What's the total number of games that had more than 34 points and exactly 3 losses?" }, { "role": "assistant", "content": "SELECT COUNT(\"games\") FROM \"all_time_record\" WHERE \"points\"=34 AND \"losses\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What's the total number of losses with less than 19 points and more than 36 games?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"all_time_record\" WHERE \"points\"<19 AND \"games\">36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: Which season has less than 26 points, more than 18 games, and exactly 13 losses?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"all_time_record\" WHERE \"points\"<26 AND \"games\">18 AND \"losses\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the highest crowd number of the game where the away team was south melbourne?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_3\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team score that played the away team of north melbourne?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" 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_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team score of the game that was played at princes park?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: If the Home team had a score of 21.22 (148), what is the sum of all Crowds?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_8\" WHERE \"home_team_score\"='21.22 (148)';" } ]
[ { "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: If the Home team is carlton, what's the lowest Crowd found?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_8\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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 is the average amount of attenders when away team score is 12.10 (82)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_19\" WHERE \"away_team_score\"='12.10 (82)';" } ]
[ { "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 is the away team score when the home team scored 11.11 (77)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_19\" WHERE \"home_team_score\"='11.11 (77)';" } ]
[ { "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: Where did the game take place when the away team score is 15.11 (101)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_19\" WHERE \"away_team_score\"='15.11 (101)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"block_a\" text,\n \"ryuji_hijikata\" text,\n \"shuji_kondo\" text,\n \"el_nosawa_mendoza\" text,\n \"pepe_michinoku\" text,\n \"katsuhiko_nakajima\" text\n);\n\nQuestion: What is the Block A value for an El NOSAWA Mendoza value of kondo (7:08)?" }, { "role": "assistant", "content": "SELECT \"block_a\" FROM \"2007\" WHERE \"el_nosawa_mendoza\"='kondo (7:08)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"block_a\" text,\n \"ryuji_hijikata\" text,\n \"shuji_kondo\" text,\n \"el_nosawa_mendoza\" text,\n \"pepe_michinoku\" text,\n \"katsuhiko_nakajima\" text\n);\n\nQuestion: What is the PEPE Michinoku value for a Ryuji Hijikata value of sabin (12:33)?" }, { "role": "assistant", "content": "SELECT \"pepe_michinoku\" FROM \"2007\" WHERE \"ryuji_hijikata\"='sabin (12:33)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"block_a\" text,\n \"ryuji_hijikata\" text,\n \"shuji_kondo\" text,\n \"el_nosawa_mendoza\" text,\n \"pepe_michinoku\" text,\n \"katsuhiko_nakajima\" text\n);\n\nQuestion: What is the Shuji Kondo value related to a PEPE Michinoku value of sabin (14:43)?" }, { "role": "assistant", "content": "SELECT \"shuji_kondo\" FROM \"2007\" WHERE \"pepe_michinoku\"='sabin (14:43)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"b\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: when did asts reach 0?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"b\" WHERE \"asts\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"b\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: beyond 2001, what is the lowest asts from a pos of sf?" }, { "role": "assistant", "content": "SELECT MIN(\"asts\") FROM \"b\" WHERE \"pos\"='sf' AND \"from\">2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"5701_5800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Tell me the declination with NGC number larger than 5750" }, { "role": "assistant", "content": "SELECT \"declination_j2000\" FROM \"5701_5800\" WHERE \"ngc_number\">5750;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_overall\" (\n \"competition\" text,\n \"current_position_round\" text,\n \"final_position_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: Tell me the final position for fa community shield" }, { "role": "assistant", "content": "SELECT \"final_position_round\" FROM \"competition_overall\" WHERE \"competition\"='fa community shield';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_overall\" (\n \"competition\" text,\n \"current_position_round\" text,\n \"final_position_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: Name the first match for 11 may 2008" }, { "role": "assistant", "content": "SELECT \"first_match\" FROM \"competition_overall\" WHERE \"last_match\"='11 may 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lifetime_distributor_share\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"lifetime_india_distributor_share\" real\n);\n\nQuestion: What is the total number of Lifetime India Distributor share earlier than 2009?" }, { "role": "assistant", "content": "SELECT COUNT(\"lifetime_india_distributor_share\") FROM \"lifetime_distributor_share\" WHERE \"year\"<2009;" } ]
[ { "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: When did South Melbourne play as the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_17\" 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_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 was the largest amount of spectators when St Kilda was the away team?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_17\" 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_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 was Richmond's score when it was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_17\" 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 \"3301_3400\" (\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) that has a constellation of hydra and a right ascension (j2000) of 10h46m44.9s?" }, { "role": "assistant", "content": "SELECT \"declination_j2000\" FROM \"3301_3400\" WHERE \"constellation\"='hydra' AND \"right_ascension_j2000\"='10h46m44.9s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3301_3400\" (\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 ngc number when the object type is lenticular galaxy and the constellation is hydra?" }, { "role": "assistant", "content": "SELECT MAX(\"ngc_number\") FROM \"3301_3400\" WHERE \"object_type\"='lenticular galaxy' AND \"constellation\"='hydra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3301_3400\" (\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 ngc number is 3314?" }, { "role": "assistant", "content": "SELECT \"object_type\" FROM \"3301_3400\" WHERE \"ngc_number\"=3314;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3301_3400\" (\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 ngc number when the constellation is leo and the declination (j2000) is \u00b042\u203213\u2033?" }, { "role": "assistant", "content": "SELECT AVG(\"ngc_number\") FROM \"3301_3400\" WHERE \"constellation\"='leo' AND \"declination_j2000\"='\u00b042\u203213\u2033';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3301_3400\" (\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) with the ngc number less than 3384, the constellation is hydra and the object type is spiral galaxy?" }, { "role": "assistant", "content": "SELECT \"right_ascension_j2000\" FROM \"3301_3400\" WHERE \"ngc_number\"<3384 AND \"constellation\"='hydra' AND \"object_type\"='spiral galaxy';" } ]
[ { "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 competition was played on October 7, 2011?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='october 7, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: What's the score for 1992, with the result of a loss?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"1990s\" WHERE \"year\"=1992 AND \"result\"='loss';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_and_fourth_tiers\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: What national league has limoges csp, and french basketball cup?" }, { "role": "assistant", "content": "SELECT \"national_league\" FROM \"third_and_fourth_tiers\" WHERE \"club\"='limoges csp' AND \"national_cup\"='french basketball cup';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_and_fourth_tiers\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: What is the club that has the turkish basketball cup and fiba eurochallenge (3rd tier)?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"third_and_fourth_tiers\" WHERE \"national_cup\"='turkish basketball cup' AND \"european_cup\"='fiba eurochallenge (3rd tier)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_and_fourth_tiers\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: What national cup has fc barcelona?" }, { "role": "assistant", "content": "SELECT \"national_cup\" FROM \"third_and_fourth_tiers\" WHERE \"club\"='fc barcelona';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"available_processors\" (\n \"series\" text,\n \"model\" text,\n \"cpu_clock_m_hz\" text,\n \"cpu_cores\" real,\n \"tdp_w\" text,\n \"l2_cache_ki_b\" text,\n \"radeon_cores\" real,\n \"ddr3_speed\" real\n);\n\nQuestion: Name the series ^ when the CPU clock is 1500 and the model is t-52r" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"available_processors\" WHERE \"cpu_clock_m_hz\"='1500' AND \"model\"='t-52r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"available_processors\" (\n \"series\" text,\n \"model\" text,\n \"cpu_clock_m_hz\" text,\n \"cpu_cores\" real,\n \"tdp_w\" text,\n \"l2_cache_ki_b\" text,\n \"radeon_cores\" real,\n \"ddr3_speed\" real\n);\n\nQuestion: Name the average DDR3 speed for model e-350" }, { "role": "assistant", "content": "SELECT AVG(\"ddr3_speed\") FROM \"available_processors\" WHERE \"model\"='e-350';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"available_processors\" (\n \"series\" text,\n \"model\" text,\n \"cpu_clock_m_hz\" text,\n \"cpu_cores\" real,\n \"tdp_w\" text,\n \"l2_cache_ki_b\" text,\n \"radeon_cores\" real,\n \"ddr3_speed\" real\n);\n\nQuestion: Name the CPU clock for L2 cache of 2*512 and series ^ of e-series and DDR3 speed of 1066" }, { "role": "assistant", "content": "SELECT \"cpu_clock_m_hz\" FROM \"available_processors\" WHERE \"l2_cache_ki_b\"='2*512' AND \"series\"='e-series' AND \"ddr3_speed\"=1066;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: who lost on august 21?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='august 21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: On August 10, what was the record against the Expos?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='expos' AND \"date\"='august 10';" } ]
[ { "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 lorenzo bandini with a grid under 3?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"driver\"='lorenzo bandini' AND \"grid\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What driver has under 53 laps, a grid smaller than 14, and a time/retired of differential?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"<53 AND \"grid\"<14 AND \"time_retired\"='differential';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacopetti_and_prosperi\" (\n \"title\" text,\n \"year\" real,\n \"country\" text,\n \"music\" text,\n \"uncut_run_time\" text\n);\n\nQuestion: What music is in the film with an Uncut run time of 95 minutes?" }, { "role": "assistant", "content": "SELECT \"music\" FROM \"jacopetti_and_prosperi\" WHERE \"uncut_run_time\"='95 minutes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacopetti_and_prosperi\" (\n \"title\" text,\n \"year\" real,\n \"country\" text,\n \"music\" text,\n \"uncut_run_time\" text\n);\n\nQuestion: What country is the film that has music of nino oliviero?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"jacopetti_and_prosperi\" WHERE \"music\"='nino oliviero';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacopetti_and_prosperi\" (\n \"title\" text,\n \"year\" real,\n \"country\" text,\n \"music\" text,\n \"uncut_run_time\" text\n);\n\nQuestion: What music is in the film before 1963?" }, { "role": "assistant", "content": "SELECT \"music\" FROM \"jacopetti_and_prosperi\" WHERE \"year\"<1963;" } ]