text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
Question: What is the quantity made of the locomotive with a Waterford class?
<|assistant|>
SELECT "quantity_made" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "class"='waterford';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
Question: What is the class of the locomotive with a quantity made of 1 and a 0-6-0t type?
<|assistant|>
SELECT "class" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "quantity_made"='1' AND "type"='0-6-0t';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
Question: What is the class of the locomotive with a 0-4-0st type?
<|assistant|>
SELECT "class" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "type"='0-4-0st';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sligo_leitrim_and_northern_counties_rail" (
"class" text,
"type" text,
"names" text,
"quantity_made" text,
"manufacturer" text,
"date_made" text
);
Question: What is the name of the locomotive with a Glencar class?
<|assistant|>
SELECT "names" FROM "sligo_leitrim_and_northern_counties_rail" WHERE "class"='glencar';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
Question: What country has signed type moving from porto?
<|assistant|>
SELECT "country" FROM "in" WHERE "type"='signed' AND "moving_from"='porto';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
Question: Which transfer window was moving from borussia dortmund?
<|assistant|>
SELECT "transfer_window" FROM "in" WHERE "moving_from"='borussia dortmund';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
Question: What is moving from esp with transfer fee of youth system?
<|assistant|>
SELECT "moving_from" FROM "in" WHERE "country"='esp' AND "transfer_fee"='youth system';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text,
"source" text
);
Question: What is the transfer window in esp with promoted type and more than 2010 ends?
<|assistant|>
SELECT "transfer_window" FROM "in" WHERE "country"='esp' AND "type"='promoted' AND "ends">2010;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominations" (
"week_2" text,
"week_4" text,
"week_6" text,
"week_11" text,
"week_12" text,
"week_13" text,
"week_15" text
);
Question: Who is the week 12 for the week 2 with Magda Tomek?
<|assistant|>
SELECT "week_12" FROM "nominations" WHERE "week_2"='magda tomek';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominations" (
"week_2" text,
"week_4" text,
"week_6" text,
"week_11" text,
"week_12" text,
"week_13" text,
"week_15" text
);
Question: Who is the week 12 for the week 4 of Gerard Ewelina?
<|assistant|>
SELECT "week_12" FROM "nominations" WHERE "week_4"='gerard ewelina';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
Question: Who was the leader in Points when Al Jefferson (7) was the leader in Rebounds?
<|assistant|>
SELECT "points" FROM "usa" WHERE "rebounds"='al jefferson (7)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
Question: Who was the leader in Steals when Travis Watson (9) was the leader in Rebounds?
<|assistant|>
SELECT "steals" FROM "usa" WHERE "rebounds"='travis watson (9)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
Question: What was the 1st Year Al Harrington (9) the leader in Rebounds?
<|assistant|>
SELECT MIN("year") FROM "usa" WHERE "rebounds"='al harrington (9)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "usa" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
Question: Who was the leader in Points with Assists of 2 tied (5) and Steals of 3 tied (2)?
<|assistant|>
SELECT "points" FROM "usa" WHERE "steals"='3 tied (2)' AND "assists"='2 tied (5)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_scorers" (
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
Question: Name the average with tally of 0-29 and total more than 29
<|assistant|>
SELECT AVG("average") FROM "top_scorers" WHERE "tally"='0-29' AND "total">29;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_scorers" (
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
Question: Name the tally with total less than 27 and average more than 3.41
<|assistant|>
SELECT "tally" FROM "top_scorers" WHERE "total"<27 AND "average">3.41;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: For engines of Maserati Straight-6 and entrants of H H Gould, what is the latest year?
<|assistant|>
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='maserati straight-6' AND "entrant"='h h gould';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What is the fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956?
<|assistant|>
SELECT MIN("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='goulds'' garage (bristol)' AND "engine"='maserati straight-6' AND "year"<1956;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which chassis has fewer than 2 points, entrants of Goulds' Garage (Bristol), in 1954?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "points"<2 AND "entrant"='goulds'' garage (bristol)' AND "year"=1954;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What is the most points that the Maserati 250F chassis scored in years after 1955?
<|assistant|>
SELECT MAX("points") FROM "complete_formula_one_world_championship_" WHERE "chassis"='maserati 250f' AND "year">1955;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which engine has a year larger than 1956?
<|assistant|>
SELECT "engine" FROM "complete_formula_one_world_championship_" WHERE "year">1956;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apollo_astronauts_who_flew_to_the_moon_w" (
"name" text,
"born" text,
"age_on_mission" real,
"mission" text,
"mission_dates" text,
"service" text
);
Question: What is the lowest age of an astronaut named Stu Roosa?
<|assistant|>
SELECT MIN("age_on_mission") FROM "apollo_astronauts_who_flew_to_the_moon_w" WHERE "name"='stu roosa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apollo_astronauts_who_flew_to_the_moon_w" (
"name" text,
"born" text,
"age_on_mission" real,
"mission" text,
"mission_dates" text,
"service" text
);
Question: What mission did the astronaut who 38 years old on the mission and who served in NASA serve on?
<|assistant|>
SELECT "mission" FROM "apollo_astronauts_who_flew_to_the_moon_w" WHERE "service"='nasa' AND "age_on_mission"=38;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
Question: what is the type of lithium when rubidium is nabr (1.9)?
<|assistant|>
SELECT "lithium" FROM "properties" WHERE "rubidium"='nabr (1.9)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
Question: what is the properties of sodium when rubidium is nacl (2.1)?
<|assistant|>
SELECT "sodium" FROM "properties" WHERE "rubidium"='nacl (2.1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
Question: what is the properties of potassium when lithium is h a l o g e n s and sodium is bromine?
<|assistant|>
SELECT "potassium" FROM "properties" WHERE "lithium"='h a l o g e n s' AND "sodium"='bromine';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
Question: what is the properties of lithium when caesium is ki (1.7)?
<|assistant|>
SELECT "lithium" FROM "properties" WHERE "caesium"='ki (1.7)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
Question: what is the properties of sodium when lithium is h a l o g e n s and rubidium is nacl (2.1)?
<|assistant|>
SELECT "sodium" FROM "properties" WHERE "lithium"='h a l o g e n s' AND "rubidium"='nacl (2.1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "properties" (
"lithium" text,
"sodium" text,
"potassium" text,
"rubidium" text,
"caesium" text
);
Question: what is the properties of sodium when potassium is lii (1.5)?
<|assistant|>
SELECT "sodium" FROM "properties" WHERE "potassium"='lii (1.5)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
Question: Which prime mover had a Model of rs-18?
<|assistant|>
SELECT "prime_mover" FROM "rs_series_b_b" WHERE "model"='rs-18';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
Question: Which model had a Specification of dl-718?
<|assistant|>
SELECT "model" FROM "rs_series_b_b" WHERE "specification"='dl-718';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
Question: Which power output had a Build date of 1951–1956?
<|assistant|>
SELECT "power_output" FROM "rs_series_b_b" WHERE "build_date"='1951–1956';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rs_series_b_b" (
"model" text,
"specification" text,
"build_date" text,
"total_produced" real,
"wheel_arrangement" text,
"prime_mover" text,
"power_output" text
);
Question: Which wheel arrangement had a Specification of dl-700?
<|assistant|>
SELECT "wheel_arrangement" FROM "rs_series_b_b" WHERE "specification"='dl-700';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
Question: Who is the player born before 1985 who is less than 2.02 tall?
<|assistant|>
SELECT "player" FROM "fiba_euro_basket_2007_squads" WHERE "year_born"<1985 AND "height"<2.02;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
Question: Who is the player who was born before 1980 who currently plays for the Toronto Raptors?
<|assistant|>
SELECT "player" FROM "fiba_euro_basket_2007_squads" WHERE "year_born"<1980 AND "current_club"='toronto raptors';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
Question: What position does Sergio Rodríguez, who is less than 1.96 tall and was born after 1980, play?
<|assistant|>
SELECT "position" FROM "fiba_euro_basket_2007_squads" WHERE "height"<1.96 AND "year_born">1980 AND "player"='sergio rodríguez';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
Question: What year was the Guard who currently plays for the Memphis Grizzlies born?
<|assistant|>
SELECT "year_born" FROM "fiba_euro_basket_2007_squads" WHERE "position"='guard' AND "current_club"='memphis grizzlies';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fiba_euro_basket_2007_squads" (
"player" text,
"height" real,
"position" text,
"year_born" real,
"current_club" text
);
Question: What is the height of the Forward who currently plays for the Toronto Raptors?
<|assistant|>
SELECT "height" FROM "fiba_euro_basket_2007_squads" WHERE "position"='forward' AND "current_club"='toronto raptors';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
Question: Date of 24 september 2002 is what group position?
<|assistant|>
SELECT "group_position" FROM "group_stage" WHERE "date"='24 september 2002';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
Question: Attendance larger than 63,439, and an Opponent of bayer leverkusen had what result?
<|assistant|>
SELECT "result_f_a" FROM "group_stage" WHERE "attendance">'63,439' AND "opponents"='bayer leverkusen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
Question: Date of 24 september 2002 had what F-A result?
<|assistant|>
SELECT "result_f_a" FROM "group_stage" WHERE "date"='24 september 2002';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
Question: Result F–A of 2–0 had what total number of attendance?
<|assistant|>
SELECT COUNT("attendance") FROM "group_stage" WHERE "result_f_a"='2–0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "july" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text
);
Question: What was the score of the game with a loss of Myers (5-6)?
<|assistant|>
SELECT "score" FROM "july" WHERE "loss"='myers (5-6)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "july" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text
);
Question: What was the loss of the game attended by 41,212?
<|assistant|>
SELECT "loss" FROM "july" WHERE "attendance"='41,212';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "july" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text
);
Question: What was the attendance of the game that had a loss of Wolf (3-4)?
<|assistant|>
SELECT "attendance" FROM "july" WHERE "loss"='wolf (3-4)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "junior_under_20_women" (
"rank" real,
"fastest_time_s" real,
"wind_m_s" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
Question: what nation is bianca knight the answer for?
<|assistant|>
SELECT "nation" FROM "junior_under_20_women" WHERE "athlete"='bianca knight';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "junior_under_20_women" (
"rank" real,
"fastest_time_s" real,
"wind_m_s" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
Question: what is the wind speed when brenda morehead was in the united states?
<|assistant|>
SELECT MIN("wind_m_s") FROM "junior_under_20_women" WHERE "nation"='united states' AND "athlete"='brenda morehead';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "junior_under_20_women" (
"rank" real,
"fastest_time_s" real,
"wind_m_s" real,
"athlete" text,
"nation" text,
"date" text,
"location" text
);
Question: what is the highest rank in dresden with a time faster than 10.88?
<|assistant|>
SELECT MAX("rank") FROM "junior_under_20_women" WHERE "location"='dresden' AND "fastest_time_s"<10.88;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
Question: What is the course on 1 June?
<|assistant|>
SELECT "course" FROM "stage_results" WHERE "date"='1 june';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
Question: Who is the winner of the Florence to Genoa course?
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "course"='florence to genoa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
Question: What is the date of the Rome to Florence course?
<|assistant|>
SELECT "date" FROM "stage_results" WHERE "course"='rome to florence';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world" (
"year" real,
"points" text,
"rebounds" text,
"assists" text,
"steals" text,
"blocks" text
);
Question: What is Assists that has a Blocks of 2 tied (1) with a Year larger than 1995
<|assistant|>
SELECT "assists" FROM "world" WHERE "blocks"='2 tied (1)' AND "year">1995;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the highest lane for heat 6 with a time of dns?
<|assistant|>
SELECT MAX("lane") FROM "heats" WHERE "heat"=6 AND "time"='dns';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the lowest lane with a time of 2:05.90, and a Heat larger than 3?
<|assistant|>
SELECT MIN("lane") FROM "heats" WHERE "time"='2:05.90' AND "heat">3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What nationality has a lane larger than 4 and a Time of 2:00.37?
<|assistant|>
SELECT "nationality" FROM "heats" WHERE "lane">4 AND "time"='2:00.37';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the average Lane where Belarus is the nationality?
<|assistant|>
SELECT AVG("lane") FROM "heats" WHERE "nationality"='belarus';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the highest lane for nisha millet?
<|assistant|>
SELECT MAX("lane") FROM "heats" WHERE "name"='nisha millet';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text,
"race_leader" text
);
Question: On what date was the race course from Rome to Naples?
<|assistant|>
SELECT "date" FROM "stage_results" WHERE "course"='rome to naples';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
Question: Name the Losing BP with 22 played and 9 Try BP.
<|assistant|>
SELECT "losing_bp" FROM "2008_2009_table" WHERE "played"='22' AND "try_bp"='9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
Question: Name the Losing BP with drawn of 1 and a Try BP of 6.
<|assistant|>
SELECT "losing_bp" FROM "2008_2009_table" WHERE "drawn"='1' AND "try_bp"='6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
Question: Name the Losing BP of Newport Saracens RFC and has a Lost of 19.
<|assistant|>
SELECT "losing_bp" FROM "2008_2009_table" WHERE "lost"='19' AND "club"='newport saracens rfc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
Question: Name the Drawn for Ystrad Rhondda RFC and has Played of 22.
<|assistant|>
SELECT "drawn" FROM "2008_2009_table" WHERE "played"='22' AND "club"='ystrad rhondda rfc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
Question: Can you name the drawn with a Lost of 1?
<|assistant|>
SELECT "drawn" FROM "2008_2009_table" WHERE "lost"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"try_bp" text,
"losing_bp" text
);
Question: With a Losing BP of 8, what is the drawn?
<|assistant|>
SELECT "drawn" FROM "2008_2009_table" WHERE "losing_bp"='8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_list" (
"player" text,
"afl_debut" text,
"games" text,
"goals" text,
"behinds" text,
"kicks" text,
"handballs" text,
"disposals" text,
"marks" text,
"tackles" text
);
Question: What is the number of disposals when marks is 134?
<|assistant|>
SELECT "disposals" FROM "player_list" WHERE "marks"='134';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "friendlies" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
Question: What is the Score1 of Match 42?
<|assistant|>
SELECT "score1" FROM "friendlies" WHERE "match"=42;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "friendlies" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
Question: On what date was the match higher than 8 on ground A against Guiseley?
<|assistant|>
SELECT "date" FROM "friendlies" WHERE "match">8 AND "ground"='a' AND "opponent"='guiseley';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "friendlies" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
Question: On what ground was the game on 31 Jul 2007?
<|assistant|>
SELECT "ground" FROM "friendlies" WHERE "date"='31 jul 2007';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: What is the total of David Toms?
<|assistant|>
SELECT SUM("total") FROM "made_the_cut" WHERE "player"='david toms';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: What is the average of Fiji with t10 Finish?
<|assistant|>
SELECT AVG("total") FROM "made_the_cut" WHERE "finish"='t10' AND "country"='fiji';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: Who won in 1983?
<|assistant|>
SELECT "player" FROM "made_the_cut" WHERE "year_s_won"='1983';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
Question: Which english website has a daily frequency ?
<|assistant|>
SELECT "website" FROM "newspapers" WHERE "language"='english' AND "frequency"='daily';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
Question: What is the frequency of the newspaper, el diario de nuevo laredo in the city of nuevo laredo ?
<|assistant|>
SELECT "frequency" FROM "newspapers" WHERE "city"='nuevo laredo' AND "name"='el diario de nuevo laredo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
Question: What is the website of the Laredo Sun in the city of Laredo ?
<|assistant|>
SELECT "website" FROM "newspapers" WHERE "city"='laredo' AND "name"='laredo sun';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
Question: What is the name of the newspaper with the website liderinformativo.com ?
<|assistant|>
SELECT "name" FROM "newspapers" WHERE "website"='liderinformativo.com';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
Question: Which website is in english and has the frequency of an online newspaper ?
<|assistant|>
SELECT "website" FROM "newspapers" WHERE "language"='english' AND "frequency"='online newspaper';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "newspapers" (
"name" text,
"frequency" text,
"language" text,
"city" text,
"website" text
);
Question: Which city has spanish news on the website ultimahora.com ?
<|assistant|>
SELECT "city" FROM "newspapers" WHERE "language"='spanish' AND "website"='ultimahora.com';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which line after 1959 had the highest amount of points?
<|assistant|>
SELECT MAX("points") FROM "complete_formula_one_world_championship_" WHERE "year">1959;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which line has the lowest amount of points and a year of 1954?
<|assistant|>
SELECT MIN("points") FROM "complete_formula_one_world_championship_" WHERE "year"=1954;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What is the total amount of points that Christy has in the years before 1954?
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='christy' AND "year"<1954;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which is the latest year that has an engine of Offenhauser l4, a chassis of Kurtis Kraft 500c, and the entrant of Federal Engineering?
<|assistant|>
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='offenhauser l4' AND "chassis"='kurtis kraft 500c' AND "entrant"='federal engineering';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which chasis was in the year 1954?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "year"=1954;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
Question: What is the final score in 2007 for the world league in novi sad played against Italy?
<|assistant|>
SELECT "final_score" FROM "matches" WHERE "year"=2007 AND "competition"='world league' AND "town"='novi sad' AND "opponent"='italy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
Question: what is the competition played in budva against italy?
<|assistant|>
SELECT "competition" FROM "matches" WHERE "town"='budva' AND "opponent"='italy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
Question: what is the competition that had a final score of 6:5?
<|assistant|>
SELECT "competition" FROM "matches" WHERE "final_score"='6:5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches" (
"year" real,
"competition" text,
"town" text,
"opponent" text,
"final_score" text
);
Question: who is the opponent when played in trieste before 2007?
<|assistant|>
SELECT "opponent" FROM "matches" WHERE "year"<2007 AND "town"='trieste';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
Question: What was Bob Jameson's lowest bonus where he had less than 15 rides?
<|assistant|>
SELECT MIN("bonus_pts") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "rider"='bob jameson' AND "rides"<15;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
Question: How many rides did it take to get less than 3 bonus pts in no more than 7 matches?
<|assistant|>
SELECT MIN("rides") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "bonus_pts"<3 AND "matches"<7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
Question: What is the total for 34 matches with 111 rides, but no more than 15 bonus points?
<|assistant|>
SELECT AVG("total_points") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "matches"=34 AND "rides"=111 AND "bonus_pts">15;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
Question: How many rides did it take Ray Day to get 274 points in total with less than 3 bonus points?
<|assistant|>
SELECT COUNT("rides") FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "total_points"<274 AND "rider"='ray day' AND "bonus_pts">3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965_season_finished_5th_39pts_out_of_18" (
"rider" text,
"matches" real,
"rides" real,
"bonus_pts" real,
"total_points" real
);
Question: Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus points?
<|assistant|>
SELECT "rider" FROM "1965_season_finished_5th_39pts_out_of_18" WHERE "total_points"<342 AND "rides"<76 AND "matches"=7 AND "bonus_pts">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "champions_tour_wins_45" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What is the Margin of victory on aug 11, 2002?
<|assistant|>
SELECT "margin_of_victory" FROM "champions_tour_wins_45" WHERE "date"='aug 11, 2002';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "champions_tour_wins_45" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: When has a Winning score of –16 (70-65-65=200)?
<|assistant|>
SELECT "date" FROM "champions_tour_wins_45" WHERE "winning_score"='–16 (70-65-65=200)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "champions_tour_wins_45" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What is the Margin of victory on oct 5, 1997?
<|assistant|>
SELECT "margin_of_victory" FROM "champions_tour_wins_45" WHERE "date"='oct 5, 1997';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "champions_tour_wins_45" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What is the Winning score on oct 22, 2000?
<|assistant|>
SELECT "winning_score" FROM "champions_tour_wins_45" WHERE "date"='oct 22, 2000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_2" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" text
);
Question: How many episodes have a share of 16.2% and an episode number of less than 1?
<|assistant|>
SELECT COUNT("total_viewers") FROM "series_2" WHERE "share"='16.2%' AND "episode_no"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: If the French Open tournament had 2r in 2012, what was it in 2010?
<|assistant|>
SELECT "2010" FROM "singles_performance_timeline" WHERE "2012"='2r' AND "tournament"='french open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: Which 2012 tournament had 2r in 2010?
<|assistant|>
SELECT "2012" FROM "singles_performance_timeline" WHERE "2010"='2r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: Which tournament had 2r in 2010?
<|assistant|>
SELECT "tournament" FROM "singles_performance_timeline" WHERE "2010"='2r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: If the French Open tournament had 2r in 2012, what was it in 2009?
<|assistant|>
SELECT "2009" FROM "singles_performance_timeline" WHERE "2012"='2r' AND "tournament"='french open';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.