text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"stage" text,
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
Question: Who was the winner for the Rome to Teramo course?
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "course"='rome to teramo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"stage" text,
"date" text,
"course" text,
"distance" text,
"winner" text,
"race_leader" text
);
Question: Who was the winner of stage 11?
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "stage"='11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "club" (
"season" text,
"team" text,
"country" text,
"division" text,
"apps" real,
"goals" real
);
Question: What is the average Apps of indonesia with Goals smaller than 1000?
<|assistant|>
SELECT AVG("apps") FROM "club" WHERE "country"='indonesia' AND "goals"<1000;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "club" (
"season" text,
"team" text,
"country" text,
"division" text,
"apps" real,
"goals" real
);
Question: What division is Traktor Tashkent in 2005?
<|assistant|>
SELECT "division" FROM "club" WHERE "team"='traktor tashkent' AND "season"='2005';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "club" (
"season" text,
"team" text,
"country" text,
"division" text,
"apps" real,
"goals" real
);
Question: How many apps does Uzbekistan have in 2003?
<|assistant|>
SELECT "apps" FROM "club" WHERE "country"='uzbekistan' AND "season"='2003';<|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 was the attendance at the game when the record was 74-77?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "record"='74-77';<|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 was score of the game when the record was 72-74?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='72-74';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_3" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" real
);
Question: What were the air-dates of the episodes before episode 4 that had a BBC One weekly ranking of 6?
<|assistant|>
SELECT "airdate" FROM "series_3" WHERE "episode_no"<4 AND "bbc_one_weekly_ranking"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_3" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" real
);
Question: What was the total viewership for BBC One weekly rankings larger than 7, before episode 4?
<|assistant|>
SELECT "total_viewers" FROM "series_3" WHERE "bbc_one_weekly_ranking">7 AND "episode_no"<4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cultural_events" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the most rank with bronze of 0 and silver more than 1 and gold more than 0
<|assistant|>
SELECT MAX("rank") FROM "cultural_events" WHERE "bronze"=0 AND "silver">1 AND "gold">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cultural_events" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the average silver with total less than 1
<|assistant|>
SELECT AVG("silver") FROM "cultural_events" WHERE "total"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "awards" (
"year" real,
"award" text,
"festival" text,
"nominated_work" text,
"result" text
);
Question: Name the average year for result of nominated
<|assistant|>
SELECT AVG("year") FROM "awards" WHERE "result"='nominated';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "awards" (
"year" real,
"award" text,
"festival" text,
"nominated_work" text,
"result" text
);
Question: Name the nominated work for 1996 and festival of black maria film and video festival
<|assistant|>
SELECT "nominated_work" FROM "awards" WHERE "year"=1996 AND "festival"='black maria film and video festival';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league" (
"date" text,
"team" text,
"venue" text,
"win_draw_lose" text,
"score" text
);
Question: What was the date of the away game that they lost to Accrington?
<|assistant|>
SELECT "date" FROM "league" WHERE "venue"='away' AND "win_draw_lose"='lost' AND "team"='accrington';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league" (
"date" text,
"team" text,
"venue" text,
"win_draw_lose" text,
"score" text
);
Question: What was the date of the home game against Accrington?
<|assistant|>
SELECT "date" FROM "league" WHERE "team"='accrington' AND "venue"='home';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league" (
"date" text,
"team" text,
"venue" text,
"win_draw_lose" text,
"score" text
);
Question: What was the result of the home game against Derby County?
<|assistant|>
SELECT "win_draw_lose" FROM "league" WHERE "venue"='home' AND "team"='derby county';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "for_the_x_window_system" (
"name" text,
"creator" text,
"latest_stable_version" text,
"standard_cost_usd" text,
"software_license" text
);
Question: What is the Standard cost (USD) by hans Oischinger Creator ?
<|assistant|>
SELECT "standard_cost_usd" FROM "for_the_x_window_system" WHERE "creator"='hans oischinger';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "for_the_x_window_system" (
"name" text,
"creator" text,
"latest_stable_version" text,
"standard_cost_usd" text,
"software_license" text
);
Question: What is the Standard cost (USD) of Kwin team creator?
<|assistant|>
SELECT "standard_cost_usd" FROM "for_the_x_window_system" WHERE "creator"='kwin team';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "for_the_x_window_system" (
"name" text,
"creator" text,
"latest_stable_version" text,
"standard_cost_usd" text,
"software_license" text
);
Question: Who is the Creator that has a version of 0.5.2 (part of compiz fusion release)?
<|assistant|>
SELECT "creator" FROM "for_the_x_window_system" WHERE "latest_stable_version"='0.5.2 (part of compiz fusion release)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "for_the_x_window_system" (
"name" text,
"creator" text,
"latest_stable_version" text,
"standard_cost_usd" text,
"software_license" text
);
Question: Who is a Creator of hyriand?
<|assistant|>
SELECT "name" FROM "for_the_x_window_system" WHERE "creator"='hyriand';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"game" real,
"date" text,
"score" text,
"location" text,
"time" text,
"attendance" real
);
Question: What is the number of people who attended the game later than game 6?
<|assistant|>
SELECT COUNT("attendance") FROM "summary" WHERE "game">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "recording_industry_association_of_americ" (
"year" real,
"date" text,
"title" text,
"format_s" text,
"award_description_s" text,
"result_s" text
);
Question: Which title has a year later than 1986 with an album as the format?
<|assistant|>
SELECT "title" FROM "recording_industry_association_of_americ" WHERE "year">1986 AND "format_s"='album';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "recording_industry_association_of_americ" (
"year" real,
"date" text,
"title" text,
"format_s" text,
"award_description_s" text,
"result_s" text
);
Question: Which is the average year with the date of February 24?
<|assistant|>
SELECT AVG("year") FROM "recording_industry_association_of_americ" WHERE "date"='february 24';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "recording_industry_association_of_americ" (
"year" real,
"date" text,
"title" text,
"format_s" text,
"award_description_s" text,
"result_s" text
);
Question: Which award description has a year later than 1994 with a date of December 6?
<|assistant|>
SELECT "award_description_s" FROM "recording_industry_association_of_americ" WHERE "year">1994 AND "date"='december 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: How many goals have a Date of december 4, 2010, and a Score of 1-0?
<|assistant|>
SELECT COUNT("goal") FROM "international_goals" WHERE "date"='december 4, 2010' AND "score"='1-0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which venue has a Competition of 2008 myanmar grand royal challenge cup?
<|assistant|>
SELECT "venue" FROM "international_goals" WHERE "competition"='2008 myanmar grand royal challenge cup';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which venue has a Goal of 4?
<|assistant|>
SELECT "venue" FROM "international_goals" WHERE "goal"=4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What is the largest goal with a Score of 3-0?
<|assistant|>
SELECT MAX("goal") FROM "international_goals" WHERE "score"='3-0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_24_12_12" (
"outcome" text,
"date" text,
"surface" text,
"partnering" text,
"opponents_in_the_final" text,
"score" text
);
Question: Who did Bruno Soares and a partner face in the finals on a clay surface on August 1, 2010?
<|assistant|>
SELECT "opponents_in_the_final" FROM "doubles_24_12_12" WHERE "partnering"='bruno soares' AND "surface"='clay' AND "date"='august 1, 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_24_12_12" (
"outcome" text,
"date" text,
"surface" text,
"partnering" text,
"opponents_in_the_final" text,
"score" text
);
Question: What surface was played on that resulted in a score of 4–6, 6–2, [10–7]?
<|assistant|>
SELECT "surface" FROM "doubles_24_12_12" WHERE "score"='4–6, 6–2, [10–7]';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_24_12_12" (
"outcome" text,
"date" text,
"surface" text,
"partnering" text,
"opponents_in_the_final" text,
"score" text
);
Question: What was the outcome on May 25, 2009?
<|assistant|>
SELECT "outcome" FROM "doubles_24_12_12" WHERE "date"='may 25, 2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_24_12_12" (
"outcome" text,
"date" text,
"surface" text,
"partnering" text,
"opponents_in_the_final" text,
"score" text
);
Question: What was the outcome on May 18, 2008?
<|assistant|>
SELECT "outcome" FROM "doubles_24_12_12" WHERE "date"='may 18, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_thursday" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
Question: what is the place for Heath Slocum?
<|assistant|>
SELECT "place" FROM "first_round_thursday" WHERE "player"='heath slocum';<|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 is the attendance for august 29?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "date"='august 29';<|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: Which loss has an Opponent of @ angels, and a Date of august 1?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "opponent"='@ angels' AND "date"='august 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" text,
"record" text
);
Question: Which score has an Attendance of 31,178?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "attendance"='31,178';<|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: Which record has a Date of august 28?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='august 28';<|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: Which loss has an Attendance of 23,952?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "attendance"='23,952';<|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: Which opponent has a Loss of corcoran (4-4)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='corcoran (4-4)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_and_goals_scored_at_world_cup_an" (
"match" text,
"date" text,
"location" text,
"lineup" text,
"result" text,
"competition" text
);
Question: What is the location of the gold medal match?
<|assistant|>
SELECT "location" FROM "matches_and_goals_scored_at_world_cup_an" WHERE "competition"='gold medal match';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_and_goals_scored_at_world_cup_an" (
"match" text,
"date" text,
"location" text,
"lineup" text,
"result" text,
"competition" text
);
Question: What was the lineup that resulted in 1-0 AET W?
<|assistant|>
SELECT "lineup" FROM "matches_and_goals_scored_at_world_cup_an" WHERE "result"='1-0 aet w';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_and_goals_scored_at_world_cup_an" (
"match" text,
"date" text,
"location" text,
"lineup" text,
"result" text,
"competition" text
);
Question: What was the result of match 25?
<|assistant|>
SELECT "result" FROM "matches_and_goals_scored_at_world_cup_an" WHERE "match"='25';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_and_goals_scored_at_world_cup_an" (
"match" text,
"date" text,
"location" text,
"lineup" text,
"result" text,
"competition" text
);
Question: What is the result of the London 2012 Women's Olympic Football Tournament?
<|assistant|>
SELECT "result" FROM "matches_and_goals_scored_at_world_cup_an" WHERE "location"='london 2012 women''s olympic football tournament';<|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 score of the game that had a loss of Wegman (2-6)?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "loss"='wegman (2-6)';<|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 at the game that had a loss of Blyleven (4-5)?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "loss"='blyleven (4-5)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "monthly_normal_low_and_high_temperatures" (
"city" text,
"jan" text,
"feb" text,
"mar" text,
"apr" text,
"jun" text,
"jul" text,
"aug" text,
"sep" text,
"oct" text,
"nov" text,
"dec" text
);
Question: Name the city with july of 88 °f / 31.1 °c
<|assistant|>
SELECT "city" FROM "monthly_normal_low_and_high_temperatures" WHERE "jul"='88 °f / 31.1 °c';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "monthly_normal_low_and_high_temperatures" (
"city" text,
"jan" text,
"feb" text,
"mar" text,
"apr" text,
"jun" text,
"jul" text,
"aug" text,
"sep" text,
"oct" text,
"nov" text,
"dec" text
);
Question: Name the city with Feb of 66 °f / 18.9 °c
<|assistant|>
SELECT "city" FROM "monthly_normal_low_and_high_temperatures" WHERE "feb"='66 °f / 18.9 °c';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "monthly_normal_low_and_high_temperatures" (
"city" text,
"jan" text,
"feb" text,
"mar" text,
"apr" text,
"jun" text,
"jul" text,
"aug" text,
"sep" text,
"oct" text,
"nov" text,
"dec" text
);
Question: Name the city with september of 83 °f / 28.3 °c
<|assistant|>
SELECT "city" FROM "monthly_normal_low_and_high_temperatures" WHERE "sep"='83 °f / 28.3 °c';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "monthly_normal_low_and_high_temperatures" (
"city" text,
"jan" text,
"feb" text,
"mar" text,
"apr" text,
"jun" text,
"jul" text,
"aug" text,
"sep" text,
"oct" text,
"nov" text,
"dec" text
);
Question: Name the june when it has july of 84 °f / 28.9 °c
<|assistant|>
SELECT "jun" FROM "monthly_normal_low_and_high_temperatures" WHERE "jul"='84 °f / 28.9 °c';<|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,
"time" text,
"att" text,
"record" text
);
Question: What Time has Date of May 9?
<|assistant|>
SELECT "time" FROM "game_log" WHERE "date"='may 9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "western_bay_of_plenty_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the lowest roll number of Katikati college?
<|assistant|>
SELECT MIN("roll") FROM "western_bay_of_plenty_district" WHERE "name"='katikati college';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "western_bay_of_plenty_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the highest roll number of the school in Te puna with a decile larger than 2?
<|assistant|>
SELECT MAX("roll") FROM "western_bay_of_plenty_district" WHERE "decile">2 AND "area"='te puna';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "western_bay_of_plenty_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the roll number of Te Puke Intermediate, which has a decile of 4?
<|assistant|>
SELECT "roll" FROM "western_bay_of_plenty_district" WHERE "decile"=4 AND "name"='te puke intermediate';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "western_bay_of_plenty_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the highest roll number of the school with a state authority and a decile smaller than 8?
<|assistant|>
SELECT MAX("roll") FROM "western_bay_of_plenty_district" WHERE "authority"='state' AND "decile"<8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clausura_2004_standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What is the total value for Lost, when the value for Points is greater than 21, and when the value for Draw is 2?
<|assistant|>
SELECT SUM("lost") FROM "clausura_2004_standings" WHERE "points">21 AND "draw"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clausura_2004_standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What is the total number of Goals Scored, when the Team is San Salvador F.C., and when the Points are less than 10?
<|assistant|>
SELECT MAX("goals_scored") FROM "clausura_2004_standings" WHERE "team"='san salvador f.c.' AND "points"<10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clausura_2004_standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What are the total amount of Goals Conceded when the Points are less than 26, and when the value for Played is less than 18?
<|assistant|>
SELECT SUM("goals_conceded") FROM "clausura_2004_standings" WHERE "points"<26 AND "played"<18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clausura_2004_standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What is the average value for Lost, when the value for Goals Scored is greater than 20, and when the value for Played is less than 18?
<|assistant|>
SELECT AVG("lost") FROM "clausura_2004_standings" WHERE "goals_scored">20 AND "played"<18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
Question: What is score of the game played in place t8 with Byron Nelson playing?
<|assistant|>
SELECT "score" FROM "final_leaderboard" WHERE "place"='t8' AND "player"='byron nelson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
Question: What is the sum of Money of the game that was played in the United States with Sam Snead as a player?
<|assistant|>
SELECT SUM("money") FROM "final_leaderboard" WHERE "country"='united states' AND "player"='sam snead';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
Question: What is the Money ($) of the game with a score of 69-74-70-73=286?
<|assistant|>
SELECT MAX("money") FROM "final_leaderboard" WHERE "score"='69-74-70-73=286';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"young_rider_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: Name the mountains classification which has a young rider classification of francesco casagrande and integiro classification of not awarded with stage of 2
<|assistant|>
SELECT "mountains_classification" FROM "classification_leadership_by_stage" WHERE "young_rider_classification"='francesco casagrande' AND "intergiro_classification"='not awarded' AND "stage"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"young_rider_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: Name the winner for adriano baffi and integiro classification of ján svorada for stage of 13
<|assistant|>
SELECT "winner" FROM "classification_leadership_by_stage" WHERE "points_classification"='adriano baffi' AND "intergiro_classification"='ján svorada' AND "stage"='13';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"young_rider_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: Name trofeo fast team with young rider classification of francesco casagrande and stage of 10
<|assistant|>
SELECT "trofeo_fast_team" FROM "classification_leadership_by_stage" WHERE "young_rider_classification"='francesco casagrande' AND "stage"='10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualification" (
"rank" real,
"gymnast" text,
"difficulty_score" text,
"routine_score" real,
"total" real
);
Question: What is the sum of the total for a routine score of 26.6?
<|assistant|>
SELECT SUM("total") FROM "qualification" WHERE "routine_score"=26.6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_2009" (
"january" text,
"february" text,
"march" text,
"april" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the january when april is courtney rachel culkin
<|assistant|>
SELECT "january" FROM "2000_2009" WHERE "april"='courtney rachel culkin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_2009" (
"january" text,
"february" text,
"march" text,
"april" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the october when november is buffy tyler
<|assistant|>
SELECT "october" FROM "2000_2009" WHERE "november"='buffy tyler';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_2009" (
"january" text,
"february" text,
"march" text,
"april" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the october when the september is dalene kurtis
<|assistant|>
SELECT "october" FROM "2000_2009" WHERE "september"='dalene kurtis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_2009" (
"january" text,
"february" text,
"march" text,
"april" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the april for candice cassidy
<|assistant|>
SELECT "april" FROM "2000_2009" WHERE "june"='candice cassidy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_2009" (
"january" text,
"february" text,
"march" text,
"april" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the october for july of kimberley stanfield
<|assistant|>
SELECT "october" FROM "2000_2009" WHERE "july"='kimberley stanfield';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"representative" text,
"years" text,
"state" text,
"party" text,
"lifespan" text
);
Question: Which Representative was from Kentucky during the years of 1855–1859?
<|assistant|>
SELECT "representative" FROM "external_links" WHERE "state"='kentucky' AND "years"='1855–1859';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"representative" text,
"years" text,
"state" text,
"party" text,
"lifespan" text
);
Question: What was the lifespan of the Representative from the Republican Party during the years of 1953–1970?
<|assistant|>
SELECT "lifespan" FROM "external_links" WHERE "party"='republican' AND "years"='1953–1970';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"representative" text,
"years" text,
"state" text,
"party" text,
"lifespan" text
);
Question: What years did the Representative from Iowa with a lifespan of 1880–1942 serve?
<|assistant|>
SELECT "years" FROM "external_links" WHERE "state"='iowa' AND "lifespan"='1880–1942';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "external_links" (
"representative" text,
"years" text,
"state" text,
"party" text,
"lifespan" text
);
Question: Which Representative had a Lifespan of 1795–1866?
<|assistant|>
SELECT "representative" FROM "external_links" WHERE "lifespan"='1795–1866';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: When did the Chiefs have their first bye?
<|assistant|>
SELECT MIN("week") FROM "season_schedule" WHERE "attendance"='bye';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: What is the position played for the player drafted in round 2?
<|assistant|>
SELECT "position" FROM "january_draft" WHERE "round"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the name of the player that played position 3b?
<|assistant|>
SELECT "name" FROM "january_draft" WHERE "position"='3b';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the school for Ivey armstrong?
<|assistant|>
SELECT "school" FROM "january_draft" WHERE "name"='ivey armstrong';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january_draft" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: what is the position for the player from university of alabama?
<|assistant|>
SELECT "position" FROM "january_draft" WHERE "school"='university of alabama';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city_town" text,
"july_av_t" text,
"rain" text,
"days_with_rain_year_summer" text,
"days_with_frost" real,
"sunlight_hours" real
);
Question: How many days with frost were there in the City/Town of Lugo have?
<|assistant|>
SELECT SUM("days_with_frost") FROM "climate" WHERE "city_town"='lugo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city_town" text,
"july_av_t" text,
"rain" text,
"days_with_rain_year_summer" text,
"days_with_frost" real,
"sunlight_hours" real
);
Question: What is the lowest number of sunlight hours, and number of days with frost, more than 30, for the city of Ourense?
<|assistant|>
SELECT MIN("sunlight_hours") FROM "climate" WHERE "city_town"='ourense' AND "days_with_frost">30;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city_town" text,
"july_av_t" text,
"rain" text,
"days_with_rain_year_summer" text,
"days_with_frost" real,
"sunlight_hours" real
);
Question: What is the largest amount of sunlight hours for the City of Pontevedra?
<|assistant|>
SELECT MAX("sunlight_hours") FROM "climate" WHERE "city_town"='pontevedra';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: for the rank of 3 for the united states, what is the average lane?
<|assistant|>
SELECT AVG("lane") FROM "semifinal_2" WHERE "nationality"='united states' AND "rank"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: for the rank more than 1 and nationality of netherlands, what is the lane?
<|assistant|>
SELECT AVG("lane") FROM "semifinal_2" WHERE "nationality"='netherlands' AND "rank">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: for the time of 49.04 and lane less than 3, what is the nationality?
<|assistant|>
SELECT "nationality" FROM "semifinal_2" WHERE "lane"<3 AND "time"=49.04;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: for the rank of 8 and lane less than 3 what is the name?
<|assistant|>
SELECT "name" FROM "semifinal_2" WHERE "lane"<3 AND "rank"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_2008_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What play has a loss of 2?
<|assistant|>
SELECT "played" FROM "2007_2008_table" WHERE "lost"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_2008_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What try bonus has a club of caerphilly rfc?
<|assistant|>
SELECT "try_bonus" FROM "2007_2008_table" WHERE "club"='caerphilly rfc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_2008_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What club has a play of 22, and losing bonus of 7?
<|assistant|>
SELECT "club" FROM "2007_2008_table" WHERE "played"='22' AND "losing_bonus"='7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_2008_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What point against has tries against of 77, and a lost of 16?
<|assistant|>
SELECT "points_against" FROM "2007_2008_table" WHERE "tries_against"='77' AND "lost"='16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"began_play" text,
"league" text,
"venue" text
);
Question: The nll participate in what sport?
<|assistant|>
SELECT "sport" FROM "professional_sports" WHERE "league"='nll';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"began_play" text,
"league" text,
"venue" text
);
Question: When did the Club of western new york flash begin to play?
<|assistant|>
SELECT "began_play" FROM "professional_sports" WHERE "club"='western new york flash';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"began_play" text,
"league" text,
"venue" text
);
Question: Which club plays soccer in the nwsl?
<|assistant|>
SELECT "club" FROM "professional_sports" WHERE "sport"='soccer' AND "league"='nwsl';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"began_play" text,
"league" text,
"venue" text
);
Question: When did the Rochester Rhinos begin to play?
<|assistant|>
SELECT "began_play" FROM "professional_sports" WHERE "club"='rochester rhinos';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "podiums_on_all_three_grands_tours" (
"name" text,
"tour" real,
"giro" real,
"vuelta" real,
"total" real
);
Question: The sun of total that has a tour of 7 and a Giro smaller than 3 is 12.
<|assistant|>
SELECT SUM("total") FROM "podiums_on_all_three_grands_tours" WHERE "tour"=7 AND "giro"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rotorua_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" text
);
Question: What genders did Lynmore Primary School take?
<|assistant|>
SELECT "gender" FROM "rotorua_district" WHERE "name"='lynmore primary school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rotorua_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" text
);
Question: Which area served coed genders at Kaharoa school and had a Decile of 9?
<|assistant|>
SELECT "area" FROM "rotorua_district" WHERE "gender"='coed' AND "decile"='9' AND "name"='kaharoa school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "lower_hutt_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What was the gender for the integrated authority with a roll of 142?
<|assistant|>
SELECT "gender" FROM "lower_hutt_city" WHERE "authority"='integrated' AND "roll"=142;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "lower_hutt_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What was the Authority for Avalon School with a roll less than 358?
<|assistant|>
SELECT "authority" FROM "lower_hutt_city" WHERE "area"='avalon' AND "roll"<358 AND "name"='avalon school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "lower_hutt_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: Who is the authority for the coed Eastbourne school?
<|assistant|>
SELECT "authority" FROM "lower_hutt_city" WHERE "area"='eastbourne' AND "gender"='coed';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.