text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"film" text,
"director_s" text,
"producer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Who directed the film Antonio's Breakfast?
<|assistant|>
SELECT "director_s" FROM "2005" WHERE "film"='antonio''s breakfast';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"film" text,
"director_s" text,
"producer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Who was the director of the film that Sister Films received an award for on 2/3/05?
<|assistant|>
SELECT "director_s" FROM "2005" WHERE "date"='2/3/05' AND "recipient"='sister films';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"municipality" text,
"number" real,
"population" real,
"area" real,
"density" real
);
Question: Name the least number with density more than 262 with population more than 22,415 and area less than 335.14
<|assistant|>
SELECT MIN("number") FROM "statistics" WHERE "density">262 AND "population">'22,415' AND "area"<335.14;<|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,
"record" text
);
Question: What is the score of the game on June 9?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "date"='june 9';<|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 is the usual attendance for july 2?
<|assistant|>
SELECT AVG("attendance") 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 "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Which loss has Attendance more than 47,712, an Opponent of white sox, and a Record of 57–36?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "attendance">'47,712' AND "opponent"='white sox' AND "record"='57–36';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superfund_sites" (
"cerclis_id" text,
"county" text,
"listed" text,
"construction_completed" text,
"partially_deleted" text,
"deleted" text
);
Question: What was the value for deleted for CERCLIS ID of il0210090049?
<|assistant|>
SELECT "deleted" FROM "superfund_sites" WHERE "cerclis_id"='il0210090049';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superfund_sites" (
"cerclis_id" text,
"county" text,
"listed" text,
"construction_completed" text,
"partially_deleted" text,
"deleted" text
);
Question: What is the date construction is completed in Jo Daviess county?
<|assistant|>
SELECT "construction_completed" FROM "superfund_sites" WHERE "county"='jo daviess';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio_and_cd_audio_drama" (
"year" real,
"role" text,
"author" text,
"radio_station_production_company" text,
"release_air_date" text
);
Question: Role of narrator, and a Year larger than 2009, and a Release/Air Date of 7 october 2010 belongs to what author?
<|assistant|>
SELECT "author" FROM "radio_and_cd_audio_drama" WHERE "role"='narrator' AND "year">2009 AND "release_air_date"='7 october 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio_and_cd_audio_drama" (
"year" real,
"role" text,
"author" text,
"radio_station_production_company" text,
"release_air_date" text
);
Question: Role of narrator, and a Radio Station/Production Company of bbc audiobooks, and a Release/Air Date of 13 november 2008 is what sum of the year?
<|assistant|>
SELECT SUM("year") FROM "radio_and_cd_audio_drama" WHERE "role"='narrator' AND "radio_station_production_company"='bbc audiobooks' AND "release_air_date"='13 november 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio_and_cd_audio_drama" (
"year" real,
"role" text,
"author" text,
"radio_station_production_company" text,
"release_air_date" text
);
Question: Radio Station/Production Company that has a Role of interviewee & monologues is what radio station?
<|assistant|>
SELECT "radio_station_production_company" FROM "radio_and_cd_audio_drama" WHERE "role"='interviewee & monologues';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: What was the position of the Racing Organisation Course team?
<|assistant|>
SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "team"='racing organisation course';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Who were the co-drivers for the Racing Organisation Course team in years before 2011, who had a position of DNF?
<|assistant|>
SELECT "co_drivers" FROM "24_hours_of_le_mans_results" WHERE "pos"='dnf' AND "year"<2011 AND "team"='racing organisation course';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Who were the co-drivers in years after 2010?
<|assistant|>
SELECT "co_drivers" FROM "24_hours_of_le_mans_results" WHERE "year">2010;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "londonderry_and_lough_swilly_railway" (
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"manufacturer" text,
"date_made" text,
"date_withdrawn" text
);
Question: What is the date made that has an associated fleet number of 4?
<|assistant|>
SELECT "date_made" FROM "londonderry_and_lough_swilly_railway" WHERE "fleet_numbers"='4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "londonderry_and_lough_swilly_railway" (
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"manufacturer" text,
"date_made" text,
"date_withdrawn" text
);
Question: What is the withdrawal date associated with a date made of 1904?
<|assistant|>
SELECT "date_withdrawn" FROM "londonderry_and_lough_swilly_railway" WHERE "date_made"='1904';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: Name the game site with result of l 7-38
<|assistant|>
SELECT "game_site" FROM "schedule" WHERE "result"='l 7-38';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: Name the result for arrowhead stadium
<|assistant|>
SELECT "result" FROM "schedule" WHERE "game_site"='arrowhead stadium';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"attendance" real
);
Question: Name the least attendance for opponent of new orleans saints and week more than 2
<|assistant|>
SELECT MIN("attendance") FROM "schedule" WHERE "week">2 AND "opponent"='new orleans saints';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_career_summary" (
"year" text,
"tournaments_played" real,
"cuts_made" real,
"wins" real,
"top_10s" real,
"best_finish" text,
"earnings" text,
"money_list_rank" text
);
Question: What amount of earnings corresponds with a Top 10s rank of 23?
<|assistant|>
SELECT "earnings" FROM "pga_tour_career_summary" WHERE "top_10s"=23;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_career_summary" (
"year" text,
"tournaments_played" real,
"cuts_made" real,
"wins" real,
"top_10s" real,
"best_finish" text,
"earnings" text,
"money_list_rank" text
);
Question: What 2012 amount of earnings corresponds with less than 28 tournaments played?
<|assistant|>
SELECT "earnings" FROM "pga_tour_career_summary" WHERE "tournaments_played"<28 AND "year"='2012';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Tell me the year with Laps less than 197 and start of 2
<|assistant|>
SELECT "year" FROM "indy_500_results" WHERE "laps"<197 AND "start"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the qual with start of totals
<|assistant|>
SELECT "qual" FROM "indy_500_results" WHERE "start"='totals';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the total number of laps with rank of 8
<|assistant|>
SELECT COUNT("laps") FROM "indy_500_results" WHERE "rank"='8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the start with Laps of 199 with qual of 224.838
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "laps"=199 AND "qual"='224.838';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team" (
"date" text,
"venue" text,
"score" text,
"competition" text,
"match_report" text
);
Question: On what date was the score 1-2 at Athens Olympic Stadium?
<|assistant|>
SELECT "date" FROM "national_team" WHERE "score"='1-2' AND "venue"='athens olympic stadium';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team" (
"date" text,
"venue" text,
"score" text,
"competition" text,
"match_report" text
);
Question: What was the Match Report for the Euro2008q at the Athens Olympic Stadium on November 17, 2007?
<|assistant|>
SELECT "match_report" FROM "national_team" WHERE "competition"='euro2008q' AND "venue"='athens olympic stadium' AND "date"='november 17, 2007';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team" (
"date" text,
"venue" text,
"score" text,
"competition" text,
"match_report" text
);
Question: What was the Match Report for the Euro2008q at the Athens Olympic Stadium and a score of 1-2?
<|assistant|>
SELECT "match_report" FROM "national_team" WHERE "competition"='euro2008q' AND "venue"='athens olympic stadium' AND "score"='1-2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team" (
"date" text,
"venue" text,
"score" text,
"competition" text,
"match_report" text
);
Question: On what date was the score 2-1?
<|assistant|>
SELECT "date" FROM "national_team" WHERE "score"='2-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team" (
"date" text,
"venue" text,
"score" text,
"competition" text,
"match_report" text
);
Question: On what date was the Competition of Friendly held?
<|assistant|>
SELECT "date" FROM "national_team" WHERE "competition"='friendly';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team" (
"date" text,
"venue" text,
"score" text,
"competition" text,
"match_report" text
);
Question: What was the score at Pankritio Stadium on June 6, 2007?
<|assistant|>
SELECT "score" FROM "national_team" WHERE "venue"='pankritio stadium' AND "date"='june 6, 2007';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_australia" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: On what date was there a draw at Sydney Cricket Ground?
<|assistant|>
SELECT "date" FROM "west_indies_in_australia" WHERE "result"='draw' AND "venue"='sydney cricket ground';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_australia" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: In what venue was the result a draw?
<|assistant|>
SELECT "venue" FROM "west_indies_in_australia" WHERE "result"='draw';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_australia" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: On what date was the result Wi by 1 run?
<|assistant|>
SELECT "date" FROM "west_indies_in_australia" WHERE "result"='wi by 1 run';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_australia" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: What venue had a draw?
<|assistant|>
SELECT "venue" FROM "west_indies_in_australia" WHERE "result"='draw';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"pts" real
);
Question: What is the total number of points for entrants with a Jordan 192 chassis?
<|assistant|>
SELECT SUM("pts") FROM "complete_formula_one_results" WHERE "chassis"='jordan 192';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"pts" real
);
Question: Which entrant had a chassis of March CG891?
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_results" WHERE "chassis"='march cg891';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"pts" real
);
Question: What is the lowest number of points for an entrant with a Jordan 192 chassis?
<|assistant|>
SELECT MIN("pts") FROM "complete_formula_one_results" WHERE "chassis"='jordan 192';<|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" text,
"record" text
);
Question: What Opponent has the Attendance of 14,029?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "attendance"='14,029';<|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" text,
"record" text
);
Question: Can you tell me the Attendance that has the Date of april 12?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "date"='april 12';<|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" text,
"record" text
);
Question: Can you tell me the Score that has the Opponent of brewers, and the Attendance of 11,235?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "opponent"='brewers' AND "attendance"='11,235';<|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" text,
"record" text
);
Question: Can you tell me the Score that has the Attendance of 4,567?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "attendance"='4,567';<|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
);
Question: What is the date with the distance of km (mi) at the course of roccaraso to san giorgio del sannio?
<|assistant|>
SELECT "date" FROM "stage_results" WHERE "distance"='km (mi)' AND "course"='roccaraso to san giorgio del sannio';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the engine with entrant of larrousse f1
<|assistant|>
SELECT "engine" FROM "complete_formula_one_results" WHERE "entrant"='larrousse f1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the average yeara for engine of renault v10 with points more than 4
<|assistant|>
SELECT AVG("year") FROM "complete_formula_one_results" WHERE "engine"='renault v10' AND "points">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the sumof points for year less than 1994 and chassis of lola lc89b
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_results" WHERE "year"<1994 AND "chassis"='lola lc89b';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the entrant for year more than 1991 and chassis of lotus 109
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_results" WHERE "year">1991 AND "chassis"='lotus 109';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the sum of points for 1991
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_results" WHERE "year"=1991;<|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
);
Question: Which type has turin to monza as a course?
<|assistant|>
SELECT "type" FROM "stage_results" WHERE "course"='turin to monza';<|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
);
Question: Which course has km (mi) as a type?
<|assistant|>
SELECT "course" FROM "stage_results" WHERE "type"='km (mi)';<|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
);
Question: What winner has the sanremo to cuneo as the course?
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "course"='sanremo to cuneo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"stage" text,
"route" text,
"distance" text,
"date" text,
"winner" text
);
Question: Name the distance for stage of 2
<|assistant|>
SELECT "distance" FROM "schedule" WHERE "stage"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"stage" text,
"route" text,
"distance" text,
"date" text,
"winner" text
);
Question: Name the route with winner of sébastien rosseler
<|assistant|>
SELECT "route" FROM "schedule" WHERE "winner"='sébastien rosseler';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"stage" text,
"route" text,
"distance" text,
"date" text,
"winner" text
);
Question: Name the route for 170.8km distance
<|assistant|>
SELECT "route" FROM "schedule" WHERE "distance"='170.8km';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"stage" text,
"route" text,
"distance" text,
"date" text,
"winner" text
);
Question: Name the date for luciano pagliarini
<|assistant|>
SELECT "date" FROM "schedule" WHERE "winner"='luciano pagliarini';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"stage" text,
"route" text,
"distance" text,
"date" text,
"winner" text
);
Question: Name the date for mark cavendish
<|assistant|>
SELECT "date" FROM "schedule" WHERE "winner"='mark cavendish';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the laps for qual of 144.665
<|assistant|>
SELECT SUM("laps") FROM "indy_500_results" WHERE "qual"='144.665';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the total number of Laps for year of 1961
<|assistant|>
SELECT COUNT("laps") FROM "indy_500_results" WHERE "year"='1961';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the finish for start of 28
<|assistant|>
SELECT "finish" FROM "indy_500_results" WHERE "start"='28';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the laps for rank of 14 and start of 16
<|assistant|>
SELECT "laps" FROM "indy_500_results" WHERE "rank"='14' AND "start"='16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Name the qual for year of 1960
<|assistant|>
SELECT "qual" FROM "indy_500_results" WHERE "year"='1960';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980_raiders_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
Question: What is the name of the player in position lb and an overall of 128?
<|assistant|>
SELECT "player" FROM "1980_raiders_draft_selections" WHERE "position"='lb' AND "overall"=128;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980_raiders_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
Question: What is the total overall when Kenny Lewis is the player in a round after 5?
<|assistant|>
SELECT COUNT("overall") FROM "1980_raiders_draft_selections" WHERE "player"='kenny lewis' AND "round">5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980_raiders_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
Question: What is the college when the over is larger than 15 in round 7?
<|assistant|>
SELECT "college" FROM "1980_raiders_draft_selections" WHERE "overall">15 AND "round"=7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980_raiders_draft_selections" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
Question: What is the position with an overall less than 128 for Brigham Young college?
<|assistant|>
SELECT "position" FROM "1980_raiders_draft_selections" WHERE "overall"<128 AND "college"='brigham young';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "premier_league" (
"date" text,
"opponents" text,
"result_f_a" text,
"attendance" real,
"league_position" text
);
Question: How many attended the game on 4 February 2003?
<|assistant|>
SELECT AVG("attendance") FROM "premier_league" WHERE "date"='4 february 2003';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1997" (
"sydney" text,
"melbourne" text,
"perth" text,
"adelaide" text,
"gold_coast" text,
"auckland" text
);
Question: yes or no for the auckland with a yes for sydney, no for perth, yes for melbourne and yes for the gold coast?
<|assistant|>
SELECT "auckland" FROM "1997" WHERE "sydney"='yes' AND "perth"='no' AND "melbourne"='yes' AND "gold_coast"='yes';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1997" (
"sydney" text,
"melbourne" text,
"perth" text,
"adelaide" text,
"gold_coast" text,
"auckland" text
);
Question: yes or no for the adelaide with no for auckland, yes for melbourne, yes for the gold coast?
<|assistant|>
SELECT "adelaide" FROM "1997" WHERE "auckland"='no' AND "melbourne"='yes' AND "gold_coast"='yes';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1997" (
"sydney" text,
"melbourne" text,
"perth" text,
"adelaide" text,
"gold_coast" text,
"auckland" text
);
Question: yes or no for the gold coast with yes for melbourne, yes for adelaide, yes for auckland?
<|assistant|>
SELECT "gold_coast" FROM "1997" WHERE "melbourne"='yes' AND "adelaide"='yes' AND "auckland"='yes';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1997" (
"sydney" text,
"melbourne" text,
"perth" text,
"adelaide" text,
"gold_coast" text,
"auckland" text
);
Question: yes or no for the melbourne with yes for gold coast, yes for adelaide, no for auckland?
<|assistant|>
SELECT "melbourne" FROM "1997" WHERE "gold_coast"='yes' AND "adelaide"='no' AND "auckland"='no';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1997" (
"sydney" text,
"melbourne" text,
"perth" text,
"adelaide" text,
"gold_coast" text,
"auckland" text
);
Question: yes or no for the sydney with yes for melbourne, no for perth, no for auckland and no for gold coast?
<|assistant|>
SELECT "sydney" FROM "1997" WHERE "melbourne"='yes' AND "perth"='no' AND "auckland"='no' AND "gold_coast"='no';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1997" (
"sydney" text,
"melbourne" text,
"perth" text,
"adelaide" text,
"gold_coast" text,
"auckland" text
);
Question: yes or no for the melbourne that has no for adelaide, no for gold coast?
<|assistant|>
SELECT "melbourne" FROM "1997" WHERE "adelaide"='yes' AND "gold_coast"='no';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pool_a" (
"rank" real,
"team" text,
"wins" real,
"losses" real,
"runs_allowed" real,
"run_ratio" real
);
Question: How many losses did the team with 0 wins and more than 72 runs allowed have?
<|assistant|>
SELECT SUM("losses") FROM "pool_a" WHERE "wins"=0 AND "runs_allowed">72;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pool_a" (
"rank" real,
"team" text,
"wins" real,
"losses" real,
"runs_allowed" real,
"run_ratio" real
);
Question: What is the lowest amount of losses the United States, ranked higher than 3 with more than 6 wins, have?
<|assistant|>
SELECT MIN("losses") FROM "pool_a" WHERE "rank"<3 AND "team"='united states' AND "wins">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pool_a" (
"rank" real,
"team" text,
"wins" real,
"losses" real,
"runs_allowed" real,
"run_ratio" real
);
Question: How many runs allowed did the team ranked 2 with more than 2 losses have?
<|assistant|>
SELECT AVG("runs_allowed") FROM "pool_a" WHERE "rank"=2 AND "losses">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pool_a" (
"rank" real,
"team" text,
"wins" real,
"losses" real,
"runs_allowed" real,
"run_ratio" real
);
Question: How many total wins did the team ranked lower than 1 with a run ratio less than 5.85 and more than 4 losses have?
<|assistant|>
SELECT COUNT("wins") FROM "pool_a" WHERE "rank">1 AND "run_ratio"<5.85 AND "losses">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pool_a" (
"rank" real,
"team" text,
"wins" real,
"losses" real,
"runs_allowed" real,
"run_ratio" real
);
Question: What is the highest run ratio Japan, which has less than 58 runs and 5 wins, have?
<|assistant|>
SELECT MAX("run_ratio") FROM "pool_a" WHERE "runs_allowed"<58 AND "wins"=5 AND "team"='japan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pool_a" (
"rank" real,
"team" text,
"wins" real,
"losses" real,
"runs_allowed" real,
"run_ratio" real
);
Question: What is the average number of losses the team with less than 25 runs allowed and 5 wins have?
<|assistant|>
SELECT AVG("losses") FROM "pool_a" WHERE "runs_allowed"<25 AND "wins"=5;<|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,
"record" text
);
Question: Which date has tigers as the opponent?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "opponent"='tigers';<|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,
"record" text
);
Question: What loss has october 1 as the date?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "date"='october 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
Question: What year is listed that has points greater than 0 with a chassis labeled AGS JH22?
<|assistant|>
SELECT "year" FROM "complete_formula_one_results" WHERE "points">0 AND "chassis"='ags jh22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
Question: What is the total points listed that includes P listed Tyres after 1986?
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_results" WHERE "tyres"='p' AND "year">1986;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
Question: What point is the lowest for listings of chassis labeled AGS JH23 before 1988?
<|assistant|>
SELECT MIN("points") FROM "complete_formula_one_results" WHERE "chassis"='ags jh23' AND "year"<1988;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
Question: What is the total point for the year listed in 1988?
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_results" WHERE "year"=1988;<|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 attendance on August 2?
<|assistant|>
SELECT MAX("attendance") FROM "game_log" WHERE "date"='august 2';<|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: Which opponent lost with pitcher Kinney (0-1)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='kinney (0-1)';<|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 attendance on August 23?
<|assistant|>
SELECT COUNT("attendance") FROM "game_log" WHERE "date"='august 23';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"events" real,
"cuts_made" real
);
Question: What is the highest wins a tournament with 3 cuts and more than 4 events has?
<|assistant|>
SELECT MAX("wins") FROM "summary" WHERE "cuts_made"=3 AND "events">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_10" real,
"events" real,
"cuts_made" real
);
Question: What is the lowest number of events a tournament with more than 1 top-10 and more than 0 wins has?
<|assistant|>
SELECT MIN("events") FROM "summary" WHERE "top_10">1 AND "wins">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: How many laps did the 6th placed in 1998 complete?
<|assistant|>
SELECT SUM("laps") FROM "24_hours_of_le_mans_results" WHERE "pos"='6th' AND "year"=1998;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: What position did the 5th place team after 1992 with over 346 laps finish in?
<|assistant|>
SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "class_pos"='5th' AND "year">1992 AND "laps">346;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: What team was c1 class, had over 331 laps after 1990?
<|assistant|>
SELECT "team" FROM "24_hours_of_le_mans_results" WHERE "class"='c1' AND "laps">331 AND "year">1990;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: What class did eddie cheever raul boesel race in?
<|assistant|>
SELECT "class" FROM "24_hours_of_le_mans_results" WHERE "co_drivers"='eddie cheever raul boesel';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wins_over_top_10_players_per_season" (
"player" text,
"rank" real,
"event" text,
"surface" text,
"score" text
);
Question: What's the lowest rank of a player who played in 2012?
<|assistant|>
SELECT MIN("rank") FROM "wins_over_top_10_players_per_season" WHERE "event"='2012';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wins_over_top_10_players_per_season" (
"player" text,
"rank" real,
"event" text,
"surface" text,
"score" text
);
Question: What player has the rank 2011?
<|assistant|>
SELECT "player" FROM "wins_over_top_10_players_per_season" WHERE "rank"=2011;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wins_over_top_10_players_per_season" (
"player" text,
"rank" real,
"event" text,
"surface" text,
"score" text
);
Question: What was the score of the match played on hard with a person ranked 10?
<|assistant|>
SELECT "score" FROM "wins_over_top_10_players_per_season" WHERE "surface"='hard' AND "rank"=10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"language" text,
"number" text,
"percentage_pct" text,
"males" text,
"females" text
);
Question: What females speak Romanian?
<|assistant|>
SELECT "females" FROM "language" WHERE "language"='romanian';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"language" text,
"number" text,
"percentage_pct" text,
"males" text,
"females" text
);
Question: What females have males of 1 234?
<|assistant|>
SELECT "females" FROM "language" WHERE "males"='1 234';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"language" text,
"number" text,
"percentage_pct" text,
"males" text,
"females" text
);
Question: What males speak Polish?
<|assistant|>
SELECT "males" FROM "language" WHERE "language"='polish';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"language" text,
"number" text,
"percentage_pct" text,
"males" text,
"females" text
);
Question: What is the number of males 977 948?
<|assistant|>
SELECT "number" FROM "language" WHERE "males"='977 948';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.