text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "petrol_engines" (
"model" text,
"years" text,
"engine_code" text,
"power" text,
"torque" text
);
Question: What is the engine code for the Xdrive25i?
<|assistant|>
SELECT "engine_code" FROM "petrol_engines" WHERE "model"='xdrive25i';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "petrol_engines" (
"model" text,
"years" text,
"engine_code" text,
"power" text,
"torque" text
);
Question: What is the torque on the model with power of hp (kw; ps)@5800?
<|assistant|>
SELECT "torque" FROM "petrol_engines" WHERE "power"='hp (kw; ps)@5800';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "petrol_engines" (
"model" text,
"years" text,
"engine_code" text,
"power" text,
"torque" text
);
Question: What is the torque when engine code is N46B20 and power is ps (kw; hp)@6400?
<|assistant|>
SELECT "torque" FROM "petrol_engines" WHERE "engine_code"='n46b20' AND "power"='ps (kw; hp)@6400';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "petrol_engines" (
"model" text,
"years" text,
"engine_code" text,
"power" text,
"torque" text
);
Question: What is the power for the model xdrive28i sdrive28i?
<|assistant|>
SELECT "power" FROM "petrol_engines" WHERE "model"='xdrive28i sdrive28i';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "petrol_engines" (
"model" text,
"years" text,
"engine_code" text,
"power" text,
"torque" text
);
Question: What is the model that was made in the years 2011 2012-?
<|assistant|>
SELECT "model" FROM "petrol_engines" WHERE "years"='2011 2012-';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "petrol_engines" (
"model" text,
"years" text,
"engine_code" text,
"power" text,
"torque" text
);
Question: What is the engine code for the model xdrive35i?
<|assistant|>
SELECT "engine_code" FROM "petrol_engines" WHERE "model"='xdrive35i';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_school_boys" (
"time" text,
"athlete" text,
"school" text,
"city" text,
"date" text
);
Question: What is the Athlete from Burbank High School?
<|assistant|>
SELECT "athlete" FROM "high_school_boys" WHERE "school"='burbank high school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_school_boys" (
"time" text,
"athlete" text,
"school" text,
"city" text,
"date" text
);
Question: What is the Date of the Athlete from Ferris High School?
<|assistant|>
SELECT "date" FROM "high_school_boys" WHERE "school"='ferris high school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_school_boys" (
"time" text,
"athlete" text,
"school" text,
"city" text,
"date" text
);
Question: What is the Athlete from Riverbank, California?
<|assistant|>
SELECT "athlete" FROM "high_school_boys" WHERE "city"='riverbank, california';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_school_boys" (
"time" text,
"athlete" text,
"school" text,
"city" text,
"date" text
);
Question: What is the Date of the Player from Marshfield High School?
<|assistant|>
SELECT "date" FROM "high_school_boys" WHERE "school"='marshfield high school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_school_boys" (
"time" text,
"athlete" text,
"school" text,
"city" text,
"date" text
);
Question: What is the School of the Player with a Date of June 4, 2011?
<|assistant|>
SELECT "school" FROM "high_school_boys" WHERE "date"='june 4, 2011';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_spring_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: What episodes was the show クロサギ shown on TBS?
<|assistant|>
SELECT "episodes" FROM "2006_spring_season" WHERE "tv_station"='tbs' AND "japanese_title"='クロサギ';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_spring_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: What is the Romanji Title of a show on TBS with less than 11 episodes?
<|assistant|>
SELECT "romaji_title" FROM "2006_spring_season" WHERE "tv_station"='tbs' AND "episodes"<11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_spring_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: What is the total number of episodes for クロサギ?
<|assistant|>
SELECT COUNT("episodes") FROM "2006_spring_season" WHERE "japanese_title"='クロサギ';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_spring_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: What are the average ratings for プリマダム?
<|assistant|>
SELECT "average_ratings" FROM "2006_spring_season" WHERE "japanese_title"='プリマダム';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "senior_career" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real
);
Question: Which Score-Final has a Rank-Final of 2, and a Year smaller than 2008?
<|assistant|>
SELECT SUM("score_final") FROM "senior_career" WHERE "rank_final"=2 AND "year"<2008;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "senior_career" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real
);
Question: How many years have a Rank-Final smaller than 7, and a Competition Description of olympic games, and a Score-Final smaller than 186.525?
<|assistant|>
SELECT SUM("year") FROM "senior_career" WHERE "rank_final"<7 AND "competition_description"='olympic games' AND "score_final"<186.525;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "senior_career" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real
);
Question: Which Score-Final has an Apparatus of floor exercise?
<|assistant|>
SELECT MAX("score_final") FROM "senior_career" WHERE "apparatus"='floor exercise';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "senior_career" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real
);
Question: Which Year is the first one that has an Apparatus of uneven bars, and a Rank-Final smaller than 3?
<|assistant|>
SELECT MIN("year") FROM "senior_career" WHERE "apparatus"='uneven bars' AND "rank_final"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: Which district has more than 169,359 2009 electorates and a constituency of 84?
<|assistant|>
SELECT "district" FROM "assembly_segments" WHERE "number_of_electorates_2009">'169,359' AND "constituency_number"='84';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: Who has a constituency of 84?
<|assistant|>
SELECT "name" FROM "assembly_segments" WHERE "constituency_number"='84';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What the round with the time 1:15?
<|assistant|>
SELECT AVG("round") FROM "mixed_martial_arts_record" WHERE "time"='1:15';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What's the location when the opponent was Lyoto Machida?
<|assistant|>
SELECT "location" FROM "mixed_martial_arts_record" WHERE "opponent"='lyoto machida';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_women_s_doubles_performance_t" (
"tournament" text,
"2007" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2007 result when the 2010 result was 2r, at the US Open?
<|assistant|>
SELECT "2007" FROM "grand_slam_women_s_doubles_performance_t" WHERE "2010"='2r' AND "tournament"='us open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "uneven_bars_ef_qualifiers" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the A score for the person with a total less than 15.95, position less than 7, and B score more than 8.225?
<|assistant|>
SELECT MAX("a_score") FROM "uneven_bars_ef_qualifiers" WHERE "total"<15.95 AND "position"<7 AND "b_score">8.225;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "uneven_bars_ef_qualifiers" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the B score for the person with a total of 16.325 and an A score of more than 7.3?
<|assistant|>
SELECT AVG("b_score") FROM "uneven_bars_ef_qualifiers" WHERE "total"=16.325 AND "a_score">7.3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "uneven_bars_ef_qualifiers" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the Position of the person with a total less than 16.65 and an A score of 7.4?
<|assistant|>
SELECT MIN("position") FROM "uneven_bars_ef_qualifiers" WHERE "total"<16.65 AND "a_score"=7.4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "station_repeaters" (
"callsign" text,
"network" text,
"city_of_license" text,
"d_erp" text,
"owner_operator" text
);
Question: What's the network in Pachuca, Hidalgo?
<|assistant|>
SELECT "network" FROM "station_repeaters" WHERE "city_of_license"='pachuca, hidalgo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "station_repeaters" (
"callsign" text,
"network" text,
"city_of_license" text,
"d_erp" text,
"owner_operator" text
);
Question: What's the network that has a callsign of XHTM and a D ERP of •?
<|assistant|>
SELECT "network" FROM "station_repeaters" WHERE "d_erp"='•' AND "callsign"='xhtm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "station_repeaters" (
"callsign" text,
"network" text,
"city_of_license" text,
"d_erp" text,
"owner_operator" text
);
Question: What's the city of license having a D ERP of 100kw?
<|assistant|>
SELECT "city_of_license" FROM "station_repeaters" WHERE "d_erp"='100kw';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "station_repeaters" (
"callsign" text,
"network" text,
"city_of_license" text,
"d_erp" text,
"owner_operator" text
);
Question: What's the D ERP in San Martin Texmelucan, Puebla?
<|assistant|>
SELECT "d_erp" FROM "station_repeaters" WHERE "city_of_license"='san martin texmelucan, puebla';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: What district has 98 constituencies?
<|assistant|>
SELECT "district" FROM "assembly_segments" WHERE "constituency_number"='98';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "canterbury_bankstown_bulldogs" (
"year" text,
"matches" real,
"tries" real,
"goals" real,
"points" real
);
Question: What are the highest points with 2012 as the year?
<|assistant|>
SELECT MAX("points") FROM "canterbury_bankstown_bulldogs" WHERE "year"='2012';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "canterbury_bankstown_bulldogs" (
"year" text,
"matches" real,
"tries" real,
"goals" real,
"points" real
);
Question: What are the highest matches that have points less than 88, and goals less than 0?
<|assistant|>
SELECT MAX("matches") FROM "canterbury_bankstown_bulldogs" WHERE "points"<88 AND "goals"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "canterbury_bankstown_bulldogs" (
"year" text,
"matches" real,
"tries" real,
"goals" real,
"points" real
);
Question: How many tries have goals greater than 0?
<|assistant|>
SELECT SUM("tries") FROM "canterbury_bankstown_bulldogs" WHERE "goals">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "canterbury_bankstown_bulldogs" (
"year" text,
"matches" real,
"tries" real,
"goals" real,
"points" real
);
Question: What are the lowest points with 2013 as the year, and goals less than 0?
<|assistant|>
SELECT MIN("points") FROM "canterbury_bankstown_bulldogs" WHERE "year"='2013' AND "goals"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "canterbury_bankstown_bulldogs" (
"year" text,
"matches" real,
"tries" real,
"goals" real,
"points" real
);
Question: How many goals have 28 as the points, and matches greater than 11?
<|assistant|>
SELECT COUNT("goals") FROM "canterbury_bankstown_bulldogs" WHERE "points"=28 AND "matches">11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Which Laps have a Rider of russell holland, and a Grid smaller than 10?
<|assistant|>
SELECT MAX("laps") FROM "supersport_race_classification" WHERE "rider"='russell holland' AND "grid"<10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Which Laps have a Bike of kawasaki zx-6r, and a Time of +26.891?
<|assistant|>
SELECT MIN("laps") FROM "supersport_race_classification" WHERE "bike"='kawasaki zx-6r' AND "time"='+26.891';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Which Rider has a Time of retirement, and a Grid larger than 5?
<|assistant|>
SELECT "rider" FROM "supersport_race_classification" WHERE "time"='retirement' AND "grid">5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supersport_race_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Which Rider has less than 18 laps, and a Grid of 24?
<|assistant|>
SELECT "rider" FROM "supersport_race_classification" WHERE "laps"<18 AND "grid"=24;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_cup" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"round" text
);
Question: What is the date of the 2nd round 2nd leg?
<|assistant|>
SELECT "date" FROM "league_cup" WHERE "round"='2nd round 2nd leg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_cup" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"round" text
);
Question: What is the Round against Gillingham with an Against smaller than 3?
<|assistant|>
SELECT "round" FROM "league_cup" WHERE "opposing_team"='gillingham' AND "against"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What's the draw that's played less than 36 and has 42 points?
<|assistant|>
SELECT AVG("draw") FROM "relegation_table" WHERE "points"=42 AND "played"<36;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What the lost that has less than 10 points and less than 38 goals scored?
<|assistant|>
SELECT SUM("lost") FROM "relegation_table" WHERE "goals_scored"<38 AND "points"<10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: what the most lost for Alianza with a draw less than 6?
<|assistant|>
SELECT MAX("lost") FROM "relegation_table" WHERE "team"='alianza' AND "draw"<6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: What the lost in place less than 3 and having more than 63 goals scored?
<|assistant|>
SELECT SUM("lost") FROM "relegation_table" WHERE "goals_scored">63 AND "place"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "member_states" (
"state" text,
"adopted" text,
"population_2011_01_01" text,
"nominal_gdp_world_bank_2009_million_usd" real,
"relative_gdp_of_total_nominal" text,
"gdp_per_capita_world_bank_2009_nominal_usd" real
);
Question: What State has an Adopted of 1999-01-01, a GDP per capita World Bank, 2009 nominal (USD) that's smaller than 34849, along with a Nominal GDP World Bank, 2009 (million USD) that's smaller than 1460250?
<|assistant|>
SELECT "state" FROM "member_states" WHERE "adopted"='1999-01-01' AND "gdp_per_capita_world_bank_2009_nominal_usd"<34849 AND "nominal_gdp_world_bank_2009_million_usd"<1460250;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "member_states" (
"state" text,
"adopted" text,
"population_2011_01_01" text,
"nominal_gdp_world_bank_2009_million_usd" real,
"relative_gdp_of_total_nominal" text,
"gdp_per_capita_world_bank_2009_nominal_usd" real
);
Question: What is listed as the highest Nominal GDP World Bank, 2009 (million USD) that has a GDP per capita World Bank, 2009 nominal (USD) of 14267?
<|assistant|>
SELECT MAX("nominal_gdp_world_bank_2009_million_usd") FROM "member_states" WHERE "gdp_per_capita_world_bank_2009_nominal_usd"=14267;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "member_states" (
"state" text,
"adopted" text,
"population_2011_01_01" text,
"nominal_gdp_world_bank_2009_million_usd" real,
"relative_gdp_of_total_nominal" text,
"gdp_per_capita_world_bank_2009_nominal_usd" real
);
Question: What is listed for the Adopted that has a Nominal GDP World Bank, 2009 (million USD) of 48477?
<|assistant|>
SELECT "adopted" FROM "member_states" WHERE "nominal_gdp_world_bank_2009_million_usd"=48477;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "member_states" (
"state" text,
"adopted" text,
"population_2011_01_01" text,
"nominal_gdp_world_bank_2009_million_usd" real,
"relative_gdp_of_total_nominal" text,
"gdp_per_capita_world_bank_2009_nominal_usd" real
);
Question: What is listed for the Adopted that has a Niminal GDP World Bank 2009 (million USD) of 12460362?
<|assistant|>
SELECT "adopted" FROM "member_states" WHERE "nominal_gdp_world_bank_2009_million_usd"=12460362;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_top_scorers" (
"rank" real,
"player" text,
"goals" real,
"apps" real,
"rate" real
);
Question: What is the total Rank for ümit karan when Apps is more than 39 and Rate is more than 0.58?
<|assistant|>
SELECT SUM("rank") FROM "all_time_top_scorers" WHERE "apps">39 AND "player"='ümit karan' AND "rate">0.58;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_top_scorers" (
"rank" real,
"player" text,
"goals" real,
"apps" real,
"rate" real
);
Question: When rank is more than 10, what is the total rate?
<|assistant|>
SELECT SUM("rate") FROM "all_time_top_scorers" WHERE "rank">10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_2" (
"contestant_name" text,
"episode_num" text,
"date_premiered_2009" text,
"winning_amount" text,
"eliminated_contestant" text
);
Question: What winning amount has himesh reshammiya as the contestant name?
<|assistant|>
SELECT "winning_amount" FROM "season_2" WHERE "contestant_name"='himesh reshammiya';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_2" (
"contestant_name" text,
"episode_num" text,
"date_premiered_2009" text,
"winning_amount" text,
"eliminated_contestant" text
);
Question: What eliminated contestant has October 10, 2009 as the date premiered?
<|assistant|>
SELECT "eliminated_contestant" FROM "season_2" WHERE "date_premiered_2009"='october 10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_2" (
"contestant_name" text,
"episode_num" text,
"date_premiered_2009" text,
"winning_amount" text,
"eliminated_contestant" text
);
Question: What date premiered (2009) has kareena kapoor as the contestant name?
<|assistant|>
SELECT "date_premiered_2009" FROM "season_2" WHERE "contestant_name"='kareena kapoor';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_2" (
"contestant_name" text,
"episode_num" text,
"date_premiered_2009" text,
"winning_amount" text,
"eliminated_contestant" text
);
Question: What episode # has govinda & david dhawan as the eliminated contestant?
<|assistant|>
SELECT "episode_num" FROM "season_2" WHERE "eliminated_contestant"='govinda & david dhawan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_2" (
"contestant_name" text,
"episode_num" text,
"date_premiered_2009" text,
"winning_amount" text,
"eliminated_contestant" text
);
Question: What is the winning amount that has May 30, 2009 as the date premiered?
<|assistant|>
SELECT "winning_amount" FROM "season_2" WHERE "date_premiered_2009"='may 30';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: What is the Reserved For of Lahar?
<|assistant|>
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "name"='lahar';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_macintosh_models_grouped_by_cpu_" (
"processor" text,
"model" text,
"clock_speed_m_hz" real,
"l1_cache_bytes" text,
"introduced" text,
"discontinued" text
);
Question: What is the least clock speed (MHz) with January 1986 as introduced?
<|assistant|>
SELECT MIN("clock_speed_m_hz") FROM "list_of_macintosh_models_grouped_by_cpu_" WHERE "introduced"='january 1986';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_macintosh_models_grouped_by_cpu_" (
"processor" text,
"model" text,
"clock_speed_m_hz" real,
"l1_cache_bytes" text,
"introduced" text,
"discontinued" text
);
Question: With April 1986 as the introduced, what is the least clock speed (MHz)?
<|assistant|>
SELECT MIN("clock_speed_m_hz") FROM "list_of_macintosh_models_grouped_by_cpu_" WHERE "introduced"='april 1986';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_macintosh_models_grouped_by_cpu_" (
"processor" text,
"model" text,
"clock_speed_m_hz" real,
"l1_cache_bytes" text,
"introduced" text,
"discontinued" text
);
Question: The Powerbook 100 model has what processor?
<|assistant|>
SELECT "processor" FROM "list_of_macintosh_models_grouped_by_cpu_" WHERE "model"='powerbook 100';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_macintosh_models_grouped_by_cpu_" (
"processor" text,
"model" text,
"clock_speed_m_hz" real,
"l1_cache_bytes" text,
"introduced" text,
"discontinued" text
);
Question: When was the Lisa 2 model discontinued?
<|assistant|>
SELECT "discontinued" FROM "list_of_macintosh_models_grouped_by_cpu_" WHERE "model"='lisa 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who are the rowers with a time of 6:41.45 and notes of FA?
<|assistant|>
SELECT "rowers" FROM "repechage" WHERE "notes"='fa' AND "time"='6:41.45';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who are the rowers from the United States?
<|assistant|>
SELECT "rowers" FROM "repechage" WHERE "country"='united states';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What time did the team from Ukraine have?
<|assistant|>
SELECT "time" FROM "repechage" WHERE "country"='ukraine';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the rank for the team that had a time of 6:41.45 and note FA?
<|assistant|>
SELECT SUM("rank") FROM "repechage" WHERE "notes"='fa' AND "time"='6:41.45';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What rank was the team from Australia?
<|assistant|>
SELECT COUNT("rank") FROM "repechage" WHERE "country"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
Question: What is the highest game that has July 31 as the date?
<|assistant|>
SELECT MAX("game") FROM "regular_season" WHERE "date"='july 31';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "downstream_pittsburgh_to_olmsted" (
"locks_dam" text,
"location_l" text,
"river_mile" real,
"lock_side" text,
"lock_lift_drop_in_feet" text,
"pool_length_miles" text
);
Question: What is the total of the River Mile in Greenup, Kentucky?
<|assistant|>
SELECT SUM("river_mile") FROM "downstream_pittsburgh_to_olmsted" WHERE "location_l"='greenup, kentucky';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "downstream_pittsburgh_to_olmsted" (
"locks_dam" text,
"location_l" text,
"river_mile" real,
"lock_side" text,
"lock_lift_drop_in_feet" text,
"pool_length_miles" text
);
Question: What is the River Mile with a RDB lock side and a pool length of 55.4?
<|assistant|>
SELECT "river_mile" FROM "downstream_pittsburgh_to_olmsted" WHERE "lock_side"='rdb' AND "pool_length_miles"='55.4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "downstream_pittsburgh_to_olmsted" (
"locks_dam" text,
"location_l" text,
"river_mile" real,
"lock_side" text,
"lock_lift_drop_in_feet" text,
"pool_length_miles" text
);
Question: What is the highest River Mile that has a pool length of 42.2 miles or a lock/lift drop of 21 feet?
<|assistant|>
SELECT MAX("river_mile") FROM "downstream_pittsburgh_to_olmsted" WHERE "pool_length_miles"='42.2' AND "lock_lift_drop_in_feet"='21';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "downstream_pittsburgh_to_olmsted" (
"locks_dam" text,
"location_l" text,
"river_mile" real,
"lock_side" text,
"lock_lift_drop_in_feet" text,
"pool_length_miles" text
);
Question: What is the location of the river mile that is larger than 938.9, and Olmsted Locks and Dam?
<|assistant|>
SELECT "location_l" FROM "downstream_pittsburgh_to_olmsted" WHERE "river_mile">938.9 AND "locks_dam"='olmsted locks and dam';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_c_d_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the lowest ranking for 8:13.67?
<|assistant|>
SELECT MIN("rank") FROM "semifinal_c_d_2" WHERE "time"='8:13.67';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_c_d_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the time for Kazakhstan?
<|assistant|>
SELECT "time" FROM "semifinal_c_d_2" WHERE "country"='kazakhstan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_c_d_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What are the notes for South Africa?
<|assistant|>
SELECT "notes" FROM "semifinal_c_d_2" WHERE "country"='south africa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_c_d_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What country is ranked higher than 5?
<|assistant|>
SELECT "country" FROM "semifinal_c_d_2" WHERE "rank">5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_c_d_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the total rank and fc notes from South Africa?
<|assistant|>
SELECT COUNT("rank") FROM "semifinal_c_d_2" WHERE "notes"='fc' AND "country"='south africa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1963" (
"title" text,
"series" text,
"director" text,
"production_number" real,
"release_date" text
);
Question: From what series was the title with a production number of 1614 that was directed by Friz Freleng?
<|assistant|>
SELECT "series" FROM "1963" WHERE "director"='friz freleng' AND "production_number"=1614;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "kickboxing_record" (
"result" text,
"record" text,
"method" text,
"event" text,
"round" real,
"location" text
);
Question: What is the Result of the event with a Record of 1-3?
<|assistant|>
SELECT "result" FROM "kickboxing_record" WHERE "record"='1-3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "kickboxing_record" (
"result" text,
"record" text,
"method" text,
"event" text,
"round" real,
"location" text
);
Question: What is the Round of the event with a Record of 5-4?
<|assistant|>
SELECT "round" FROM "kickboxing_record" WHERE "record"='5-4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "v" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What was the latitude for van meter who had a land(sqmi) larger than 35.747, Water(sqmi) of 0 and a GEO ID smaller than 3809981860?
<|assistant|>
SELECT COUNT("latitude") FROM "v" WHERE "land_sqmi">35.747 AND "water_sqmi"=0 AND "geo_id"<3809981860 AND "township"='van meter';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "v" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What was the population fo the township with a Latitude of 48.853051, and a Water (sqmi) smaller than 0.9590000000000001?
<|assistant|>
SELECT MAX("pop_2010") FROM "v" WHERE "latitude"=48.853051 AND "water_sqmi"<0.9590000000000001;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "v" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: Van Meter has a water(sqmi) of 0 and a longitude larger than -98.444062, what was their highest ANSI code?
<|assistant|>
SELECT MAX("ansi_code") FROM "v" WHERE "water_sqmi"=0 AND "township"='van meter' AND "longitude">-98.444062;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "v" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What was the lowest water(sqmi) in the county of dickey where the longitude was smaller than -98.444062?
<|assistant|>
SELECT MIN("water_sqmi") FROM "v" WHERE "county"='dickey' AND "longitude"<-98.444062;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"team" text,
"location" text,
"county" text,
"division" text,
"home_ground" text,
"coach" text,
"captain" text
);
Question: Who is the coach for the Northamptonshire Steelbacks?
<|assistant|>
SELECT "coach" FROM "teams" WHERE "team"='northamptonshire steelbacks';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"team" text,
"location" text,
"county" text,
"division" text,
"home_ground" text,
"coach" text,
"captain" text
);
Question: Which team is located in Leicester?
<|assistant|>
SELECT "team" FROM "teams" WHERE "location"='leicester';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"team" text,
"location" text,
"county" text,
"division" text,
"home_ground" text,
"coach" text,
"captain" text
);
Question: Which team is in Sussex county?
<|assistant|>
SELECT "team" FROM "teams" WHERE "county"='sussex';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"team" text,
"location" text,
"county" text,
"division" text,
"home_ground" text,
"coach" text,
"captain" text
);
Question: What is the home ground for the team located in Canterbury?
<|assistant|>
SELECT "home_ground" FROM "teams" WHERE "location"='canterbury';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"team" text,
"location" text,
"county" text,
"division" text,
"home_ground" text,
"coach" text,
"captain" text
);
Question: Who is the captain of the team coached by Giles White?
<|assistant|>
SELECT "captain" FROM "teams" WHERE "coach"='giles white';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"team" text,
"location" text,
"county" text,
"division" text,
"home_ground" text,
"coach" text,
"captain" text
);
Question: Which division is the Derbyshire Falcons in?
<|assistant|>
SELECT "division" FROM "teams" WHERE "team"='derbyshire falcons';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: Which tie number had a home team of Derby County?
<|assistant|>
SELECT "tie_no" FROM "fifth_round_proper" WHERE "home_team"='derby county';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What was the score of the tie with an away team of Stoke City?
<|assistant|>
SELECT "score" FROM "fifth_round_proper" WHERE "away_team"='stoke city';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"english_translation" text,
"place" real,
"points" real
);
Question: Which Artist has a Draw smaller than 14, and Points less than 73, and a Language of turkish?
<|assistant|>
SELECT "artist" FROM "results" WHERE "draw"<14 AND "points"<73 AND "language"='turkish';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"english_translation" text,
"place" real,
"points" real
);
Question: How many points does mia martini have?
<|assistant|>
SELECT COUNT("points") FROM "results" WHERE "artist"='mia martini';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"english_translation" text,
"place" real,
"points" real
);
Question: Which Artist has an English translation of all this is music?
<|assistant|>
SELECT "artist" FROM "results" WHERE "english_translation"='all this is music';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_all_time_athletes_50_metres_women" (
"rank" real,
"time" text,
"athlete" text,
"date" text,
"place" text
);
Question: What athlete has a Grenoble place?
<|assistant|>
SELECT "athlete" FROM "top_all_time_athletes_50_metres_women" WHERE "place"='grenoble';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sixth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What is the Pick number of the Player from Syracuse?
<|assistant|>
SELECT "pick" FROM "sixth_round" WHERE "college"='syracuse';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sixth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What is the Offensive Guard Player from Mississippi State College with a Pick number larter than 44?
<|assistant|>
SELECT "player" FROM "sixth_round" WHERE "pick">44 AND "position"='offensive guard' AND "college"='mississippi state';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sixth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What is the College of the Pick from Denver Broncos?
<|assistant|>
SELECT "college" FROM "sixth_round" WHERE "team"='denver broncos';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.