text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What is the first year of the European Championships competition?
<|assistant|>
SELECT MIN("year") FROM "achievements" WHERE "competition"='european championships';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: Which position has a venue of Helsinki, Finland?
<|assistant|>
SELECT "position" FROM "achievements" WHERE "venue"='helsinki, finland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_war_ii" (
"estimate" text,
"name" text,
"nat" text,
"ship_type" text,
"where_sunk" text,
"date" text
);
Question: What is the date that a hell ship sunk in the East China Sea?
<|assistant|>
SELECT "date" FROM "world_war_ii" WHERE "where_sunk"='east china sea' AND "ship_type"='hell ship';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_war_ii" (
"estimate" text,
"name" text,
"nat" text,
"ship_type" text,
"where_sunk" text,
"date" text
);
Question: Which nation had a battlecruiser with an estimate of 513?
<|assistant|>
SELECT "nat" FROM "world_war_ii" WHERE "ship_type"='battlecruiser' AND "estimate"='513';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_war_ii" (
"estimate" text,
"name" text,
"nat" text,
"ship_type" text,
"where_sunk" text,
"date" text
);
Question: What is the date that a ship sank in the South Atlantic?
<|assistant|>
SELECT "date" FROM "world_war_ii" WHERE "where_sunk"='south atlantic';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_war_ii" (
"estimate" text,
"name" text,
"nat" text,
"ship_type" text,
"where_sunk" text,
"date" text
);
Question: What type of ship was the Shinano?
<|assistant|>
SELECT "ship_type" FROM "world_war_ii" WHERE "name"='shinano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_war_ii" (
"estimate" text,
"name" text,
"nat" text,
"ship_type" text,
"where_sunk" text,
"date" text
);
Question: What nation had a ship named Roma?
<|assistant|>
SELECT "nat" FROM "world_war_ii" WHERE "name"='roma';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What was score of the Blue Jays' game versus the Indians when their record was 21-19?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "opponent"='indians' AND "record"='21-19';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"division" text,
"team" text,
"city" text,
"home_arena" text,
"capacity" real,
"joined_nt_et" text
);
Question: What city has a team in south division with a home arena with a greater capacity than 6,900 and named cloetta center?
<|assistant|>
SELECT "city" FROM "list" WHERE "capacity">'6,900' AND "division"='south' AND "home_arena"='cloetta center';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
Question: During what years did the tallest building, located at 211 Union Street, have less than 31 floors?
<|assistant|>
SELECT "years_as_tallest" FROM "timeline_of_tallest_buildings" WHERE "floors"<31 AND "street_address"='211 union street';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
Question: What is the average number of floors at 170 Fourth Avenue North?
<|assistant|>
SELECT AVG("floors") FROM "timeline_of_tallest_buildings" WHERE "street_address"='170 fourth avenue north';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
Question: What is the address of the Life & Casualty Tower?
<|assistant|>
SELECT "street_address" FROM "timeline_of_tallest_buildings" WHERE "name"='life & casualty tower';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: What is listed as the Tie no for Home team of Gillingham?
<|assistant|>
SELECT "tie_no" FROM "southern_section" WHERE "home_team"='gillingham';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: What is the Tie no listed for the Away team of Barnet?
<|assistant|>
SELECT "tie_no" FROM "southern_section" WHERE "away_team"='barnet';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: What is listed for the Attendance that has a Tie no of 5?
<|assistant|>
SELECT "attendance" FROM "southern_section" WHERE "tie_no"='5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: Which Away team has a Tie no of 4?
<|assistant|>
SELECT "away_team" FROM "southern_section" WHERE "tie_no"='4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: Which Home Team has an Attendance of 1,859?
<|assistant|>
SELECT "home_team" FROM "southern_section" WHERE "attendance"='1,859';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: What is listed as the Away team for the Home team of the Bristol Rovers?
<|assistant|>
SELECT "away_team" FROM "southern_section" WHERE "home_team"='bristol rovers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clubs" (
"team" text,
"city" text,
"founded" real,
"first_season_in_segunda_divisi_n" real,
"first_season_of_current_spell_in_segunda_divisi_n" real,
"stadium" text,
"capacity" real,
"field" text,
"top_division_titles" real,
"last_top_division_title" text
);
Question: What is the total of the first season in Segunda División that has a City of cañete?
<|assistant|>
SELECT SUM("first_season_of_current_spell_in_segunda_divisi_n") FROM "clubs" WHERE "city"='cañete';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clubs" (
"team" text,
"city" text,
"founded" real,
"first_season_in_segunda_divisi_n" real,
"first_season_of_current_spell_in_segunda_divisi_n" real,
"stadium" text,
"capacity" real,
"field" text,
"top_division_titles" real,
"last_top_division_title" text
);
Question: Which team has Top division titles larger than 0, a Founded larger than 1927, and a Stadium of miguel grau?
<|assistant|>
SELECT "team" FROM "clubs" WHERE "top_division_titles">0 AND "founded">1927 AND "stadium"='miguel grau';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clubs" (
"team" text,
"city" text,
"founded" real,
"first_season_in_segunda_divisi_n" real,
"first_season_of_current_spell_in_segunda_divisi_n" real,
"stadium" text,
"capacity" real,
"field" text,
"top_division_titles" real,
"last_top_division_title" text
);
Question: Which city has a First season of current spell in Segunda División smaller than 2013?
<|assistant|>
SELECT "city" FROM "clubs" WHERE "first_season_of_current_spell_in_segunda_divisi_n"<2013;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clubs" (
"team" text,
"city" text,
"founded" real,
"first_season_in_segunda_divisi_n" real,
"first_season_of_current_spell_in_segunda_divisi_n" real,
"stadium" text,
"capacity" real,
"field" text,
"top_division_titles" real,
"last_top_division_title" text
);
Question: What is the smallest capacity for a First season in Segunda División of 2013, and Top division titles larger than 0?
<|assistant|>
SELECT MIN("capacity") FROM "clubs" WHERE "first_season_in_segunda_divisi_n"=2013 AND "top_division_titles">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"football_stadium" text,
"capacity" real
);
Question: What's the total enrollment ofr Mcgill University that has a capacity less than 25,012?
<|assistant|>
SELECT COUNT("enrollment") FROM "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" WHERE "institution"='mcgill university' AND "capacity"<'25,012';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"football_stadium" text,
"capacity" real
);
Question: What's the smallest season for Montreal that's greater than 5,100 for capacity?
<|assistant|>
SELECT MIN("first_season") FROM "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" WHERE "city"='montreal' AND "capacity">'5,100';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"football_stadium" text,
"capacity" real
);
Question: What's the name of the city whose first season was in 1996?
<|assistant|>
SELECT "city" FROM "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" WHERE "first_season"=1996;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"football_stadium" text,
"capacity" real
);
Question: What's the name of the school that had an enrollment greater than 37,591 with the concordia stadium?
<|assistant|>
SELECT "institution" FROM "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" WHERE "enrollment">'37,591' AND "football_stadium"='concordia stadium';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"football_stadium" text,
"capacity" real
);
Question: What's the name of the carabins stadium?
<|assistant|>
SELECT "football_stadium" FROM "r_seau_du_sport_tudiant_du_qu_bec_dunsmo" WHERE "team"='carabins';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: what team has the qual 2 of 1:44.050?
<|assistant|>
SELECT "best" FROM "qualifying_results" WHERE "qual_2"='1:44.050';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: what name goes along with the team of forsythe racing, and a Qual 2 of 1:47.132?
<|assistant|>
SELECT "name" FROM "qualifying_results" WHERE "team"='forsythe racing' AND "qual_2"='1:47.132';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: what team had the 1:44.027 qual 2?
<|assistant|>
SELECT "team" FROM "qualifying_results" WHERE "qual_2"='1:44.027';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: what is the qual 1 for alex tagliani?
<|assistant|>
SELECT "qual_1" FROM "qualifying_results" WHERE "name"='alex tagliani';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: what is the team with the best of 1:43.134?
<|assistant|>
SELECT "team" FROM "qualifying_results" WHERE "best"='1:43.134';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: What Women's Doubles team played after 2004 and where Line Isberg played Women's Singles?
<|assistant|>
SELECT "women_s_doubles" FROM "winners" WHERE "year">2004 AND "women_s_singles"='line isberg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: After 1999, who played Men's Doubles when Kasper Ipsen played Men's Singles?
<|assistant|>
SELECT "men_s_doubles" FROM "winners" WHERE "year">1999 AND "men_s_singles"='kasper ipsen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: In 2010, who was the Women's Singles player?
<|assistant|>
SELECT "women_s_singles" FROM "winners" WHERE "year"=2010;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1994" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Who was the visiting team at the matchup at the RCA Dome?
<|assistant|>
SELECT "visiting_team" FROM "1994" WHERE "stadium"='rca dome';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1994" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: What was the final score in the game in which the Detroit Lions were the home team?
<|assistant|>
SELECT "final_score" FROM "1994" WHERE "host_team"='detroit lions';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1994" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Which stadium hosted the November 20 game?
<|assistant|>
SELECT "stadium" FROM "1994" WHERE "date"='november 20';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1994" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Who was the visiting team against the Minnesota Vikings?
<|assistant|>
SELECT "visiting_team" FROM "1994" WHERE "host_team"='minnesota vikings';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1994" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Who was the host team at Candlestick Park?
<|assistant|>
SELECT "host_team" FROM "1994" WHERE "stadium"='candlestick park';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1994" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Which date had a final score of 20-27?
<|assistant|>
SELECT "date" FROM "1994" WHERE "final_score"='20-27';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: How many years have had the position of 2nd?
<|assistant|>
SELECT COUNT("year") FROM "achievements" WHERE "position"='2nd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What position had notes of 20km and a year earlier than 2002?
<|assistant|>
SELECT "position" FROM "achievements" WHERE "notes"='20km' AND "year"<2002;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What was the venue before 2006, with the position of 10th?
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "year"<2006 AND "position"='10th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What were the notes when the Venue was Turin, Italy?
<|assistant|>
SELECT "notes" FROM "achievements" WHERE "venue"='turin, italy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "characters" (
"code_name" text,
"function_figure" text,
"real_name" text,
"birthplace" text,
"serial_number" text,
"primary_military_speciality" text,
"secondary_military_speciality" text,
"equipment" text
);
Question: What is Gareth Morgan's Secondary Military Specialty?
<|assistant|>
SELECT "secondary_military_speciality" FROM "characters" WHERE "real_name"='gareth morgan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "characters" (
"code_name" text,
"function_figure" text,
"real_name" text,
"birthplace" text,
"serial_number" text,
"primary_military_speciality" text,
"secondary_military_speciality" text,
"equipment" text
);
Question: What is the Code Name of the figure born in Hawaii?
<|assistant|>
SELECT "code_name" FROM "characters" WHERE "birthplace"='hawaii';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_teams" (
"club" text,
"district" text,
"area_province" text,
"stadium" text,
"first_season" text,
"last_title" text
);
Question: Name the last title for greater buenos aires and first season of 1920
<|assistant|>
SELECT "last_title" FROM "current_teams" WHERE "area_province"='greater buenos aires' AND "first_season"='1920';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_teams" (
"club" text,
"district" text,
"area_province" text,
"stadium" text,
"first_season" text,
"last_title" text
);
Question: Name the area for District of córdoba
<|assistant|>
SELECT "area_province" FROM "current_teams" WHERE "district"='córdoba';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_teams" (
"club" text,
"district" text,
"area_province" text,
"stadium" text,
"first_season" text,
"last_title" text
);
Question: Name the last title for club of quilmes
<|assistant|>
SELECT "last_title" FROM "current_teams" WHERE "club"='quilmes';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_teams" (
"club" text,
"district" text,
"area_province" text,
"stadium" text,
"first_season" text,
"last_title" text
);
Question: Name the last time for club of newell's old boys
<|assistant|>
SELECT "last_title" FROM "current_teams" WHERE "club"='newell''s old boys';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_career" (
"date" text,
"venue" text,
"result" text,
"scored" real,
"competition" text
);
Question: Name the averag scored for 2011 long teng cup and 2 october 2011
<|assistant|>
SELECT AVG("scored") FROM "international_career" WHERE "competition"='2011 long teng cup' AND "date"='2 october 2011';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "le_series_models" (
"colt_model_no" text,
"stock" text,
"fire_control" text,
"rear_sight" text,
"forward_assist" text,
"barrel_length" text,
"barrel_profile" text,
"barrel_twist" text,
"hand_guards" text,
"bayonet_lug" text,
"muzzle_device" text
);
Question: Can you tell me the Barrel twist that has the Barrel lenght of 11.5 in.?
<|assistant|>
SELECT "barrel_twist" FROM "le_series_models" WHERE "barrel_length"='11.5 in.';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "population" (
"year" real,
"region_total" real,
"goondiwindi" real,
"waggamba" real,
"inglewood" real
);
Question: What is the region total before 1986 with a Waggamba of 2,732, and a Goondiwindi less than 3,576?
<|assistant|>
SELECT SUM("region_total") FROM "population" WHERE "year"<1986 AND "waggamba"='2,732' AND "goondiwindi"<'3,576';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "population" (
"year" real,
"region_total" real,
"goondiwindi" real,
"waggamba" real,
"inglewood" real
);
Question: What is the average year that had a value less than 2,575 in Inglewood?
<|assistant|>
SELECT AVG("year") FROM "population" WHERE "inglewood"<'2,575';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "population" (
"year" real,
"region_total" real,
"goondiwindi" real,
"waggamba" real,
"inglewood" real
);
Question: What is the highest value in Waggamba were Inglewwod had 2,771, but Goondiwindi had less than 4,374?
<|assistant|>
SELECT MAX("waggamba") FROM "population" WHERE "inglewood"='2,771' AND "goondiwindi"<'4,374';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "population" (
"year" real,
"region_total" real,
"goondiwindi" real,
"waggamba" real,
"inglewood" real
);
Question: What is the lost amount in Goondiwindi after 2001, and Inglewood had more than 2,586?
<|assistant|>
SELECT MIN("goondiwindi") FROM "population" WHERE "inglewood">'2,586' AND "year">2001;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "population" (
"year" real,
"region_total" real,
"goondiwindi" real,
"waggamba" real,
"inglewood" real
);
Question: In 1996, what was the value for Inglewood when Goondiwindi had more than 4,374, and there is a region total higher than 9,114?
<|assistant|>
SELECT AVG("inglewood") FROM "population" WHERE "region_total">'9,114' AND "year"=1996 AND "goondiwindi">'4,374';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "population" (
"year" real,
"region_total" real,
"goondiwindi" real,
"waggamba" real,
"inglewood" real
);
Question: What is the region total after 2001 when Goondiwindi had more than 4,103 and Inglewood was at 2,613?
<|assistant|>
SELECT COUNT("region_total") FROM "population" WHERE "goondiwindi">'4,103' AND "inglewood"='2,613' AND "year">2001;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: What is the nature of the incident in Kabul on 2004-01-28?
<|assistant|>
SELECT "nature_of_incident" FROM "2004" WHERE "location"='kabul' AND "date"='2004-01-28';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: What is the nature of the incident that's a bomb attack?
<|assistant|>
SELECT "nature_of_incident" FROM "2004" WHERE "circumstances"='bomb attack';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: What is the nature of the incident with Casualties of 3 wia, and Circumstances of ied?
<|assistant|>
SELECT "nature_of_incident" FROM "2004" WHERE "casualties"='3 wia' AND "circumstances"='ied';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: Which Casualties have a Location of kunduz, and Circumstances of suicide?
<|assistant|>
SELECT "casualties" FROM "2004" WHERE "location"='kunduz' AND "circumstances"='suicide';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: Which Casualties have a hostile Nature of incident and Circumstances of mortar attack?
<|assistant|>
SELECT "casualties" FROM "2004" WHERE "nature_of_incident"='hostile' AND "circumstances"='mortar attack';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "delegates" (
"district" text,
"party" text,
"religion" text,
"former_experience" text,
"assumed_office" real,
"born_in" real
);
Question: When was the delegate who has previous experience as a commissioner of health born?
<|assistant|>
SELECT "born_in" FROM "delegates" WHERE "former_experience"='commissioner of health';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: What is the name of the airport in the city of Kota Kinabalu?
<|assistant|>
SELECT "airport" FROM "see_also" WHERE "city"='kota kinabalu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: What is the IATA for the city of Amsterdam?
<|assistant|>
SELECT "iata" FROM "see_also" WHERE "city"='amsterdam';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which country has an IATA of JFK?
<|assistant|>
SELECT "country" FROM "see_also" WHERE "iata"='jfk';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which city has an IATA of AUH?
<|assistant|>
SELECT "city" FROM "see_also" WHERE "iata"='auh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which airport has an IATA of AMS?
<|assistant|>
SELECT "airport" FROM "see_also" WHERE "iata"='ams';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which city has an ICAO of Kiah?
<|assistant|>
SELECT "city" FROM "see_also" WHERE "icao"='kiah';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "actor" (
"original_title" text,
"title_in_english" text,
"genre" text,
"role" text,
"directed_by" text
);
Question: What Genre did Sándor Simó direct?
<|assistant|>
SELECT "genre" FROM "actor" WHERE "directed_by"='sándor simó';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "actor" (
"original_title" text,
"title_in_english" text,
"genre" text,
"role" text,
"directed_by" text
);
Question: What is the Genre for Malina (ger.-aus.-fr.), an Original Title?
<|assistant|>
SELECT "genre" FROM "actor" WHERE "original_title"='malina (ger.-aus.-fr.)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "actor" (
"original_title" text,
"title_in_english" text,
"genre" text,
"role" text,
"directed_by" text
);
Question: The Last Metro refers to which Original Title?
<|assistant|>
SELECT "original_title" FROM "actor" WHERE "title_in_english"='the last metro';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "actor" (
"original_title" text,
"title_in_english" text,
"genre" text,
"role" text,
"directed_by" text
);
Question: What original title, Franciska Vasárnapjai (hungarian), had an Episode Actor role which was Directed by Géza Bereményi?
<|assistant|>
SELECT "genre" FROM "actor" WHERE "role"='episode actor' AND "original_title"='franciska vasárnapjai (hungarian)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "actor" (
"original_title" text,
"title_in_english" text,
"genre" text,
"role" text,
"directed_by" text
);
Question: What is the Original title for an Episode Actor role which was Directed by Géza Bereményi?
<|assistant|>
SELECT "original_title" FROM "actor" WHERE "role"='episode actor' AND "directed_by"='géza bereményi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: What is the round for bob randall?
<|assistant|>
SELECT AVG("round") FROM "june_draft" WHERE "name"='bob randall';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the position when signed is yes, round is less than 24 and name is charlie hough?
<|assistant|>
SELECT "position" FROM "june_draft" WHERE "signed"='yes' AND "round"<24 AND "name"='charlie hough';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the school when signed is no and round is 50?
<|assistant|>
SELECT "school" FROM "june_draft" WHERE "signed"='no' AND "round"=50;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the school for round 8?
<|assistant|>
SELECT "school" FROM "june_draft" WHERE "round"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the position for robert johnson?
<|assistant|>
SELECT "position" FROM "june_draft" WHERE "name"='robert johnson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: Was position ss from carson city high school signed?
<|assistant|>
SELECT "signed" FROM "june_draft" WHERE "position"='ss' AND "school"='carson city high school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"year" text,
"class" text,
"games" real,
"starts" real,
"comp" real,
"yards" real
);
Question: What was the average number of yards Michael Henig had in a year when he had more than 12 starts/
<|assistant|>
SELECT AVG("yards") FROM "statistics" WHERE "starts">12;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"year" text,
"class" text,
"games" real,
"starts" real,
"comp" real,
"yards" real
);
Question: What was the average number of starts Michael Henig had in a year when he had more than 1201 yards?
<|assistant|>
SELECT AVG("starts") FROM "statistics" WHERE "yards">1201;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Name the airport with IATA of cxb
<|assistant|>
SELECT "airport" FROM "list" WHERE "iata"='cxb';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Name the airport with IATA of dmk
<|assistant|>
SELECT "airport" FROM "list" WHERE "iata"='dmk';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Name the city that has singapore changi airport
<|assistant|>
SELECT "city" FROM "list" WHERE "airport"='singapore changi airport';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Name the ICAO for when IATA is zyl
<|assistant|>
SELECT "icao" FROM "list" WHERE "iata"='zyl';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Name the ICAO for IATA of rgn
<|assistant|>
SELECT "icao" FROM "list" WHERE "iata"='rgn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Name the ICAO for IATA of ccu
<|assistant|>
SELECT "icao" FROM "list" WHERE "iata"='ccu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the largest gold with a Total larger than 16?
<|assistant|>
SELECT MAX("gold") FROM "medal_table" WHERE "total">16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the largest silver with a Total smaller than 2, a Bronze smaller than 1, and a Nation of yugoslavia?
<|assistant|>
SELECT MAX("silver") FROM "medal_table" WHERE "total"<2 AND "bronze"<1 AND "nation"='yugoslavia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the smallest bronze with a Nation of west germany, and a Gold larger than 0?
<|assistant|>
SELECT MIN("bronze") FROM "medal_table" WHERE "nation"='west germany' AND "gold">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What was the record on July 2?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='july 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the largest silver with less than 0 gold?
<|assistant|>
SELECT MAX("silver") FROM "medal_table" WHERE "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_1" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" text
);
Question: What's the average total viewers that has 17.6% Share?
<|assistant|>
SELECT AVG("total_viewers") FROM "series_1" WHERE "share"='17.6%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_1" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" text
);
Question: What's the share of Episode 1?
<|assistant|>
SELECT "share" FROM "series_1" WHERE "episode_no"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dublin_and_south_eastern_railway_1854_19" (
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"date_made" text,
"gsr_class" text,
"gsr_nos" text,
"withdrawn" text
);
Question: How many locomotives were made that were withdrawn in 1913?
<|assistant|>
SELECT "quantity_made" FROM "dublin_and_south_eastern_railway_1854_19" WHERE "withdrawn"='1913';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dublin_and_south_eastern_railway_1854_19" (
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"date_made" text,
"gsr_class" text,
"gsr_nos" text,
"withdrawn" text
);
Question: What is the date of creation for the locomotive having a type of 0-4-2
<|assistant|>
SELECT "date_made" FROM "dublin_and_south_eastern_railway_1854_19" WHERE "type"='0-4-2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dublin_and_south_eastern_railway_1854_19" (
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"date_made" text,
"gsr_class" text,
"gsr_nos" text,
"withdrawn" text
);
Question: What is the date of creation of the locomotive of type 0-6-0 and GSR class of 441?
<|assistant|>
SELECT "date_made" FROM "dublin_and_south_eastern_railway_1854_19" WHERE "type"='0-6-0' AND "gsr_class"='441';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.