text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17624965_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real
);
Question: How many seasons did "strangled, not stirred" air?
<|assistant|>
SELECT COUNT("no_in_season") FROM "table1_17624965_1" WHERE "title"='\"Strangled, Not Stirred\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17624965_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real
);
Question: How many episodes did Alison Maclean direct?
<|assistant|>
SELECT COUNT("written_by") FROM "table1_17624965_1" WHERE "directed_by"='Alison Maclean';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
Question: Name the high points for may 29
<|assistant|>
SELECT "high_points" FROM "playoffs" WHERE "date"='May 29';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
Question: Name the date for series 2-2
<|assistant|>
SELECT "date" FROM "playoffs" WHERE "series"='2-2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
Question: Name the high assists for may 21
<|assistant|>
SELECT "high_assists" FROM "playoffs" WHERE "date"='May 21';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"sideline_reporters" text,
"pregame_host" text,
"pregame_analysts" text
);
Question: How many different play-by-play announcers also had pregame analysis by Darren Flutie, Eric Tillman and Greg Frers?
<|assistant|>
SELECT COUNT("play_by_play") FROM "2000s" WHERE "pregame_analysts"='Darren Flutie, Eric Tillman and Greg Frers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"sideline_reporters" text,
"pregame_host" text,
"pregame_analysts" text
);
Question: Who did the play-by-play when the pregame host was Brian Williams and the sideline reporters were Steve Armitage and Brenda Irving?
<|assistant|>
SELECT "play_by_play" FROM "2000s" WHERE "pregame_host"='Brian Williams' AND "sideline_reporters"='Steve Armitage and Brenda Irving';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"sideline_reporters" text,
"pregame_host" text,
"pregame_analysts" text
);
Question: Who were the pregame hosts when the sideline reporters were Steve Armitage and Brenda Irving?
<|assistant|>
SELECT "pregame_host" FROM "2000s" WHERE "sideline_reporters"='Steve Armitage and Brenda Irving';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"network" text,
"play_by_play" text,
"colour_commentator_s" text,
"sideline_reporters" text,
"pregame_host" text,
"pregame_analysts" text
);
Question: Who did pregame analysis in 2002?
<|assistant|>
SELECT "pregame_analysts" FROM "2000s" WHERE "year"=2002;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_the_most_populous_us_counties_so" (
"rank" real,
"county" text,
"state" text,
"land_area_km" text,
"land_area_mi" text,
"april_1_2010_census" real,
"april_1_2010_density_km" real,
"april_1_2010_density_mi" real,
"july_1_2010_official_estimate" real,
"july_1_2010_density_km" real,
"july_1_2010_density_mi" real,
"july_1_2011_official_estimate" real,
"july_1_2011_density_km" real,
"july_1_2011_density_mi" real,
"mid_2010_to_mid_2011_change_absolute" real,
"mid_2010_to_mid_2011_change_pct" text,
"county_seat_or_courthouse" text
);
Question: Name the state for lake county
<|assistant|>
SELECT "state" FROM "list_of_the_most_populous_us_counties_so" WHERE "county"='Lake County';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_the_most_populous_us_counties_so" (
"rank" real,
"county" text,
"state" text,
"land_area_km" text,
"land_area_mi" text,
"april_1_2010_census" real,
"april_1_2010_density_km" real,
"april_1_2010_density_mi" real,
"july_1_2010_official_estimate" real,
"july_1_2010_density_km" real,
"july_1_2010_density_mi" real,
"july_1_2011_official_estimate" real,
"july_1_2011_density_km" real,
"july_1_2011_density_mi" real,
"mid_2010_to_mid_2011_change_absolute" real,
"mid_2010_to_mid_2011_change_pct" text,
"county_seat_or_courthouse" text
);
Question: Name the total number of county seat or courthouse for april 1 2010 denisty is 2205
<|assistant|>
SELECT COUNT("county_seat_or_courthouse") FROM "list_of_the_most_populous_us_counties_so" WHERE "april_1_2010_density_mi"=2205;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_the_most_populous_us_counties_so" (
"rank" real,
"county" text,
"state" text,
"land_area_km" text,
"land_area_mi" text,
"april_1_2010_census" real,
"april_1_2010_density_km" real,
"april_1_2010_density_mi" real,
"july_1_2010_official_estimate" real,
"july_1_2010_density_km" real,
"july_1_2010_density_mi" real,
"july_1_2011_official_estimate" real,
"july_1_2011_density_km" real,
"july_1_2011_density_mi" real,
"mid_2010_to_mid_2011_change_absolute" real,
"mid_2010_to_mid_2011_change_pct" text,
"county_seat_or_courthouse" text
);
Question: Name the total number of states for july 1 2010 density is 1209
<|assistant|>
SELECT COUNT("state") FROM "list_of_the_most_populous_us_counties_so" WHERE "july_1_2010_density_mi"=1209;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semi_pro_seasons_1987_1993" (
"season" real,
"winners" text,
"total_wins" real,
"runners_up" text,
"third_place" text,
"number_of_clubs" real
);
Question: What is the lowest season?
<|assistant|>
SELECT MIN("season") FROM "semi_pro_seasons_1987_1993";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semi_pro_seasons_1987_1993" (
"season" real,
"winners" text,
"total_wins" real,
"runners_up" text,
"third_place" text,
"number_of_clubs" real
);
Question: How many values for number of clubs have Shandong as the runner-up?
<|assistant|>
SELECT COUNT("number_of_clubs") FROM "semi_pro_seasons_1987_1993" WHERE "runners_up"='Shandong';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semi_pro_seasons_1987_1993" (
"season" real,
"winners" text,
"total_wins" real,
"runners_up" text,
"third_place" text,
"number_of_clubs" real
);
Question: How many total wins with Shanghai as runner-up?
<|assistant|>
SELECT COUNT("total_wins") FROM "semi_pro_seasons_1987_1993" WHERE "runners_up"='Shanghai';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the club for when tries for is 32
<|assistant|>
SELECT "club" FROM "league_table" WHERE "tries_for"='32';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the number of lost where tries for is 109
<|assistant|>
SELECT COUNT("lost") FROM "league_table" WHERE "tries_for"='109';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the won when tries against is 72
<|assistant|>
SELECT "won" FROM "league_table" WHERE "tries_against"='72';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the points aginst when drawn is 1 and points is 51
<|assistant|>
SELECT "points_against" FROM "league_table" WHERE "drawn"='1' AND "points"='51';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17625876_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real
);
Question: Name the original air date for number in season being 1
<|assistant|>
SELECT "original_air_date" FROM "table1_17625876_1" WHERE "no_in_season"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many were won when 5 were lost?
<|assistant|>
SELECT "won" FROM "league_table" WHERE "lost"='5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many were drawn when 13 were lost?
<|assistant|>
SELECT "drawn" FROM "league_table" WHERE "lost"='13';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many points are there for 63 tries against?
<|assistant|>
SELECT "points_for" FROM "league_table" WHERE "tries_against"='63';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What is the try bonus when the tries against are 17?
<|assistant|>
SELECT "try_bonus" FROM "league_table" WHERE "tries_against"='17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many tries for are there when 11 were won?
<|assistant|>
SELECT "tries_for" FROM "league_table" WHERE "won"='11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many points categories are there when the losing bonus is 2 and points for are 642?
<|assistant|>
SELECT COUNT("points") FROM "league_table" WHERE "losing_bonus"='2' AND "points_for"='642';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_2" (
"episode" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: How many people wrote the episode that had 6.34 million viewers?
<|assistant|>
SELECT COUNT("written_by") FROM "table1_17641206_2" WHERE "viewership"='6.34 million';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_4" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: What was the title of the episode with 5.04 million viewers?
<|assistant|>
SELECT "original_title" FROM "table1_17641206_4" WHERE "viewership"='5.04 million';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_4" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: What was the first airdate with a viewership of 4.77 million?
<|assistant|>
SELECT "original_airdate" FROM "table1_17641206_4" WHERE "viewership"='4.77 million';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_4" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: How many episodes of 30 minutes were written by John Sullivan?
<|assistant|>
SELECT COUNT("duration") FROM "table1_17641206_4" WHERE "written_by"='John Sullivan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_4" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: Who was the director when the writer was John Sullivan?
<|assistant|>
SELECT "directed_by" FROM "table1_17641206_4" WHERE "written_by"='John Sullivan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_8" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: What is the total length when the title is " one man's junk "
<|assistant|>
SELECT COUNT("duration") FROM "table1_17641206_8" WHERE "original_title"='\" One Man''s Junk \"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_8" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: What are the movies that are written and dircted by john sullivan with the airdate of 15january2009.
<|assistant|>
SELECT "directed_by" FROM "table1_17641206_8" WHERE "written_by"='John Sullivan' AND "original_airdate"='15January2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_8" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: What is the total viewership where the title is " your cheating art ".
<|assistant|>
SELECT "viewership" FROM "table1_17641206_8" WHERE "original_title"='\" Your Cheating Art \"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17641206_8" (
"episode" real,
"original_title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text,
"duration" text,
"viewership" text
);
Question: How many episodes aired on 22january2009
<|assistant|>
SELECT COUNT("episode") FROM "table1_17641206_8" WHERE "original_airdate"='22January2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"country" text,
"transfers_in" real,
"transfers_out" real,
"internal_transfers" real,
"total_transfers" real
);
Question: Name the least transfers out when transfers is 21
<|assistant|>
SELECT MIN("transfers_out") FROM "statistics" WHERE "total_transfers"=21;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"country" text,
"transfers_in" real,
"transfers_out" real,
"internal_transfers" real,
"total_transfers" real
);
Question: Name the least total transfers for romania
<|assistant|>
SELECT MIN("total_transfers") FROM "statistics" WHERE "country"='Romania';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"country" text,
"transfers_in" real,
"transfers_out" real,
"internal_transfers" real,
"total_transfers" real
);
Question: Name the least internal transfers
<|assistant|>
SELECT MIN("internal_transfers") FROM "statistics";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westmorland_county_new_brunswick" (
"official_name" text,
"status" text,
"area_km_2" text,
"population" real,
"census_ranking" text
);
Question: How many status are there for Moncton?
<|assistant|>
SELECT COUNT("status") FROM "westmorland_county_new_brunswick" WHERE "official_name"='Moncton';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westmorland_county_new_brunswick" (
"official_name" text,
"status" text,
"area_km_2" text,
"population" real,
"census_ranking" text
);
Question: What is the census ranking of the location with population of 959?
<|assistant|>
SELECT "census_ranking" FROM "westmorland_county_new_brunswick" WHERE "population"=959;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westmorland_county_new_brunswick" (
"official_name" text,
"status" text,
"area_km_2" text,
"population" real,
"census_ranking" text
);
Question: What is the name of the place with 582.20 square km area?
<|assistant|>
SELECT "official_name" FROM "westmorland_county_new_brunswick" WHERE "area_km_2"='582.20';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westmorland_county_new_brunswick" (
"official_name" text,
"status" text,
"area_km_2" text,
"population" real,
"census_ranking" text
);
Question: What is the name of the place where area is 578.28 square km?
<|assistant|>
SELECT "official_name" FROM "westmorland_county_new_brunswick" WHERE "area_km_2"='578.28';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"fin_pos" real,
"car_no" real,
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"laps_led" real,
"points" text
);
Question: If the points is 20, what was the team name?
<|assistant|>
SELECT "team" FROM "results" WHERE "points"='20';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"fin_pos" real,
"car_no" real,
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"laps_led" real,
"points" text
);
Question: What is the time/retired if the driver is Marco Andretti?
<|assistant|>
SELECT "time_retired" FROM "results" WHERE "driver"='Marco Andretti';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"fin_pos" real,
"car_no" real,
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"laps_led" real,
"points" text
);
Question: If the laps is 191, what is the maximum laps led?
<|assistant|>
SELECT MAX("laps_led") FROM "results" WHERE "laps"=191;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"fin_pos" real,
"car_no" real,
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"laps_led" real,
"points" text
);
Question: What is the time/retired if the driver is Ed Carpenter?
<|assistant|>
SELECT "time_retired" FROM "results" WHERE "driver"='Ed Carpenter';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"fin_pos" real,
"car_no" real,
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"laps_led" real,
"points" text
);
Question: If the time/retired is +1 lap, what is the amount of maximum laps?
<|assistant|>
SELECT MAX("laps") FROM "results" WHERE "time_retired"='+1 lap';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"fin_pos" real,
"car_no" real,
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"laps_led" real,
"points" text
);
Question: If the driver is Milka Duno, what is the name of the team?
<|assistant|>
SELECT "team" FROM "results" WHERE "driver"='Milka Duno';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "jersey_progress" (
"stage" real,
"winner" text,
"general_classification" text,
"mountains_classification" text,
"points_classification" text,
"sprints_classification" text,
"team_classification" text
);
Question: How many stages were won by Robbie McEwen?
<|assistant|>
SELECT COUNT("stage") FROM "jersey_progress" WHERE "winner"='Robbie McEwen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"team" text,
"avg_speed" text,
"margin_of_victory" text
);
Question: How many car numbers were listed for Rusty Wallace?
<|assistant|>
SELECT COUNT("car_num") FROM "nascar_sprint_cup_series_race_winners" WHERE "winning_driver"='Rusty Wallace';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"team" text,
"avg_speed" text,
"margin_of_victory" text
);
Question: In what season did Rusty Wallace win?
<|assistant|>
SELECT MAX("season") FROM "nascar_sprint_cup_series_race_winners" WHERE "winning_driver"='Rusty Wallace';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"team" text,
"avg_speed" text,
"margin_of_victory" text
);
Question: What was the represented team on June 27?
<|assistant|>
SELECT "team" FROM "nascar_sprint_cup_series_race_winners" WHERE "date"='June 27';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nascar_sprint_cup_series_race_winners" (
"season" real,
"date" text,
"winning_driver" text,
"car_num" real,
"sponsor" text,
"make" text,
"team" text,
"avg_speed" text,
"margin_of_victory" text
);
Question: Who was the winning driver for Hendrick Motorsports in a Chevrolet Impala SS?
<|assistant|>
SELECT "winning_driver" FROM "nascar_sprint_cup_series_race_winners" WHERE "team"='Hendrick Motorsports' AND "make"='Chevrolet Impala SS';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
Question: When 45 is the goals for and 10 is the drawn what is the lost?
<|assistant|>
SELECT "lost" FROM "second_division_final_table" WHERE "drawn"=10 AND "goals_for"=45;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
Question: When +10 is the goal difference what is the goals for?
<|assistant|>
SELECT "goals_for" FROM "second_division_final_table" WHERE "goal_difference"='+10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_division_final_table" (
"position" real,
"team" text,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_difference" text,
"points_1" text
);
Question: When ellesmere port & neston is the team what are the points 1?
<|assistant|>
SELECT "points_1" FROM "second_division_final_table" WHERE "team"='Ellesmere Port & Neston';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1771753_3" (
"season" text,
"date" text,
"driver" text,
"team" text,
"chassis" text,
"engine" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
Question: When 2005 is the season how many drivers are there?
<|assistant|>
SELECT COUNT("driver") FROM "table1_1771753_3" WHERE "season"='2005';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1771753_3" (
"season" text,
"date" text,
"driver" text,
"team" text,
"chassis" text,
"engine" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
Question: When tony kanaan is the driver what is the average speed miles per hour?
<|assistant|>
SELECT "average_speed_mph" FROM "table1_1771753_3" WHERE "driver"='Tony Kanaan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1771753_3" (
"season" text,
"date" text,
"driver" text,
"team" text,
"chassis" text,
"engine" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
Question: When 169.182 is the average speed miles per hour what is the chassis?
<|assistant|>
SELECT "chassis" FROM "table1_1771753_3" WHERE "average_speed_mph"='169.182';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1771753_3" (
"season" text,
"date" text,
"driver" text,
"team" text,
"chassis" text,
"engine" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
Question: When 1:34:01 is the race time what is the miles in kilometers?
<|assistant|>
SELECT "miles_km" FROM "table1_1771753_3" WHERE "race_time"='1:34:01';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1771753_3" (
"season" text,
"date" text,
"driver" text,
"team" text,
"chassis" text,
"engine" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text,
"report" text
);
Question: When 228 is the lap and chip ganassi racing is the team what is the race time?
<|assistant|>
SELECT "race_time" FROM "table1_1771753_3" WHERE "team"='Chip Ganassi Racing' AND "laps"='228';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17736890_5" (
"tie_no" real,
"home_team" text,
"score_1" text,
"away_team" text,
"attendance" real
);
Question: What tie number featured Chelsea as the home team?
<|assistant|>
SELECT MIN("tie_no") FROM "table1_17736890_5" WHERE "home_team"='Chelsea';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17736890_5" (
"tie_no" real,
"home_team" text,
"score_1" text,
"away_team" text,
"attendance" real
);
Question: In what tie were Leeds United the away team?
<|assistant|>
SELECT MAX("tie_no") FROM "table1_17736890_5" WHERE "away_team"='Leeds United';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17736890_5" (
"tie_no" real,
"home_team" text,
"score_1" text,
"away_team" text,
"attendance" real
);
Question: Who was the home team when Burnley were the away team?
<|assistant|>
SELECT "home_team" FROM "table1_17736890_5" WHERE "away_team"='Burnley';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: what is the lowest year represented?
<|assistant|>
SELECT MIN("year") FROM "women_s_doubles_10_4_titles_6_runner_ups";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: What was the score when Françoise Dürr was partner?
<|assistant|>
SELECT "score" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "partner"='Françoise Dürr';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: What was the outcome in 1975?
<|assistant|>
SELECT "outcome" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "year"=1975;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: On what surface was the game played with a score of 6–4, 6–4?
<|assistant|>
SELECT "surface" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "score"='6–4, 6–4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "active_teams" (
"tournament_appearances" real,
"team" text,
"league" text,
"wins" real,
"final_losses" real,
"semi_final_losses" real,
"fourth_place" real,
"final_win_pct" text,
"years_of_appearance" text
);
Question: What is the year of appearance for the Prince Albert Raiders?
<|assistant|>
SELECT "years_of_appearance" FROM "active_teams" WHERE "team"='Prince Albert Raiders';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "active_teams" (
"tournament_appearances" real,
"team" text,
"league" text,
"wins" real,
"final_losses" real,
"semi_final_losses" real,
"fourth_place" real,
"final_win_pct" text,
"years_of_appearance" text
);
Question: How many wins do the Erie Otters have?
<|assistant|>
SELECT "wins" FROM "active_teams" WHERE "team"='Erie Otters';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "active_teams" (
"tournament_appearances" real,
"team" text,
"league" text,
"wins" real,
"final_losses" real,
"semi_final_losses" real,
"fourth_place" real,
"final_win_pct" text,
"years_of_appearance" text
);
Question: What is the final win percentage of the Sault Ste. Marie Greyhounds?
<|assistant|>
SELECT "final_win_pct" FROM "active_teams" WHERE "team"='Sault Ste. Marie Greyhounds';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "active_teams" (
"tournament_appearances" real,
"team" text,
"league" text,
"wins" real,
"final_losses" real,
"semi_final_losses" real,
"fourth_place" real,
"final_win_pct" text,
"years_of_appearance" text
);
Question: What is the total number of semi-final losses for the Kitchener Rangers?
<|assistant|>
SELECT MAX("semi_final_losses") FROM "active_teams" WHERE "team"='Kitchener Rangers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "active_teams" (
"tournament_appearances" real,
"team" text,
"league" text,
"wins" real,
"final_losses" real,
"semi_final_losses" real,
"fourth_place" real,
"final_win_pct" text,
"years_of_appearance" text
);
Question: How many wins do the Red Deer Rebels have?
<|assistant|>
SELECT MAX("wins") FROM "active_teams" WHERE "team"='Red Deer Rebels';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: What is the record for November 26, 1961?
<|assistant|>
SELECT "record" FROM "regular_season" WHERE "date"='November 26, 1961';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: What was the game site against the Dallas Texans?
<|assistant|>
SELECT "game_site" FROM "regular_season" WHERE "opponent"='Dallas Texans';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "commentators_and_spokespersons" (
"year_s" real,
"final_television_commentator" text,
"radio_commentator" text,
"spokesperson" text,
"semi_final_television_commentator" text,
"semi_final_second_television_commentator" text
);
Question: In how many years was Tom Fleming the final television commentator?
<|assistant|>
SELECT COUNT("year_s") FROM "commentators_and_spokespersons" WHERE "final_television_commentator"='Tom Fleming';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "commentators_and_spokespersons" (
"year_s" real,
"final_television_commentator" text,
"radio_commentator" text,
"spokesperson" text,
"semi_final_television_commentator" text,
"semi_final_second_television_commentator" text
);
Question: What was the latest year that Colin Berry was the spokesperson?
<|assistant|>
SELECT MAX("year_s") FROM "commentators_and_spokespersons" WHERE "spokesperson"='Colin Berry';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "commentators_and_spokespersons" (
"year_s" real,
"final_television_commentator" text,
"radio_commentator" text,
"spokesperson" text,
"semi_final_television_commentator" text,
"semi_final_second_television_commentator" text
);
Question: Who was the semi-final television commentator when the spokesperson was Colin Berry and the final television commentator was Pete Murray?
<|assistant|>
SELECT "semi_final_television_commentator" FROM "commentators_and_spokespersons" WHERE "spokesperson"='Colin Berry' AND "final_television_commentator"='Pete Murray';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "commentators_and_spokespersons" (
"year_s" real,
"final_television_commentator" text,
"radio_commentator" text,
"spokesperson" text,
"semi_final_television_commentator" text,
"semi_final_second_television_commentator" text
);
Question: Who was the radio commentator when the final television commentator was John Dunn?
<|assistant|>
SELECT "radio_commentator" FROM "commentators_and_spokespersons" WHERE "final_television_commentator"='John Dunn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "commentators_and_spokespersons" (
"year_s" real,
"final_television_commentator" text,
"radio_commentator" text,
"spokesperson" text,
"semi_final_television_commentator" text,
"semi_final_second_television_commentator" text
);
Question: What is the latest year that the final television commentator was David Jacobs?
<|assistant|>
SELECT MAX("year_s") FROM "commentators_and_spokespersons" WHERE "final_television_commentator"='David Jacobs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: What was their record when the attendance at the game was 14489?
<|assistant|>
SELECT "record" FROM "regular_season" WHERE "attendance"=14489;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: When did they play at the Cotton Bowl?
<|assistant|>
SELECT "date" FROM "regular_season" WHERE "game_site"='Cotton Bowl';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"rank" real,
"family" text,
"abbre_viation" text,
"constellation" text,
"area_sq_deg" text,
"area_msr" text,
"per_cent_age" text,
"right_ascension_hm" text,
"decli_nation_dm" text,
"quad" text
);
Question: What is the percentage of this constellation abbreviated as 'nor'?
<|assistant|>
SELECT "per_cent_age" FROM "external_links" WHERE "abbre_viation"='Nor';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"rank" real,
"family" text,
"abbre_viation" text,
"constellation" text,
"area_sq_deg" text,
"area_msr" text,
"per_cent_age" text,
"right_ascension_hm" text,
"decli_nation_dm" text,
"quad" text
);
Question: This constellation, abbreviated as 'oph' has how many right ascension (in hm)?
<|assistant|>
SELECT COUNT("right_ascension_hm") FROM "external_links" WHERE "abbre_viation"='Oph';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"rank" real,
"family" text,
"abbre_viation" text,
"constellation" text,
"area_sq_deg" text,
"area_msr" text,
"per_cent_age" text,
"right_ascension_hm" text,
"decli_nation_dm" text,
"quad" text
);
Question: What is the name of this constellation with an area of 245.375 sq. deg.?
<|assistant|>
SELECT "constellation" FROM "external_links" WHERE "area_sq_deg"='245.375';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"rank" real,
"family" text,
"abbre_viation" text,
"constellation" text,
"area_sq_deg" text,
"area_msr" text,
"per_cent_age" text,
"right_ascension_hm" text,
"decli_nation_dm" text,
"quad" text
);
Question: This constellation with a ranking of 51 has how many percentages on record?
<|assistant|>
SELECT COUNT("per_cent_age") FROM "external_links" WHERE "rank"=51;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"rank" real,
"family" text,
"abbre_viation" text,
"constellation" text,
"area_sq_deg" text,
"area_msr" text,
"per_cent_age" text,
"right_ascension_hm" text,
"decli_nation_dm" text,
"quad" text
);
Question: What is the percentage of this constellation with an area of 248.885 sq. deg.?
<|assistant|>
SELECT "per_cent_age" FROM "external_links" WHERE "area_sq_deg"='248.885';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1776943_1" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
Question: Name the broadcast date for 6.4 million viewers for the archive of 16mm t/r
<|assistant|>
SELECT "broadcast_date" FROM "table1_1776943_1" WHERE "viewers_in_millions"='6.4' AND "archive"='16mm t/r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1776943_1" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
Question: Name the archive where run time 24:04
<|assistant|>
SELECT "archive" FROM "table1_1776943_1" WHERE "run_time"='24:04';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: On November 1, 1964, where was the game site?
<|assistant|>
SELECT "game_site" FROM "regular_season" WHERE "date"='November 1, 1964';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: How many people attended the Week 8 game when Denver played Buffalo?
<|assistant|>
SELECT "attendance" FROM "regular_season" WHERE "week"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: How many times did the Denver Broncos face the Dallas Texans this season?
<|assistant|>
SELECT COUNT("record") FROM "regular_season" WHERE "opponent"='Dallas Texans';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17801022_1" (
"year" real,
"date" text,
"driver" text,
"manufacturer" text,
"laps" real,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: What year was the winning race time 1:55:13?
<|assistant|>
SELECT MAX("year") FROM "table1_17801022_1" WHERE "race_time"='1:55:13';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17801022_1" (
"year" real,
"date" text,
"driver" text,
"manufacturer" text,
"laps" real,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: For races with an average speed of 113.835 mph, what are the winning race times?
<|assistant|>
SELECT "race_time" FROM "table1_17801022_1" WHERE "average_speed_mph"='113.835';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17801022_1" (
"year" real,
"date" text,
"driver" text,
"manufacturer" text,
"laps" real,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: What manufacturer won the race on November 2?
<|assistant|>
SELECT "manufacturer" FROM "table1_17801022_1" WHERE "date"='November 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17801022_1" (
"year" real,
"date" text,
"driver" text,
"manufacturer" text,
"laps" real,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: What date did Jamie McMurray win the race?
<|assistant|>
SELECT "date" FROM "table1_17801022_1" WHERE "driver"='Jamie McMurray';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17801022_1" (
"year" real,
"date" text,
"driver" text,
"manufacturer" text,
"laps" real,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: What was the date of the race with a winning time of 1:55:13?
<|assistant|>
SELECT "date" FROM "table1_17801022_1" WHERE "race_time"='1:55:13';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17802778_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: What team(s) enjoyed an average spped (mph) of 138.14?
<|assistant|>
SELECT "team" FROM "table1_17802778_1" WHERE "average_speed_mph"='138.14';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17802778_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: How many laps recorded in 2001?
<|assistant|>
SELECT "laps" FROM "table1_17802778_1" WHERE "year"=2001;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_17802778_1" (
"year" real,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"laps" text,
"miles_km" text,
"race_time" text,
"average_speed_mph" text
);
Question: What team(s) were in 2003?
<|assistant|>
SELECT "team" FROM "table1_17802778_1" WHERE "year"=2003;<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.