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