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 \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team's score at punt road oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_14\" WHERE \"venue\"='punt road oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the home team at the Nuggets game that had a score of 116\u2013105?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"december\" WHERE \"score\"='116\u2013105';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"race\" WHERE \"time_retired\"='+2 laps' AND \"grid\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want the time/retired for eddie irvine" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='eddie irvine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What date was Rodger Ward the winning driver?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"winning_driver\"='rodger ward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"season_review\" WHERE \"winning_driver\"='jack brabham' AND \"race\"='monaco grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What driver was the winner when Joakim Bonnier was in the Pole Position?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"pole_position\"='joakim bonnier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What date was the Tyre d and Bruce Mclaren won?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"tyre\"='d' AND \"winning_driver\"='bruce mclaren';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What date was Joakim Bonnier in the pole position?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"pole_position\"='joakim bonnier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time for the racer on grid 19?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who made the car that Alberto Ascari went more than 35 laps on a grid less than 7?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"classification\" WHERE \"grid\"<7 AND \"laps\">35 AND \"driver\"='alberto ascari';" } ]
[ { "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 raced for more than 9 laps on grid 7?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\">9 AND \"grid\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"14_seats\" (\n \"riding\" text,\n \"candidate\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What is the Riding of the candidate Patricia Cordner who gained 7,190 votes?" }, { "role": "assistant", "content": "SELECT \"riding\" FROM \"14_seats\" WHERE \"votes\">'7,190' AND \"candidate\"='patricia cordner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_computer_system_emulators\" (\n \"name\" text,\n \"actual_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: Which License has an Actual Vaersion of 9.0?" }, { "role": "assistant", "content": "SELECT \"license\" FROM \"list_of_computer_system_emulators\" WHERE \"actual_version\"='9.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_computer_system_emulators\" (\n \"name\" text,\n \"actual_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: Which System has an Actual Version 9.0?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"list_of_computer_system_emulators\" WHERE \"actual_version\"='9.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_computer_system_emulators\" (\n \"name\" text,\n \"actual_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: Which System's Name is Gemulator?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"list_of_computer_system_emulators\" WHERE \"name\"='gemulator';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_computer_system_emulators\" (\n \"name\" text,\n \"actual_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: Which System's Name is Steem, and has a Freeware License?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"list_of_computer_system_emulators\" WHERE \"license\"='freeware' AND \"name\"='steem';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvist?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"november\" WHERE \"decision\"='holmqvist' AND \"attendance\">'16,526' AND \"visitor\"='carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the Lightning had a record of 10\u201313\u20132?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"november\" WHERE \"record\"='10\u201313\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the Lightning had a record of 9\u20138\u20131?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"november\" WHERE \"record\"='9\u20138\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the decision of the game when the Lightning had a record of 6\u20138\u20131?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"november\" WHERE \"record\"='6\u20138\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What pick was Dominic Uy?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"round_4\" WHERE \"player\"='dominic uy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What college did pick 33 attend?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_4\" WHERE \"pick\"=33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_by_district\" (\n \"city_district\" text,\n \"area_km\" text,\n \"population_2007_census_hab\" text,\n \"housing_2007\" text,\n \"density_hab_km\" text,\n \"elevation_msl\" text\n);\n\nQuestion: What is the elevation of the city with a number of 91,385 Housing dwellings in 2007?" }, { "role": "assistant", "content": "SELECT \"elevation_msl\" FROM \"population_by_district\" WHERE \"housing_2007\"='91,385';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_by_district\" (\n \"city_district\" text,\n \"area_km\" text,\n \"population_2007_census_hab\" text,\n \"housing_2007\" text,\n \"density_hab_km\" text,\n \"elevation_msl\" text\n);\n\nQuestion: What is the density of San Sebasti\u00e1n?" }, { "role": "assistant", "content": "SELECT \"density_hab_km\" FROM \"population_by_district\" WHERE \"city_district\"='san sebasti\u00e1n';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_by_district\" (\n \"city_district\" text,\n \"area_km\" text,\n \"population_2007_census_hab\" text,\n \"housing_2007\" text,\n \"density_hab_km\" text,\n \"elevation_msl\" text\n);\n\nQuestion: What is the density of the city with an elevation of 3,400 msl?" }, { "role": "assistant", "content": "SELECT \"density_hab_km\" FROM \"population_by_district\" WHERE \"elevation_msl\"='3,400 msl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_by_district\" (\n \"city_district\" text,\n \"area_km\" text,\n \"population_2007_census_hab\" text,\n \"housing_2007\" text,\n \"density_hab_km\" text,\n \"elevation_msl\" text\n);\n\nQuestion: What is the area of the city with a density of 8,546.1?" }, { "role": "assistant", "content": "SELECT \"area_km\" FROM \"population_by_district\" WHERE \"density_hab_km\"='8,546.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_by_district\" (\n \"city_district\" text,\n \"area_km\" text,\n \"population_2007_census_hab\" text,\n \"housing_2007\" text,\n \"density_hab_km\" text,\n \"elevation_msl\" text\n);\n\nQuestion: What is the area of the city with a density of 955.6?" }, { "role": "assistant", "content": "SELECT \"area_km\" FROM \"population_by_district\" WHERE \"density_hab_km\"='955.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_by_district\" (\n \"city_district\" text,\n \"area_km\" text,\n \"population_2007_census_hab\" text,\n \"housing_2007\" text,\n \"density_hab_km\" text,\n \"elevation_msl\" text\n);\n\nQuestion: What is the density of San Sebasti\u00e1n?" }, { "role": "assistant", "content": "SELECT \"density_hab_km\" FROM \"population_by_district\" WHERE \"city_district\"='san sebasti\u00e1n';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which Result has a Category of best book of a musical?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"original_broadway_production\" WHERE \"category\"='best book of a musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which Nominee has a Category of outstanding musical?" }, { "role": "assistant", "content": "SELECT \"nominee\" FROM \"original_broadway_production\" WHERE \"category\"='outstanding musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"record\" text,\n \"date\" text,\n \"driver\" text,\n \"time\" text,\n \"speed_avg_speed\" text\n);\n\nQuestion: What is the record time at the Nascar Camping World Truck Series?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"track_records\" WHERE \"record\"='nascar camping world truck series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"record\" text,\n \"date\" text,\n \"driver\" text,\n \"time\" text,\n \"speed_avg_speed\" text\n);\n\nQuestion: What date was the nascar nationwide series held?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"track_records\" WHERE \"date\"='nascar nationwide series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"record\" text,\n \"date\" text,\n \"driver\" text,\n \"time\" text,\n \"speed_avg_speed\" text\n);\n\nQuestion: Who holds the record time of 24.521 and where was it made?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"track_records\" WHERE \"time\"='24.521';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which time/retired has a grid of 9?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which driver's grid is 6?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: For which constructor does Juan Manuel Fangio drive?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='juan manuel fangio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which laps has a grid of 8?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"grid\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which grid is constructed by Maserati and driven by Oscar Alfredo G\u00e1lvez?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"race\" WHERE \"constructor\"='maserati' AND \"driver\"='oscar alfredo g\u00e1lvez';" } ]
[ { "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 \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: what was the engine when ken downing drove an entrant from connaught engineering?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"driver\"='ken downing' AND \"entrant\"='connaught engineering';" } ]
[ { "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 \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: who built the car driven by eric brandon?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"teams_and_drivers\" WHERE \"driver\"='eric brandon';" } ]
[ { "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 \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: what was the chassis built by simca-gordini and driven by max de terra?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"constructor\"='simca-gordini' AND \"driver\"='max de terra';" } ]
[ { "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 \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: kenneth mcalpine drove from which entrant?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"teams_and_drivers\" WHERE \"driver\"='kenneth mcalpine';" } ]
[ { "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 \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: with 6 rounds, and a 52 51/52 chassis, who is the driver?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"rounds\"='6' AND \"chassis\"='52 51/52';" } ]
[ { "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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance when the Braves were the opponent and the record was 56-53?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='braves' AND \"record\"='56-53';" } ]
[ { "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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent when the record was 61-57?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='61-57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps for jochen rindt?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"classification\" WHERE \"driver\"='jochen rindt';" } ]
[ { "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 grid total for jean-pierre beltoise?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"driver\"='jean-pierre beltoise';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time for the event in which Tony Mendoza was the opponent?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='tony mendoza';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average lap time for retired time of +23.707 and a Grid greater than 21?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"125cc_classification\" WHERE \"time_retired\"='+23.707' AND \"grid\">21;" } ]
[ { "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: When the away team scored 9.8 (62) what was the crowd turnout?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_8\" WHERE \"away_team_score\"='9.8 (62)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team plays at victoria park?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"venue\"='victoria park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Tell me the lowest avg for 6 yards and rec more than 1" }, { "role": "assistant", "content": "SELECT MIN(\"avg\") FROM \"wide_receivers\" WHERE \"yards\"=6 AND \"rec\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the sum of long for avg more than 9.8 with rec less than 5 and yards less than 20" }, { "role": "assistant", "content": "SELECT SUM(\"long\") FROM \"wide_receivers\" WHERE \"avg\">9.8 AND \"rec\"<5 AND \"yards\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the sum of long for avg less than 6 and rec less than 2" }, { "role": "assistant", "content": "SELECT SUM(\"long\") FROM \"wide_receivers\" WHERE \"avg\"<6 AND \"rec\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: Name the average TD's for andy mccullough with yards less than 434" }, { "role": "assistant", "content": "SELECT AVG(\"td_s\") FROM \"wide_receivers\" WHERE \"player\"='andy mccullough' AND \"yards\"<434;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"waitemata_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the lelast decile for roll of 428" }, { "role": "assistant", "content": "SELECT MIN(\"decile\") FROM \"waitemata_local_board\" WHERE \"roll\"=428;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"waitemata_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the most decile for roll of 428" }, { "role": "assistant", "content": "SELECT MAX(\"decile\") FROM \"waitemata_local_board\" WHERE \"roll\"=428;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"night_series_winners_1977_1987\" (\n \"year\" real,\n \"winners\" text,\n \"grand_finalist\" text,\n \"scores\" text,\n \"venue\" text,\n \"crowd\" real,\n \"margin\" real,\n \"season_result\" text\n);\n\nQuestion: What's the highest year than hawthorn won with a season result of preliminary finalist and a crowd smaller than 27,407?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"night_series_winners_1977_1987\" WHERE \"winners\"='hawthorn' AND \"season_result\"='preliminary finalist' AND \"crowd\"<'27,407';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"night_series_winners_1977_1987\" (\n \"year\" real,\n \"winners\" text,\n \"grand_finalist\" text,\n \"scores\" text,\n \"venue\" text,\n \"crowd\" real,\n \"margin\" real,\n \"season_result\" text\n);\n\nQuestion: What scores did grand finalist hawthorn have?" }, { "role": "assistant", "content": "SELECT \"scores\" FROM \"night_series_winners_1977_1987\" WHERE \"grand_finalist\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"night_series_winners_1977_1987\" (\n \"year\" real,\n \"winners\" text,\n \"grand_finalist\" text,\n \"scores\" text,\n \"venue\" text,\n \"crowd\" real,\n \"margin\" real,\n \"season_result\" text\n);\n\nQuestion: What grand finalist had a year after 1979, a margin smaller than 30, and winners of essendon?" }, { "role": "assistant", "content": "SELECT \"grand_finalist\" FROM \"night_series_winners_1977_1987\" WHERE \"year\">1979 AND \"margin\"<30 AND \"winners\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_and_distribution\" (\n \"year\" real,\n \"numer_of_jamaicans_granted_british_citizenship\" real,\n \"naturalisation_by_residence\" real,\n \"naturalisation_by_marriage\" real,\n \"registration_of_a_minor_child\" real,\n \"registration_by_other_means\" real\n);\n\nQuestion: Tell me the sum of number of jamaicans given british citizenship for 2004 and registration of a minor child more than 640" }, { "role": "assistant", "content": "SELECT SUM(\"numer_of_jamaicans_granted_british_citizenship\") FROM \"population_and_distribution\" WHERE \"year\"=2004 AND \"registration_of_a_minor_child\">640;" } ]
[ { "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 team played under 52 Reg GP, and picked 130?" }, { "role": "assistant", "content": "SELECT \"team_league\" FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\"<52 AND \"pick_num\"=130;" } ]
[ { "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 highest PL GP for a round greater than 9?" }, { "role": "assistant", "content": "SELECT MAX(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"composer_s\" text,\n \"guest_performer\" text,\n \"producer_s\" text,\n \"time\" text\n);\n\nQuestion: Which title has a length of 4:22?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"track_listing\" WHERE \"time\"='4:22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"composer_s\" text,\n \"guest_performer\" text,\n \"producer_s\" text,\n \"time\" text\n);\n\nQuestion: Which composer has a track length of 2:50?" }, { "role": "assistant", "content": "SELECT \"composer_s\" FROM \"track_listing\" WHERE \"time\"='2:50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"composer_s\" text,\n \"guest_performer\" text,\n \"producer_s\" text,\n \"time\" text\n);\n\nQuestion: Which title has a Black Ice for a guest performer and a length of 5:49?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"track_listing\" WHERE \"guest_performer\"='black ice' AND \"time\"='5:49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"composer_s\" text,\n \"guest_performer\" text,\n \"producer_s\" text,\n \"time\" text\n);\n\nQuestion: Which guest performer has a track length of 5:49?" }, { "role": "assistant", "content": "SELECT \"guest_performer\" FROM \"track_listing\" WHERE \"time\"='5:49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when philadelphia visited?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"visitor\"='philadelphia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many attended the game with weekes recording the decision?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"january\" WHERE \"decision\"='weekes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tv_stations\" (\n \"channel\" real,\n \"digital_channel\" text,\n \"call_sign\" text,\n \"affiliation\" text,\n \"owner\" text\n);\n\nQuestion: What digital channel does Three Angels Broadcasting Network own?" }, { "role": "assistant", "content": "SELECT \"digital_channel\" FROM \"tv_stations\" WHERE \"owner\"='three angels broadcasting network';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"runner_ups_5\" (\n \"year\" real,\n \"championship\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Championship has Scores of 6\u20133, 2\u20136, 3\u20136, 6\u20133, 3\u20136?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"runner_ups_5\" WHERE \"score\"='6\u20133, 2\u20136, 3\u20136, 6\u20133, 3\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the date of the game where Geelong was the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_15\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the home team of the game where Geelong was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_15\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the venue of the game where Geelong was the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_15\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the date of the game where St Kilda is the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_15\" WHERE \"home_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_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the home team's score of the game where South Melbourne is the away team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_15\" 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_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the away team's score of the game where the away team is Geelong?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_15\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which venue hosted the 2004 AFC Asian Cup qualification on November 18, 2003?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='2004 afc asian cup qualification' AND \"date\"='november 18, 2003';" } ]
[ { "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: On what date did a friendly competition, hosted in Dubai, result in a draw?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"result\"='draw' AND \"competition\"='friendly' AND \"venue\"='dubai';" } ]
[ { "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 venue hosted a match with a 3-0 score on December 7, 2002?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"score\"='3-0' AND \"date\"='december 7, 2002';" } ]
[ { "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 resulted in 2-0 score, hosted in Amman?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='2-0' AND \"venue\"='amman';" } ]
[ { "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: On what date was Kuwait City a venue?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"venue\"='kuwait city';" } ]
[ { "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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who did the Mariners play when their record was 26\u201332?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='26\u201332';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 Away team had a score of 12.11 (83)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"away_team_score\"='12.11 (83)';" } ]
[ { "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 was the Vanwall time/retired with 49 laps?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"laps\"=49 AND \"constructor\"='vanwall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps did the grid 1 engine have?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"time_retired\"='engine' AND \"grid\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the highest lap for Luigi Piotti with more than 13 grid and a time/retired engine?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"grid\">13 AND \"time_retired\"='engine' AND \"driver\"='luigi piotti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What Cornerback has the lowest Pick # and Round of less than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"nfl_draft\" WHERE \"position\"='cornerback' AND \"round\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Position of Pick #77?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick_num\"=77;" } ]
[ { "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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many attended the game on August 12?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='august 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 largest crowd with Home team of hawthorn?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_6\" WHERE \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 away team score also has a Home team score of 12.15 (87)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"home_team_score\"='12.15 (87)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 with Fitzroy as away team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 glenferrie oval's home team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"venue\"='glenferrie oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"super_g\" text,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What is the Super G value for the season that has an Overall score of 16?" }, { "role": "assistant", "content": "SELECT \"super_g\" FROM \"season_standings\" WHERE \"overall\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"super_g\" text,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What is the oldest season that had a listed Super G score of 33?" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"season_standings\" WHERE \"super_g\"='33';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" text,\n \"slalom\" text,\n \"super_g\" text,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What year's Season had an Overall of 77?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"season_standings\" WHERE \"overall\"='77';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the high rank for players earning over $533,929?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"earnings\">'533,929';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What player has 3 wins and ranks above 3rd?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"leaders\" WHERE \"wins\"=3 AND \"rank\">3;" } ]