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 \"final_competition_scores\" (\n \"state\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What state has a swimsuit less than 9.277, gown more than 8.944 and preliminary greater than 8.483?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"final_competition_scores\" WHERE \"swimsuit\"<9.277 AND \"evening_gown\">8.944 AND \"preliminary\"<8.483;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the average when interview is 9.465 and evening gown is less than 9.454?" }, { "role": "assistant", "content": "SELECT SUM(\"average\") FROM \"final_competition_scores\" WHERE \"interview\"=9.465 AND \"evening_gown\"<9.454;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the best preliminary score from a contestant from Oklahoma with evening gown less than 8.853?" }, { "role": "assistant", "content": "SELECT MAX(\"preliminary\") FROM \"final_competition_scores\" WHERE \"state\"='oklahoma' AND \"evening_gown\"<8.853;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text\n);\n\nQuestion: What is Written By, when Originalairdate is 25 April 1993?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"episodes\" WHERE \"originalairdate\"='25 april 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text\n);\n\nQuestion: What is Directed By, when Episode # is 7?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"episodes\" WHERE \"episode_num\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" text,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"position\" text\n);\n\nQuestion: WHAT IS THE LOWEST AVERAGE FINISH FOR 40TH POSITION, WITH A TOP 5 LARGER THAN 0?" }, { "role": "assistant", "content": "SELECT MIN(\"avg_finish\") FROM \"nascar_sprint_cup_series\" WHERE \"position\"='40th' AND \"top_5\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"country\" text,\n \"first_store\" text,\n \"hypermarkets\" text,\n \"supermarkets\" text,\n \"hard_discounters\" text\n);\n\nQuestion: What country has 50 supermarkets?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"europe\" WHERE \"supermarkets\"='50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"country\" text,\n \"first_store\" text,\n \"hypermarkets\" text,\n \"supermarkets\" text,\n \"hard_discounters\" text\n);\n\nQuestion: What country has 370 supermarkets?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"europe\" WHERE \"supermarkets\"='370';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"country\" text,\n \"first_store\" text,\n \"hypermarkets\" text,\n \"supermarkets\" text,\n \"hard_discounters\" text\n);\n\nQuestion: What country has a fire store of 1991 and a hard discounter of 397?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"europe\" WHERE \"first_store\"='1991' AND \"hard_discounters\"='397';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: Which engine is in all rounds with Tsugio Matsuda driving?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"rounds\"='all' AND \"driver\"='tsugio matsuda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: Which engine is used by Team Lemans with Hiroaki Ishiura driving?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"team\"='team lemans' AND \"driver\"='hiroaki ishiura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eliminations_standing\" (\n \"rank\" real,\n \"team\" text,\n \"loss\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the least rank with more than 3 losses and less than 25 sets lost?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"eliminations_standing\" WHERE \"loss\">3 AND \"sets_lost\"<25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eliminations_standing\" (\n \"rank\" real,\n \"team\" text,\n \"loss\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the least rank with more than 16 sets won and less than 1 loss?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"eliminations_standing\" WHERE \"sets_won\">16 AND \"loss\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team when the away team was Telford United?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fifth_round_proper\" WHERE \"away_team\"='telford united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the away team was West Ham United?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"away_team\"='west ham united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Tie Number when the home team was West Ham United?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"home_team\"='west ham united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ultra_low_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"voltage_range\" text,\n \"socket\" text\n);\n\nQuestion: Name the Model Number which has a FSB Speed of 400 mhz?" }, { "role": "assistant", "content": "SELECT \"model_number\" FROM \"ultra_low_voltage_90_nm\" WHERE \"fsb_speed\"='400 mhz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ultra_low_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"voltage_range\" text,\n \"socket\" text\n);\n\nQuestion: Name the Voltage Range which has a FSB Speed of 400 mhz, and a Clock Speed of 1 ghz?" }, { "role": "assistant", "content": "SELECT \"voltage_range\" FROM \"ultra_low_voltage_90_nm\" WHERE \"fsb_speed\"='400 mhz' AND \"clock_speed\"='1 ghz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ultra_low_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"voltage_range\" text,\n \"socket\" text\n);\n\nQuestion: Name the L2 Cache which has a Clock Speed of 1.5 ghz?" }, { "role": "assistant", "content": "SELECT \"l2_cache\" FROM \"ultra_low_voltage_90_nm\" WHERE \"clock_speed\"='1.5 ghz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the earliest game against Orlando?" }, { "role": "assistant", "content": "SELECT MIN(\"game\") FROM \"regular_season\" WHERE \"team\"='orlando';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Week has an Attendance of 72,855?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\"='72,855';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Week has a Date of december 8, 1991?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"date\"='december 8, 1991';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Opponent has a Date of november 24, 1991?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 24, 1991';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_200_most_topographically_isolated_su\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"state\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which location has a rank of 147?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"the_200_most_topographically_isolated_su\" WHERE \"rank\"=147;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_200_most_topographically_isolated_su\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"state\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which mountain range contains Sierra Blanca Peak?" }, { "role": "assistant", "content": "SELECT \"mountain_range\" FROM \"the_200_most_topographically_isolated_su\" WHERE \"mountain_peak\"='sierra blanca peak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_200_most_topographically_isolated_su\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"state\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which location is in Oregon, ranked under 121, and contains Mount McLoughlin?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"the_200_most_topographically_isolated_su\" WHERE \"state\"='oregon' AND \"rank\"<121 AND \"mountain_peak\"='mount mcloughlin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"golden_globe_awards_fictional_presidents\" (\n \"year\" real,\n \"category\" text,\n \"president\" text,\n \"nominee\" text,\n \"film_or_television_series_or_miniseries\" text\n);\n\nQuestion: What is the film, television series, or miniseries with a nomination in 2001?" }, { "role": "assistant", "content": "SELECT \"film_or_television_series_or_miniseries\" FROM \"golden_globe_awards_fictional_presidents\" WHERE \"year\"=2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"golden_globe_awards_fictional_presidents\" (\n \"year\" real,\n \"category\" text,\n \"president\" text,\n \"nominee\" text,\n \"film_or_television_series_or_miniseries\" text\n);\n\nQuestion: In what year was Martin Sheen nominated?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"golden_globe_awards_fictional_presidents\" WHERE \"nominee\"='martin sheen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"golden_globe_awards_fictional_presidents\" (\n \"year\" real,\n \"category\" text,\n \"president\" text,\n \"nominee\" text,\n \"film_or_television_series_or_miniseries\" text\n);\n\nQuestion: Who was the president in 1999?" }, { "role": "assistant", "content": "SELECT \"president\" FROM \"golden_globe_awards_fictional_presidents\" WHERE \"year\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Date has a Status of second test?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"matches\" WHERE \"status\"='second test';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Venue has an Against of 25?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"matches\" WHERE \"against\"=25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Status has a Date of 19/05/1981?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"matches\" WHERE \"date\"='19/05/1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Against has a Date of 30/05/1981?" }, { "role": "assistant", "content": "SELECT COUNT(\"against\") FROM \"matches\" WHERE \"date\"='30/05/1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Date has an Against smaller than 21, and a Status of second test?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"matches\" WHERE \"against\"<21 AND \"status\"='second test';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_marcellus_formation_from_\" (\n \"buffalo\" text,\n \"rochester\" text,\n \"syracuse\" text,\n \"utica\" text,\n \"albany\" text\n);\n\nQuestion: What is Rochester, when Syracuse is Cardiff Dark Gray Shale, and when Albany is (Mt. Marion Fm.)?" }, { "role": "assistant", "content": "SELECT \"rochester\" FROM \"members_of_the_marcellus_formation_from_\" WHERE \"syracuse\"='cardiff dark gray shale' AND \"albany\"='(mt. marion fm.)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_marcellus_formation_from_\" (\n \"buffalo\" text,\n \"rochester\" text,\n \"syracuse\" text,\n \"utica\" text,\n \"albany\" text\n);\n\nQuestion: What is Albany, when Buffalo is Oatka Creek Shale, and when Syracuse is Cardiff Dark Gray Shale?" }, { "role": "assistant", "content": "SELECT \"albany\" FROM \"members_of_the_marcellus_formation_from_\" WHERE \"buffalo\"='oatka creek shale' AND \"syracuse\"='cardiff dark gray shale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_marcellus_formation_from_\" (\n \"buffalo\" text,\n \"rochester\" text,\n \"syracuse\" text,\n \"utica\" text,\n \"albany\" text\n);\n\nQuestion: What is Syracuse, when Utica is Union Springs Shale And Limestone, and when Rochester is Union Springs Shale And Limestone?" }, { "role": "assistant", "content": "SELECT \"syracuse\" FROM \"members_of_the_marcellus_formation_from_\" WHERE \"utica\"='union springs shale and limestone' AND \"rochester\"='union springs shale and limestone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_marcellus_formation_from_\" (\n \"buffalo\" text,\n \"rochester\" text,\n \"syracuse\" text,\n \"utica\" text,\n \"albany\" text\n);\n\nQuestion: What is Syracuse, when Utica is Solsville Shale And Sandstone?" }, { "role": "assistant", "content": "SELECT \"syracuse\" FROM \"members_of_the_marcellus_formation_from_\" WHERE \"utica\"='solsville shale and sandstone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_marcellus_formation_from_\" (\n \"buffalo\" text,\n \"rochester\" text,\n \"syracuse\" text,\n \"utica\" text,\n \"albany\" text\n);\n\nQuestion: What is Syracuse, when Buffalo is Oatka Creek Shale, and when Albany is Berne?" }, { "role": "assistant", "content": "SELECT \"syracuse\" FROM \"members_of_the_marcellus_formation_from_\" WHERE \"buffalo\"='oatka creek shale' AND \"albany\"='berne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: What is the Name of the Players with a Rank of 18?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"ice_dancing\" WHERE \"rank\"=18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: How many Points for the couple ranking 17 with Placings larger than 100?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"ice_dancing\" WHERE \"placings\">100 AND \"rank\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: What is the Rank of the couple with less than 408.8 Points and Placings of 160?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"ice_dancing\" WHERE \"points\"<408.8 AND \"placings\"=160;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: What is the Place of the couple with a Rank smaller than 7 and 514.55 Points?" }, { "role": "assistant", "content": "SELECT SUM(\"placings\") FROM \"ice_dancing\" WHERE \"rank\"<7 AND \"points\"=514.55;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text\n);\n\nQuestion: What is the total Lane with a Mark of 47.02, and a Heat higher than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"lane\") FROM \"heats\" WHERE \"mark\"='47.02' AND \"heat\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text\n);\n\nQuestion: With a Mark of 46.47, What is the lowest Heat?" }, { "role": "assistant", "content": "SELECT MIN(\"heat\") FROM \"heats\" WHERE \"mark\"='46.47';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text\n);\n\nQuestion: What is the Country that has Richard Buck Lane higher than 3?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"heats\" WHERE \"lane\">3 AND \"name\"='richard buck';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"britain\" (\n \"name_dates\" text,\n \"eldest_daughter_from_date_to_date\" text,\n \"father\" text,\n \"date_married\" text,\n \"husband_dates\" text\n);\n\nQuestion: When did Louise, Princess royal get married?" }, { "role": "assistant", "content": "SELECT \"date_married\" FROM \"britain\" WHERE \"name_dates\"='louise, princess royal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"svenska_cupen_2005\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"round\" text,\n \"djurg_rden_scorers\" text,\n \"attendance\" text\n);\n\nQuestion: What are the Djurg\u00e5rden scorers that have a Score of 2-1?" }, { "role": "assistant", "content": "SELECT \"djurg_rden_scorers\" FROM \"svenska_cupen_2005\" WHERE \"score\"='2-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"svenska_cupen_2005\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"round\" text,\n \"djurg_rden_scorers\" text,\n \"attendance\" text\n);\n\nQuestion: What are the Opponents that have Djurg\u00e5rden scorers of sj\u00f6lund (2)?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"svenska_cupen_2005\" WHERE \"djurg_rden_scorers\"='sj\u00f6lund (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"svenska_cupen_2005\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"round\" text,\n \"djurg_rden_scorers\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Score that has a Date of 2005-10-29?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"svenska_cupen_2005\" WHERE \"date\"='2005-10-29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"svenska_cupen_2005\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"round\" text,\n \"djurg_rden_scorers\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Score that has an Attendance of 4 679?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"svenska_cupen_2005\" WHERE \"attendance\"='4 679';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"svenska_cupen_2005\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"round\" text,\n \"djurg_rden_scorers\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Date that has a Round of semifinal?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"svenska_cupen_2005\" WHERE \"round\"='semifinal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round is the highest one that has a College of arizona, and an Overall larger than 120?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='arizona' AND \"overall\">120;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick has a Name of ed hickerson, and a Round smaller than 10?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='ed hickerson' AND \"round\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How much Overall has a Pick of 10, and a Round smaller than 8, and a Position of e, and a College of tennessee?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"pick\"=10 AND \"round\"<8 AND \"position\"='e' AND \"college\"='tennessee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was the away team Morecambe?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"away_team\"='morecambe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What team was the away team when the home team was Grimsby Town?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"home_team\"='grimsby town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What team was the away team when the home team was Hereford United?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"home_team\"='hereford united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What team was the away team when the tie no is 40?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_preliminary_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg score for the team with an Agg score of 151-134?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"second_preliminary_round\" WHERE \"agg\"='151-134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_preliminary_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the team Unics Kazan's 1st leg score?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"second_preliminary_round\" WHERE \"team_num1\"='unics kazan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_preliminary_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who was the first team when the second team was Kalise Gran Canaria?" }, { "role": "assistant", "content": "SELECT \"team_num1\" FROM \"second_preliminary_round\" WHERE \"team_num2\"='kalise gran canaria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_preliminary_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which second team had a first leg score of 83-69?" }, { "role": "assistant", "content": "SELECT \"team_num2\" FROM \"second_preliminary_round\" WHERE \"1st_leg\"='83-69';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_preliminary_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team #1 had a 2nd leg score of 88-83?" }, { "role": "assistant", "content": "SELECT \"team_num1\" FROM \"second_preliminary_round\" WHERE \"2nd_leg\"='88-83';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of game 30?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the high scorer in the Toronto game?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"team\"='toronto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the highest date in october for a game number larger than 8 with a record of 4-4-0?" }, { "role": "assistant", "content": "SELECT MAX(\"october\") FROM \"schedule_and_results\" WHERE \"record\"='4-4-0' AND \"game\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" real\n);\n\nQuestion: When the tom watson is playing for the United States and the To par is under 14, what's the total?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"missed_the_cut\" WHERE \"country\"='united states' AND \"to_par\"<14 AND \"player\"='tom watson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" real\n);\n\nQuestion: What player has a total of 158/" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"total\"='158';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" real\n);\n\nQuestion: If 1967 is the winning year and a player has a total recorded as wd with a To par under 16, what's the players name?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"total\"='wd' AND \"to_par\"<16 AND \"year_s_won\"='1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"team\" text,\n \"games\" text,\n \"disposals\" text,\n \"kicks\" text,\n \"handballs\" text,\n \"marks\" text,\n \"tackles\" text,\n \"goals\" text,\n \"behinds\" text\n);\n\nQuestion: How many kicks did he get in the year when he played 7 games?" }, { "role": "assistant", "content": "SELECT \"kicks\" FROM \"statistics\" WHERE \"games\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"team\" text,\n \"games\" text,\n \"disposals\" text,\n \"kicks\" text,\n \"handballs\" text,\n \"marks\" text,\n \"tackles\" text,\n \"goals\" text,\n \"behinds\" text\n);\n\nQuestion: How many marks did he get in 2005?" }, { "role": "assistant", "content": "SELECT \"marks\" FROM \"statistics\" WHERE \"season\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"record_by_competition\" (\n \"competition\" text,\n \"played\" real,\n \"millwall_wins\" real,\n \"drawn\" real,\n \"west_ham_wins\" real,\n \"millwall_goals\" real,\n \"west_ham_goals\" real\n);\n\nQuestion: How many wins did West Ham get when Millwall had more than 23 goal and 5 wins, and they tied 8 times?" }, { "role": "assistant", "content": "SELECT \"west_ham_wins\" FROM \"record_by_competition\" WHERE \"millwall_wins\">5 AND \"millwall_goals\">23 AND \"drawn\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"record_by_competition\" (\n \"competition\" text,\n \"played\" real,\n \"millwall_wins\" real,\n \"drawn\" real,\n \"west_ham_wins\" real,\n \"millwall_goals\" real,\n \"west_ham_goals\" real\n);\n\nQuestion: What is the least number of wins West Ham got when they tied 27 times?" }, { "role": "assistant", "content": "SELECT MIN(\"west_ham_wins\") FROM \"record_by_competition\" WHERE \"drawn\">27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: what is the attendance when the date is october 22, 2000?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='october 22, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"share_of_global_gdp_ppp_pct\" (\n \"region\" text,\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real\n);\n\nQuestion: What is the highest value for 2000, when the value for 1950 is 3.5, and when the value for 1970 is greater than 3.4?" }, { "role": "assistant", "content": "SELECT MAX(\"2000\") FROM \"share_of_global_gdp_ppp_pct\" WHERE \"1950\"=3.5 AND \"1970\">3.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"share_of_global_gdp_ppp_pct\" (\n \"region\" text,\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real\n);\n\nQuestion: What is the lowest value for 1990, when the Region is East Asia (10 Economies), and when 1960 has a value less than 12.6?" }, { "role": "assistant", "content": "SELECT MIN(\"1990\") FROM \"share_of_global_gdp_ppp_pct\" WHERE \"region\"='east asia (10 economies)' AND \"1960\"<12.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"share_of_global_gdp_ppp_pct\" (\n \"region\" text,\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real\n);\n\nQuestion: What is the average value for 1970, when the Region is East Europe (7 Economies), and when 2000 has a value greater than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"1970\") FROM \"share_of_global_gdp_ppp_pct\" WHERE \"region\"='east europe (7 economies)' AND \"2000\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"share_of_global_gdp_ppp_pct\" (\n \"region\" text,\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real\n);\n\nQuestion: What is the highest value for 1970, when the value for 1960 is less than 61.9, when the value for 1980 is less than 3.8, when the value for 1990 is 3.3, and when the value for 2000 is greater than 3.2?" }, { "role": "assistant", "content": "SELECT MAX(\"1970\") FROM \"share_of_global_gdp_ppp_pct\" WHERE \"1960\"<61.9 AND \"1980\"<3.8 AND \"1990\"=3.3 AND \"2000\">3.2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"share_of_global_gdp_ppp_pct\" (\n \"region\" text,\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real\n);\n\nQuestion: What is the lowest value for 1960, when the value for 2000 is less than 8.4, when the value for 1950 is greater than 3.5, and when the value for 1990 is less than 3.3?" }, { "role": "assistant", "content": "SELECT MIN(\"1960\") FROM \"share_of_global_gdp_ppp_pct\" WHERE \"2000\"<8.4 AND \"1950\">3.5 AND \"1990\"<3.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What average drawn has a played greater than 42?" }, { "role": "assistant", "content": "SELECT AVG(\"drawn\") FROM \"final_table\" WHERE \"played\">42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What is the highest played that has a position less than 17, and 63 as the goals for?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"final_table\" WHERE \"position\"<17 AND \"goals_for\"=63;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What is the lowest played that has a position greater than 6, 61 as the goals against, with a loss less than 16?" }, { "role": "assistant", "content": "SELECT MIN(\"played\") FROM \"final_table\" WHERE \"position\">6 AND \"goals_against\"=61 AND \"lost\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What is the highest goals for that has a drawn less than 11, with a played less than 42?" }, { "role": "assistant", "content": "SELECT MAX(\"goals_for\") FROM \"final_table\" WHERE \"drawn\"<11 AND \"played\"<42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What is the average goals for that has +40 as the goals difference, with points 1 greater than 55?" }, { "role": "assistant", "content": "SELECT AVG(\"goals_for\") FROM \"final_table\" WHERE \"goal_difference\"='+40' AND \"points_1\">55;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Can you tell me the average Total that has the To par of 15?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"missed_the_cut\" WHERE \"to_par\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Can you tell me the Country that has the To par larger than 9, and the Year(s) won of 1984?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"to_par\">9 AND \"year_s_won\"='1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"turkish_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: Who produced the track that is 4:16 long?" }, { "role": "assistant", "content": "SELECT \"producer_s\" FROM \"turkish_cd_track_listings\" WHERE \"length\"='4:16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"turkish_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: Who produced track 7?" }, { "role": "assistant", "content": "SELECT \"producer_s\" FROM \"turkish_cd_track_listings\" WHERE \"track\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contracts\" (\n \"nat\" text,\n \"name\" text,\n \"status\" text,\n \"contract_length\" text,\n \"expiry_date\" real,\n \"source\" text\n);\n\nQuestion: What is the contract length when rejected is the status?" }, { "role": "assistant", "content": "SELECT \"contract_length\" FROM \"contracts\" WHERE \"status\"='rejected';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the average drawn when the points is more than 15, lost is 1 and played is less than 14?" }, { "role": "assistant", "content": "SELECT AVG(\"drawn\") FROM \"first_round\" WHERE \"points\">15 AND \"lost\"=1 AND \"played\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the lowest position when points is more than 11, name is ea schongau and lost is less than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"first_round\" WHERE \"points\">11 AND \"name\"='ea schongau' AND \"lost\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the average lost when played is more than 14?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"first_round\" WHERE \"played\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the sum of drawn when points is less than 15, lost is 8 and position is more than 6?" }, { "role": "assistant", "content": "SELECT SUM(\"drawn\") FROM \"first_round\" WHERE \"points\"<15 AND \"lost\"=8 AND \"position\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the lowest points when name is ehc m\u00fcnchen ii and position is less than 7?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"first_round\" WHERE \"name\"='ehc m\u00fcnchen ii' AND \"position\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: what is the result when the week is earlier than 9 and attendance is 25,188?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"week\"<9 AND \"attendance\"='25,188';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is Team, when High Points is \"Rashard Lewis (18)\"?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_points\"='rashard lewis (18)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is High Rebounds, when High Assists is \"Rafer Alston , Rashard Lewis , Hedo T\u00fcrko\u011flu (3)\"?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"high_assists\"='rafer alston , rashard lewis , hedo t\u00fcrko\u011flu (3)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is Team, when High Points is \"Rashard Lewis , Micka\u00ebl Pi\u00e9trus (17)\"?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_points\"='rashard lewis , micka\u00ebl pi\u00e9trus (17)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the highest Game, when Team is \"Celtics\", and when High Assists is \"Hedo T\u00fcrko\u011flu (4)\"?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"team\"='celtics' AND \"high_assists\"='hedo t\u00fcrko\u011flu (4)';" } ]