text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"nominated_work" text,
"category" text,
"result" text
);
Question: What category has showest award for the category awards?
<|assistant|>
SELECT "category" FROM "awards_and_nominations" WHERE "award"='showest award';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"nominated_work" text,
"category" text,
"result" text
);
Question: What category has a year after 2004?
<|assistant|>
SELECT "category" FROM "awards_and_nominations" WHERE "year">2004;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5_2_3" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Opponent had a Score of 6-3, 6-2?
<|assistant|>
SELECT "opponent" FROM "singles_5_2_3" WHERE "score"='6-3, 6-2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5_2_3" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Score had an Opponent of chris evert-lloyd?
<|assistant|>
SELECT "score" FROM "singles_5_2_3" WHERE "opponent"='chris evert-lloyd';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5_2_3" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Surface had an Opponent of chris evert-lloyd?
<|assistant|>
SELECT "surface" FROM "singles_5_2_3" WHERE "opponent"='chris evert-lloyd';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5_2_3" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Surface had a Date of june 13, 1983?
<|assistant|>
SELECT "surface" FROM "singles_5_2_3" WHERE "date"='june 13, 1983';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text,
"report" text
);
Question: What was the highest attendance for a game where Geelong was the home team?
<|assistant|>
SELECT MAX("crowd") FROM "round_21" WHERE "home_team"='geelong';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text,
"report" text
);
Question: What was the away team score when the home team was the Brisbane Lions?
<|assistant|>
SELECT "away_team_score" FROM "round_21" WHERE "home_team"='brisbane lions';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text,
"report" text
);
Question: When did the home team score 23.13 (151)?
<|assistant|>
SELECT "date" FROM "round_21" WHERE "home_team_score"='23.13 (151)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"ground" text,
"crowd" real,
"date" text,
"report" text
);
Question: What was the largest attendance at the Telstra Dome, when the home team was the Western Bulldogs?
<|assistant|>
SELECT MAX("crowd") FROM "round_21" WHERE "ground"='telstra dome' AND "home_team"='western bulldogs';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_final_statistics" (
"rank" real,
"airport" text,
"code_iata_icao" text,
"total_cargo_metric_tonnes" real,
"pct_change" text
);
Question: What is the full amount of Total Cargo (in Metric Tonnes) where the Code (IATA/ICAO) is pvg/zspd, and the rank is less than 3?
<|assistant|>
SELECT SUM("total_cargo_metric_tonnes") FROM "2010_final_statistics" WHERE "code_iata_icao"='pvg/zspd' AND "rank"<3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"opponentnum" text,
"site" text,
"result" text,
"attendance" text
);
Question: What is the Date at memorial stadium β’ minneapolis, mn with an Attendance of 20,000, and a Result of w52-0?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "site"='memorial stadium β’ minneapolis, mn' AND "attendance"='20,000' AND "result"='w52-0';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"opponentnum" text,
"site" text,
"result" text,
"attendance" text
);
Question: What is the Opponent name at memorial stadium β’ minneapolis, mn on 10/20/1928?
<|assistant|>
SELECT "opponentnum" FROM "schedule" WHERE "site"='memorial stadium β’ minneapolis, mn' AND "date"='10/20/1928';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"opponentnum" text,
"site" text,
"result" text,
"attendance" text
);
Question: What is the Attendance number when the Opponent was purdue?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "opponentnum"='purdue';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"opponentnum" text,
"site" text,
"result" text,
"attendance" text
);
Question: What is the Site when the Result was w52-0?
<|assistant|>
SELECT "site" FROM "schedule" WHERE "result"='w52-0';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"opponentnum" text,
"site" text,
"result" text,
"attendance" text
);
Question: What is the Attendance on 11/10/1928?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "date"='11/10/1928';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"winner" text,
"score" text,
"date" text,
"venue" text,
"crowd" real
);
Question: Who was the Winner at Campbelltown Sports Stadium?
<|assistant|>
SELECT "winner" FROM "results" WHERE "venue"='campbelltown sports stadium';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"winner" text,
"score" text,
"date" text,
"venue" text,
"crowd" real
);
Question: When Sydney Roosters won with a Crown of more than 7,426, what was the Venue?
<|assistant|>
SELECT "venue" FROM "results" WHERE "winner"='sydney roosters' AND "crowd">'7,426';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_and_draw_dates" (
"phase" text,
"round" text,
"draw_date" text,
"first_leg" text,
"second_leg" text
);
Question: What was the second leg score from the group stage on matchday 5?
<|assistant|>
SELECT "second_leg" FROM "round_and_draw_dates" WHERE "phase"='group stage' AND "round"='matchday 5';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_and_draw_dates" (
"phase" text,
"round" text,
"draw_date" text,
"first_leg" text,
"second_leg" text
);
Question: What was the draw date from the qualifying phase and a round of first qualifying round?
<|assistant|>
SELECT "draw_date" FROM "round_and_draw_dates" WHERE "phase"='qualifying' AND "round"='first qualifying round';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"statue" text,
"liberator" text,
"country" text,
"year_erected" text,
"artist" text
);
Question: what year did enrique alciati make a statue
<|assistant|>
SELECT "year_erected" FROM "see_also" WHERE "artist"='enrique alciati';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"statue" text,
"liberator" text,
"country" text,
"year_erected" text,
"artist" text
);
Question: what artist cam from uruguay
<|assistant|>
SELECT "artist" FROM "see_also" WHERE "country"='uruguay';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "urban_population_growth_pct" (
"region_country" text,
"1985_1990" real,
"1990_1995" real,
"1995_2000" real,
"2000_2005" real
);
Question: When 1990-1995 > 0.37, 2000-2005 of 1.37, what's the highest for 1995-2000?
<|assistant|>
SELECT MAX("1995_2000") FROM "urban_population_growth_pct" WHERE "1990_1995">0.37 AND "2000_2005"=1.37;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "urban_population_growth_pct" (
"region_country" text,
"1985_1990" real,
"1990_1995" real,
"1995_2000" real,
"2000_2005" real
);
Question: When 2000-2005 is smaller than 2.52, and 1990-1995 is less than 0.37, what's the total of 1995-2000?
<|assistant|>
SELECT SUM("1995_2000") FROM "urban_population_growth_pct" WHERE "2000_2005"<2.52 AND "1990_1995"<0.37;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "urban_population_growth_pct" (
"region_country" text,
"1985_1990" real,
"1990_1995" real,
"1995_2000" real,
"2000_2005" real
);
Question: What's China's highest 1985-1990 assuming a 2000-2005 larger than 3.08?
<|assistant|>
SELECT MAX("1985_1990") FROM "urban_population_growth_pct" WHERE "region_country"='china' AND "2000_2005">3.08;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: What is the women's singles before 1965 with kaj lindfors ann-louise von essen being mixed doubles?
<|assistant|>
SELECT "women_s_singles" FROM "past_winners" WHERE "year"<1965 AND "mixed_doubles"='kaj lindfors ann-louise von essen';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: When did mika heinonen susanna dahlberg win mixed doubles?
<|assistant|>
SELECT AVG("year") FROM "past_winners" WHERE "mixed_doubles"='mika heinonen susanna dahlberg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: How many years did pia pajunen nina sundberg win women's doubles?
<|assistant|>
SELECT COUNT("year") FROM "past_winners" WHERE "women_s_doubles"='pia pajunen nina sundberg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who won women's singles in 1961?
<|assistant|>
SELECT "women_s_singles" FROM "past_winners" WHERE "year"=1961;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marc_zwiebler" (
"outcome" text,
"year" text,
"venue" text,
"last_opponent" text,
"score" text
);
Question: Score of 0β3 (11β21, 14β21) had what outcome?
<|assistant|>
SELECT "outcome" FROM "marc_zwiebler" WHERE "score"='0β3 (11β21, 14β21)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marc_zwiebler" (
"outcome" text,
"year" text,
"venue" text,
"last_opponent" text,
"score" text
);
Question: Venue of thessaloniki (without participation) had what score?
<|assistant|>
SELECT "score" FROM "marc_zwiebler" WHERE "venue"='thessaloniki (without participation)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marc_zwiebler" (
"outcome" text,
"year" text,
"venue" text,
"last_opponent" text,
"score" text
);
Question: Outcome of 13, and a Year of 2007 happened in what venue?
<|assistant|>
SELECT "venue" FROM "marc_zwiebler" WHERE "outcome"='13' AND "year"='2007';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_i_comparison_of_selected_volcanic_" (
"eruptions" text,
"country" text,
"location" text,
"year" real,
"volcanic_explosivity_index" text,
"fatalities" text
);
Question: Which Eruptions have a Location of pacific ring of fire, and a Volcanic Explosivity Index of 6, and a Country of peru?
<|assistant|>
SELECT "eruptions" FROM "table_i_comparison_of_selected_volcanic_" WHERE "location"='pacific ring of fire' AND "volcanic_explosivity_index"='6' AND "country"='peru';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_i_comparison_of_selected_volcanic_" (
"eruptions" text,
"country" text,
"location" text,
"year" real,
"volcanic_explosivity_index" text,
"fatalities" text
);
Question: How many fatalities does Italy have?
<|assistant|>
SELECT "fatalities" FROM "table_i_comparison_of_selected_volcanic_" WHERE "country"='italy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_i_comparison_of_selected_volcanic_" (
"eruptions" text,
"country" text,
"location" text,
"year" real,
"volcanic_explosivity_index" text,
"fatalities" text
);
Question: How many years have a Location of pacific ring of fire, and Eruptions of pinatubo?
<|assistant|>
SELECT SUM("year") FROM "table_i_comparison_of_selected_volcanic_" WHERE "location"='pacific ring of fire' AND "eruptions"='pinatubo';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "3_liga" (
"season" text,
"champions" text,
"runners_up" text,
"promotion_playoff" text,
"standings" text
);
Question: What is the Standings of Eintracht Braunschweig?
<|assistant|>
SELECT "standings" FROM "3_liga" WHERE "champions"='eintracht braunschweig';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
Question: Year larger than 2001 has what average points?
<|assistant|>
SELECT AVG("points") FROM "grand_prix_career_statistics" WHERE "year">2001;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
Question: Team of Honda and a point total of 238 is what highest year?
<|assistant|>
SELECT MAX("year") FROM "grand_prix_career_statistics" WHERE "team"='honda' AND "points"=238;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_prix_career_statistics" (
"year" real,
"class" text,
"team" text,
"machine" text,
"points" real,
"rank" text,
"wins" real
);
Question: Wins of 0 involves what team?
<|assistant|>
SELECT "team" FROM "grand_prix_career_statistics" WHERE "wins"=0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
Question: what player has a pick of 5
<|assistant|>
SELECT "player" FROM "round_1" WHERE "pick"=5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text
);
Question: Which District has a First elected of 1858, and a Result of retired republican gain, and an Incumbent of william millward?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1858 AND "result"='retired republican gain' AND "incumbent"='william millward';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text
);
Question: Which Result has a District of pennsylvania 13?
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='pennsylvania 13';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text
);
Question: Which First elected is the lowest one that has an Incumbent of william stewart?
<|assistant|>
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='william stewart';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
Question: Who was the Player when College/Junior/Club Team (League) was regina pats (whl)?
<|assistant|>
SELECT "player" FROM "draft_picks" WHERE "college_junior_club_team_league"='regina pats (whl)';<|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,
"record" text,
"game_site" text,
"attendance" real
);
Question: What is the date of the game with an attendance larger than 62,491?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "attendance">'62,491';<|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,
"record" text,
"game_site" text,
"attendance" real
);
Question: What is the attendance of the game on week 4?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "week"=4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rose_bowl_michigan_49_stanford_0" (
"player" text,
"touchdowns" real,
"extra_points" real,
"field_goals" real,
"points" real
);
Question: How many extra points are there that Herrnstein had with less than 2 touchdowns and less than 0 field goals?
<|assistant|>
SELECT AVG("extra_points") FROM "rose_bowl_michigan_49_stanford_0" WHERE "touchdowns"<2 AND "player"='herrnstein' AND "field_goals"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rose_bowl_michigan_49_stanford_0" (
"player" text,
"touchdowns" real,
"extra_points" real,
"field_goals" real,
"points" real
);
Question: How many touchdowns are there that has field goals less than 0 and 0 extra points?
<|assistant|>
SELECT SUM("touchdowns") FROM "rose_bowl_michigan_49_stanford_0" WHERE "extra_points"=0 AND "field_goals"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rose_bowl_michigan_49_stanford_0" (
"player" text,
"touchdowns" real,
"extra_points" real,
"field_goals" real,
"points" real
);
Question: How many field goals are there that have 8 touchdowns and more than 49 points?
<|assistant|>
SELECT SUM("field_goals") FROM "rose_bowl_michigan_49_stanford_0" WHERE "touchdowns"=8 AND "points">49;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rose_bowl_michigan_49_stanford_0" (
"player" text,
"touchdowns" real,
"extra_points" real,
"field_goals" real,
"points" real
);
Question: What's the number of touchdowns that Snow made that had 0 field goals, more than 5 points, and more than 0 extra points?
<|assistant|>
SELECT MIN("touchdowns") FROM "rose_bowl_michigan_49_stanford_0" WHERE "points">5 AND "field_goals"=0 AND "player"='snow' AND "extra_points">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: For an IATA of MLE, what is the ICAO?
<|assistant|>
SELECT "icao" FROM "destinations" WHERE "iata"='mle';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: For an ICAO of VCCT, what is the IATA?
<|assistant|>
SELECT "iata" FROM "destinations" WHERE "icao"='vcct';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which city has an ICAO of VCCJ?
<|assistant|>
SELECT "city" FROM "destinations" WHERE "icao"='vccj';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which ICAO is found in Vavuniya?
<|assistant|>
SELECT "icao" FROM "destinations" WHERE "city"='vavuniya';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which country has Weerawila Airport?
<|assistant|>
SELECT "country" FROM "destinations" WHERE "airport"='weerawila airport';<|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 april 1 as the date?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "date"='april 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: What opponent has tomko (1-1) as a loss?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='tomko (1-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: What opponent has 8-10 as the record?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='8-10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individual_chemistry" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text
);
Question: Whcih was the Class AAA in school year 2006-07?
<|assistant|>
SELECT "class_aaa" FROM "individual_chemistry" WHERE "school_year"='2006-07';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individual_chemistry" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text
);
Question: What team was class AA in years 1994-95?
<|assistant|>
SELECT "class_aa" FROM "individual_chemistry" WHERE "school_year"='1994-95';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individual_chemistry" (
"school_year" text,
"class_a" text,
"class_aa" text,
"class_aaa" text,
"class_aaaa" text
);
Question: Who was Class AA in School Year 1994-95?
<|assistant|>
SELECT "class_aa" FROM "individual_chemistry" WHERE "school_year"='1994-95';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"record" text
);
Question: What's the date of the game that has the Bulls as a visiting team?
<|assistant|>
SELECT "date" FROM "march" WHERE "visitor"='bulls';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"february" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: What is the average game number that took place after February 13 against the Toronto Maple Leafs and more than 47 points were scored?
<|assistant|>
SELECT AVG("game") FROM "regular_season" WHERE "february">13 AND "opponent"='toronto maple leafs' AND "points">47;<|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,
"record" text,
"game_site" text,
"attendance" real
);
Question: Who was the opponent at the game at Sullivan Stadium before week 11?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week"<11 AND "game_site"='sullivan stadium';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_coaches_and_all_time_results" (
"name" text,
"years" text,
"seasons" real,
"lost" real,
"pct" real
);
Question: What is the years coached by the person with a win percentage of 0.667 and 380 losses?
<|assistant|>
SELECT "years" FROM "head_coaches_and_all_time_results" WHERE "pct"=0.667 AND "lost"=380;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_coaches_and_all_time_results" (
"name" text,
"years" text,
"seasons" real,
"lost" real,
"pct" real
);
Question: What is the average percent for the coach from 1905 and more than 7 losses?
<|assistant|>
SELECT AVG("pct") FROM "head_coaches_and_all_time_results" WHERE "years"='1905' AND "lost">7;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_coaches_and_all_time_results" (
"name" text,
"years" text,
"seasons" real,
"lost" real,
"pct" real
);
Question: How many percentages have 20 losses and more than 1 season?
<|assistant|>
SELECT COUNT("pct") FROM "head_coaches_and_all_time_results" WHERE "lost"=20 AND "seasons">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" text,
"record" text
);
Question: What home has February 10 as the date?
<|assistant|>
SELECT "home" FROM "regular_season" WHERE "date"='february 10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" text,
"record" text
);
Question: What date has ny islanders as the visitor?
<|assistant|>
SELECT "date" FROM "regular_season" WHERE "visitor"='ny islanders';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" text,
"record" text
);
Question: What score has February 10 as the date?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "date"='february 10';<|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: Name the course for 24 july
<|assistant|>
SELECT "course" FROM "stage_results" WHERE "date"='24 july';<|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: Name the course for team time trial
<|assistant|>
SELECT "course" FROM "stage_results" WHERE "type"='team time trial';<|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: Name the winner for rest day for 13 july
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "course"='rest day' AND "date"='13 july';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "elimination_chamber_entrances_and_elimin" (
"elimination_no" text,
"wrestler" text,
"entered" real,
"eliminated_by" text,
"time" text
);
Question: Shawn Michaels entered the elimination chamber in what position?
<|assistant|>
SELECT SUM("entered") FROM "elimination_chamber_entrances_and_elimin" WHERE "wrestler"='shawn michaels';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "elimination_chamber_entrances_and_elimin" (
"elimination_no" text,
"wrestler" text,
"entered" real,
"eliminated_by" text,
"time" text
);
Question: Who Eliminated Kurt Angle?
<|assistant|>
SELECT "eliminated_by" FROM "elimination_chamber_entrances_and_elimin" WHERE "wrestler"='kurt angle';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "elimination_chamber_entrances_and_elimin" (
"elimination_no" text,
"wrestler" text,
"entered" real,
"eliminated_by" text,
"time" text
);
Question: Who Eliminated Kane?
<|assistant|>
SELECT "eliminated_by" FROM "elimination_chamber_entrances_and_elimin" WHERE "wrestler"='kane';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the sum of all gold medals for Algeria when total medals is less than 3?
<|assistant|>
SELECT SUM("gold") FROM "medal_table" WHERE "nation"='algeria' AND "total"<3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "major_urban_areas" (
"urban_area" text,
"country" text,
"region" text,
"population" real,
"globalization_index" text
);
Question: what is the population of Valencia, Spain?
<|assistant|>
SELECT AVG("population") FROM "major_urban_areas" WHERE "country"='spain' AND "urban_area"='valencia';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_feet_m" text,
"floors" real,
"year" real
);
Question: which year holds rank 2?
<|assistant|>
SELECT MAX("year") FROM "tallest_buildings" WHERE "rank"='2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_feet_m" text,
"floors" real,
"year" real
);
Question: with name meridian condominiums what is number of floors?
<|assistant|>
SELECT AVG("floors") FROM "tallest_buildings" WHERE "name"='meridian condominiums';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_feet_m" text,
"floors" real,
"year" real
);
Question: with rank of 31 what is the year?
<|assistant|>
SELECT COUNT("year") FROM "tallest_buildings" WHERE "rank"='31';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What was the date of the match against the visiting team, Toronto?
<|assistant|>
SELECT "date" FROM "january" WHERE "visitor"='toronto';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: Who played the home team during the game on January 6?
<|assistant|>
SELECT "home" FROM "january" WHERE "date"='january 6';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What was the cougars record during the game where Boston were the visitors?
<|assistant|>
SELECT "record" FROM "january" WHERE "visitor"='boston';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_2" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What's the lowest Drawn that has a Lost that's less than 0?
<|assistant|>
SELECT MIN("drawn") FROM "group_2" WHERE "lost"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_2" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What's the total Lost with Games that's less than 4?
<|assistant|>
SELECT SUM("lost") FROM "group_2" WHERE "games"<4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_2" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What's the total of Games with a Lost that's larger than 2, and has Points that's smaller than 0?
<|assistant|>
SELECT SUM("games") FROM "group_2" WHERE "lost">2 AND "points"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_2" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What's the Lost average that has a Drawn less than 0?
<|assistant|>
SELECT AVG("lost") FROM "group_2" WHERE "drawn"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: What record has @ ottawa senators as the opponent?
<|assistant|>
SELECT "record" FROM "regular_season" WHERE "opponent"='@ ottawa senators';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: What game has 28 points, and tampa bay lightning as the opponent?
<|assistant|>
SELECT "game" FROM "regular_season" WHERE "points"=28 AND "opponent"='tampa bay lightning';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: What is the average points that have a December less than 6, with a game greater than 26?
<|assistant|>
SELECT AVG("points") FROM "regular_season" WHERE "december"<6 AND "game">26;<|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,
"series" text
);
Question: Who was the opponent at the game with a loss of Sele (0-1)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='sele (0-1)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: Record of 42β16β8, and a March larger than 5 has what average points?
<|assistant|>
SELECT AVG("points") FROM "regular_season" WHERE "record"='42β16β8' AND "march">5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: Points smaller than 96, and a Record of 43β16β8 belongs to what game?
<|assistant|>
SELECT "game" FROM "regular_season" WHERE "points"<96 AND "record"='43β16β8';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: Game smaller than 70, and a Record of 43β16β8 is what opponent?
<|assistant|>
SELECT "opponent" FROM "regular_season" WHERE "game"<70 AND "record"='43β16β8';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: Record of 44β18β8 involves which score?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "record"='44β18β8';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"college" text
);
Question: Which college is Kellen Davis from?
<|assistant|>
SELECT "college" FROM "nfl_draft" WHERE "player"='kellen davis';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"college" text
);
Question: Which round's position is according to official website?
<|assistant|>
SELECT "round" FROM "nfl_draft" WHERE "position"='according to official website';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"college" text
);
Question: Which position's round was 3 when pick was 70?
<|assistant|>
SELECT "position" FROM "nfl_draft" WHERE "round"='3' AND "pick"='70';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"college" text
);
Question: Which pick's round was 5 when Kellen Davis was a player?
<|assistant|>
SELECT "pick" FROM "nfl_draft" WHERE "round"='5' AND "player"='kellen davis';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.