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 \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Position has a Pick smaller than 152, and a Round smaller than 3?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\"<152 AND \"round\"<3;" } ]
[ { "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\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many Picks have a Position of defensive back?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='defensive back';" } ]
[ { "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\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Player has a Round smaller than 11, and a Pick smaller than 152, and a Position of guard?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"round\"<11 AND \"pick\"<152 AND \"position\"='guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which participants won the silver medal for the Men's Doubles?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"list_of_medalists\" WHERE \"medal\"='silver' AND \"event\"='men''s doubles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What event did Rashid Sidek participate in?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"name\"='rashid sidek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which Olympic Games had a silver medal for the Men's Singles?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"list_of_medalists\" WHERE \"event\"='men''s singles' AND \"medal\"='silver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which sport was in the 1992 Barcelona games?" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"list_of_medalists\" WHERE \"games\"='1992 barcelona';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What event was in the 2008 Beijing games?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"games\"='2008 beijing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the round of the defense player from the United States?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"nhl_entry_draft\" WHERE \"position\"='defense' AND \"nationality\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the position of Dale Craigwell?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nhl_entry_draft\" WHERE \"player\"='dale craigwell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the position of the player from Sweden?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nhl_entry_draft\" WHERE \"nationality\"='sweden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Who is the player from a round larger than 5 and the college/junior/club team of Leningrad SKA (russia)?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nhl_entry_draft\" WHERE \"round\">5 AND \"college_junior_club_team\"='leningrad ska (russia)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What position does Mikhail Kravets play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nhl_entry_draft\" WHERE \"player\"='mikhail kravets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: Which date was held at Laguna Seca Raceway, in class GTX/GTO?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"circuit\"='laguna seca raceway' AND \"class\"='gtx/gto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: Which circuit was held on May 7 for 1 hour?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"schedule\" WHERE \"date\"='may 7' AND \"length\"='1 hour';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: Which circuit has a length of 45 minutes and is held on August 6?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"schedule\" WHERE \"length\"='45 minutes' AND \"date\"='august 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the length of the 6 Hours of Talladega?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"schedule\" WHERE \"race\"='6 hours of talladega';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Name the class AAAA with class A of lindsay and class AAAAA of galena park north shore" }, { "role": "assistant", "content": "SELECT \"class_aaaa\" FROM \"team\" WHERE \"class_a\"='lindsay' AND \"class_aaaaa\"='galena park north shore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Name the class A with class AAAA of longview pine tree and school year of 1995-96" }, { "role": "assistant", "content": "SELECT \"class_a\" FROM \"team\" WHERE \"class_aaaa\"='longview pine tree' AND \"school_year\"='1995-96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Name the class AA with class A of rule and school year of 1995-96" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"team\" WHERE \"class_a\"='rule' AND \"school_year\"='1995-96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Name the school year with class AAAAA of mcallen and class AAAA of longview pine tree" }, { "role": "assistant", "content": "SELECT \"school_year\" FROM \"team\" WHERE \"class_aaaaa\"='mcallen' AND \"class_aaaa\"='longview pine tree';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Name the class A with school year of 2004-05" }, { "role": "assistant", "content": "SELECT \"class_a\" FROM \"team\" WHERE \"school_year\"='2004-05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Name the clas AAAA of school year 2000-01" }, { "role": "assistant", "content": "SELECT \"class_aaaa\" FROM \"team\" WHERE \"school_year\"='2000-01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What school is from 45 Lake county and is located in Merrillville?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='45 lake' AND \"location\"='merrillville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What school is located in Michigan City?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='michigan city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA class for Chesterton?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='chesterton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA class for Portage?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='portage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA class for Crown Point?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='crown point';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid of driver Christian Vietoris who has less than 12 laps?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"sprint_race\" WHERE \"driver\"='christian vietoris' AND \"laps\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid of driver jo\u00e3o urbano?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"sprint_race\" WHERE \"driver\"='jo\u00e3o urbano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest laps a grid less than 22 with a time of +35.268 has?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"sprint_race\" WHERE \"grid\"<22 AND \"time\"='+35.268';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest laps driver Christian Vietoris with a grid smaller than 6 has?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"sprint_race\" WHERE \"driver\"='christian vietoris' AND \"grid\"<6;" } ]
[ { "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 \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: What is the primary sponsor of driver Mark Martin?" }, { "role": "assistant", "content": "SELECT \"primary_sponsor_s\" FROM \"teams_and_drivers\" WHERE \"driver_s\"='mark martin';" } ]
[ { "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 \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the crew chief of team Joe Gibbs Racing, which has a Chevrolet Monte Carlo and Fedex as the primary sponsor?" }, { "role": "assistant", "content": "SELECT \"crew_chief\" FROM \"teams_and_drivers\" WHERE \"car_s\"='chevrolet monte carlo' AND \"team\"='joe gibbs racing' AND \"primary_sponsor_s\"='fedex';" } ]
[ { "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 \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the driver of the team with the crew chief Derrick Finley?" }, { "role": "assistant", "content": "SELECT \"driver_s\" FROM \"teams_and_drivers\" WHERE \"crew_chief\"='derrick finley';" } ]
[ { "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 \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is the crew chief of team Chip Ganassi Racing with Felix Sabates, which has Casey Mears as the driver?" }, { "role": "assistant", "content": "SELECT \"crew_chief\" FROM \"teams_and_drivers\" WHERE \"team\"='chip ganassi racing with felix sabates' AND \"driver_s\"='casey mears';" } ]
[ { "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 \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Which team has Peak Fitness as the primary sponsor?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"teams_and_drivers\" WHERE \"primary_sponsor_s\"='peak fitness';" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What date has w 20-17 as the result, and 1-0 as the record?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 20-17' AND \"record\"='1-0';" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What game site has december 24, 2000 as a date?" }, { "role": "assistant", "content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"date\"='december 24, 2000';" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What date has dallas cowboys as the opponent?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='dallas cowboys';" } ]
[ { "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 \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance that has fedex field as the game site with 3 as the week?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"game_site\"='fedex field' AND \"week\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"free_agents\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the record for April 22?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"free_agents\" WHERE \"date\"='april 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"free_agents\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the record when the visiting team was the Quebec Nordiques on April 22?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"free_agents\" WHERE \"visitor\"='quebec nordiques' AND \"date\"='april 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"longitude\" text,\n \"sign\" text,\n \"sanskrit\" text,\n \"latin\" text,\n \"ruling_planet\" text\n);\n\nQuestion: What is the longitude of Taurus?" }, { "role": "assistant", "content": "SELECT \"longitude\" FROM \"seasons\" WHERE \"latin\"='taurus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2003\" text\n);\n\nQuestion: What is the Location for Belshina?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"teams_and_venues\" WHERE \"team\"='belshina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2003\" text\n);\n\nQuestion: What is the name of the Team with a Capacity larger than 5,000, and a Position in 2003 of 13?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"teams_and_venues\" WHERE \"capacity\">'5,000' AND \"position_in_2003\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2003\" text\n);\n\nQuestion: What is the total number for Capacity at city stadium, borisov?" }, { "role": "assistant", "content": "SELECT COUNT(\"capacity\") FROM \"teams_and_venues\" WHERE \"venue\"='city stadium, borisov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1_2008\" (\n \"airdate\" text,\n \"celebrities\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49\" text,\n \"viewers_millions\" real,\n \"weekly_rank\" text,\n \"prod_code\" real\n);\n\nQuestion: Which rating larger than 5 have the lowest amount of views in #3 rank with a share of 9?" }, { "role": "assistant", "content": "SELECT MIN(\"viewers_millions\") FROM \"season_1_2008\" WHERE \"weekly_rank\"='#3' AND \"share\"=9 AND \"rating\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest played that has a drawn less than 9, 36 as the difference, with a lost greater than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"drawn\"<9 AND \"difference\"='36' AND \"lost\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many positions have figueirense as the team, with a played greater than 38?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"team\"='figueirense' AND \"played\">38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the largest drawn that has a played less than 38?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"played\"<38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many positions have 9 as a drawn, 5 as a difference, with a lost less than 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"drawn\"=9 AND \"difference\"='5' AND \"lost\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1938_1939\" (\n \"episode\" text,\n \"title\" text,\n \"writer_s\" text,\n \"preservation\" text,\n \"original_airdate\" text\n);\n\nQuestion: What date did Episode 2-01 (42) air?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"season_2_1938_1939\" WHERE \"episode\"='2-01 (42)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1938_1939\" (\n \"episode\" text,\n \"title\" text,\n \"writer_s\" text,\n \"preservation\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who wrote Episode 2-15 (56)?" }, { "role": "assistant", "content": "SELECT \"writer_s\" FROM \"season_2_1938_1939\" WHERE \"episode\"='2-15 (56)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_a_finland\" (\n \"team\" text,\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the highest number of games with 1 loss and points less than 18?" }, { "role": "assistant", "content": "SELECT MAX(\"games\") FROM \"world_championship_group_a_finland\" WHERE \"lost\"=1 AND \"points\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Which City has a Result of w, and a Competition of international friendly (unofficial match), and a Score of 1-0?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"brazil_national_team\" WHERE \"result\"='w' AND \"competition\"='international friendly (unofficial match)' AND \"score\"='1-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Which Date has a Result of w, and a Score of 3-0?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"brazil_national_team\" WHERE \"result\"='w' AND \"score\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Which City has a Date of june 9, 1976?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"brazil_national_team\" WHERE \"date\"='june 9, 1976';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Which City has a Date of may 19, 1976?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"brazil_national_team\" WHERE \"date\"='may 19, 1976';" } ]
[ { "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 are the total number of laps for Tom Bridger?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"classification\" WHERE \"driver\"='tom bridger';" } ]
[ { "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 are the lowest laps of Graham Hill?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"driver\"='graham hill';" } ]
[ { "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 are the lowest laps of grid 17?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"grid\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Which Avg/G has a Gain of 16, and a Name of barnes, freddie, and a Loss smaller than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"avg_g\") FROM \"rushing\" WHERE \"gain\"=16 AND \"name\"='barnes, freddie' AND \"loss\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Which average Long has a Gain smaller than 16, and a Loss smaller than 6?" }, { "role": "assistant", "content": "SELECT AVG(\"long\") FROM \"rushing\" WHERE \"gain\"<16 AND \"loss\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Which Gain is the lowest one that has a Loss larger than 2, and an Avg/G larger than -6, and a Name of sheehan, tyler, and a Long larger than 11?" }, { "role": "assistant", "content": "SELECT MIN(\"gain\") FROM \"rushing\" WHERE \"loss\">2 AND \"avg_g\">-6 AND \"name\"='sheehan, tyler' AND \"long\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Which Avg/G is the lowest one that has a Long larger than 8, and a Loss smaller than 34, and a Gain larger than 16, and a Name of bullock, chris?" }, { "role": "assistant", "content": "SELECT MIN(\"avg_g\") FROM \"rushing\" WHERE \"long\">8 AND \"loss\"<34 AND \"gain\">16 AND \"name\"='bullock, chris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Which Loss has a Name of bullock, chris, and a Long smaller than 36?" }, { "role": "assistant", "content": "SELECT SUM(\"loss\") FROM \"rushing\" WHERE \"name\"='bullock, chris' AND \"long\"<36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: How much Long has a Loss larger than 2, and a Gain of 157, and an Avg/G smaller than 129?" }, { "role": "assistant", "content": "SELECT SUM(\"long\") FROM \"rushing\" WHERE \"loss\">2 AND \"gain\"=157 AND \"avg_g\"<129;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ladies_singles\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: What is the fewest number of places for a skater from Norway with fewer than 1524.9 points?" }, { "role": "assistant", "content": "SELECT MIN(\"places\") FROM \"ladies_singles\" WHERE \"nation\"='norway' AND \"points\"<1524.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\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 home has Philadelphia as the visitor, and december 4 as the date?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"visitor\"='philadelphia' AND \"date\"='december 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\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 record has a decision of parent, Philadelphia as the home, with december 12 as the date?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"decision\"='parent' AND \"home\"='philadelphia' AND \"date\"='december 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Tournament has a Score of 6\u20134, 6\u20132?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_titles\" WHERE \"score\"='6\u20134, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Score has an Opponent in the final of mehdi tahiri?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='mehdi tahiri';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Date has a Score of 6\u20133, 7\u20136?" }, { "role": "assistant", "content": "SELECT SUM(\"date\") FROM \"singles_titles\" WHERE \"score\"='6\u20133, 7\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Date has a Score of 7\u20136(3), 4\u20136, 6\u20132?" }, { "role": "assistant", "content": "SELECT SUM(\"date\") FROM \"singles_titles\" WHERE \"score\"='7\u20136(3), 4\u20136, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Tournament of olbia?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_titles\" WHERE \"tournament\"='olbia';" } ]
[ { "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 was the attendance at the week 7 game?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=7;" } ]
[ { "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 was the result of the game after week 3 against the New York Giants?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">3 AND \"opponent\"='new york giants';" } ]
[ { "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: Who was the opponent at the week 6 game?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" text\n);\n\nQuestion: What is the lowest loss that Jarius Wright has had where he also has had a gain bigger than 1." }, { "role": "assistant", "content": "SELECT MIN(\"loss\") FROM \"rushing\" WHERE \"name\"='jarius wright' AND \"gain\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: How much was the first place prize for the American golf classic located in Ohio?" }, { "role": "assistant", "content": "SELECT \"1st_prize\" FROM \"tournament_results\" WHERE \"location\"='ohio' AND \"tournament\"='american golf classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What date was the Monsanto open located in Florida?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"tournament_results\" WHERE \"location\"='florida' AND \"tournament\"='monsanto open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What was the score of Johnny Miller (7)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"tournament_results\" WHERE \"winner\"='johnny miller (7)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: What is the total number of years that have divisions greater than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"year_by_year\" WHERE \"division\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: What is the highest division for years earlier than 2011?" }, { "role": "assistant", "content": "SELECT MAX(\"division\") FROM \"year_by_year\" WHERE \"year\"<2011;" } ]
[ { "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\" real\n);\n\nQuestion: In what Week were there less than 30,348 in Attendance with a Result of W 37-21?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\"<'30,348' AND \"result\"='w 37-21';" } ]
[ { "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\" real\n);\n\nQuestion: What is the Week number on November 30, 1958 with more than 33,240 in Attendance?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='november 30, 1958' AND \"attendance\">'33,240';" } ]
[ { "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\" real\n);\n\nQuestion: What was the Result on November 9, 1958?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='november 9, 1958';" } ]
[ { "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\" real\n);\n\nQuestion: What was the Attendance on Week 8?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"against\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text,\n \"goals_for\" text,\n \"goals_against\" text\n);\n\nQuestion: Which season did not qualify for UEFA competitions?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"year_by_year_performance\" WHERE \"against\"='did not qualify for uefa competitions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"against\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text,\n \"goals_for\" text,\n \"goals_against\" text\n);\n\nQuestion: How many games were lost that had goals against of 5?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"year_by_year_performance\" WHERE \"goals_against\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"against\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text,\n \"goals_for\" text,\n \"goals_against\" text\n);\n\nQuestion: How many draws were there with goals against that did not qualify for UEFA competitions?" }, { "role": "assistant", "content": "SELECT \"drew\" FROM \"year_by_year_performance\" WHERE \"goals_against\"='did not qualify for uefa competitions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"against\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text,\n \"goals_for\" text,\n \"goals_against\" text\n);\n\nQuestion: Which competition did not qualify for UEFA competitions in the 1970-71 season?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"year_by_year_performance\" WHERE \"lost\"='did not qualify for uefa competitions' AND \"season\"='1970-71';" } ]
[ { "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 \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance in texas stadium?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"venue\"='texas stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What is the home team score for the team that has a home field of the Telstra Dome?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_22\" WHERE \"ground\"='telstra dome';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What is the date for the home team score of 6.5 (41)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_22\" WHERE \"home_team_score\"='6.5 (41)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: Which home team had an away team of the Brisbane Lions?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_22\" WHERE \"away_team\"='brisbane lions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What is the report for the team with a home ground of MCG and a home team score of 6.5 (41)?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"round_22\" WHERE \"ground\"='mcg' AND \"home_team_score\"='6.5 (41)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_some_cameras_compatible_wi\" (\n \"camera\" text,\n \"sensor_resolution\" text,\n \"sensor\" text,\n \"output\" text,\n \"cpu_usage\" text,\n \"ir_le_ds\" text\n);\n\nQuestion: What was the sensor with a resolution of 355x288 for a Naturalpoint Trackir 3?" }, { "role": "assistant", "content": "SELECT \"sensor\" FROM \"comparison_of_some_cameras_compatible_wi\" WHERE \"sensor_resolution\"='355x288' AND \"camera\"='naturalpoint trackir 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_some_cameras_compatible_wi\" (\n \"camera\" text,\n \"sensor_resolution\" text,\n \"sensor\" text,\n \"output\" text,\n \"cpu_usage\" text,\n \"ir_le_ds\" text\n);\n\nQuestion: What was the sensor resolution with a minimal CPU usage for a naturalpoint trackir 3 pro?" }, { "role": "assistant", "content": "SELECT \"sensor_resolution\" FROM \"comparison_of_some_cameras_compatible_wi\" WHERE \"cpu_usage\"='minimal' AND \"camera\"='naturalpoint trackir 3 pro';" } ]