text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: What is the record for November 26, with the decision made by Prusek?
<|assistant|>
SELECT "record" FROM "november" WHERE "decision"='prusek' AND "date"='november 26';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: What is the record for game where Columbus is visitor, Phoenix is home, and decision is made by Denis?
<|assistant|>
SELECT "record" FROM "november" WHERE "visitor"='columbus' AND "decision"='denis' AND "home"='phoenix';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: What is the record for November 4, with a decision made by Denis?
<|assistant|>
SELECT "record" FROM "november" WHERE "decision"='denis' AND "date"='november 4';<|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,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: What is the Intergiro classification of Nicolaj bo Larsen, who has a Fabrizio guidi point classification?
<|assistant|>
SELECT "intergiro_classification" FROM "classification_leadership_by_stage" WHERE "points_classification"='fabrizio guidi' AND "winner"='nicolaj bo larsen';<|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,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: What is the mountain classification of Mario Cipollini, who has a general classification of Pavel tonkov?
<|assistant|>
SELECT "mountains_classification" FROM "classification_leadership_by_stage" WHERE "winner"='mario cipollini' AND "general_classification"='pavel tonkov';<|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,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: What is the stage of Fabiano Fontanelli, who had a Trofeo Fast Team of Gewiss Playbus and a point classification of Fabrizio Guidi?
<|assistant|>
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "trofeo_fast_team"='gewiss playbus' AND "points_classification"='fabrizio guidi' AND "winner"='fabiano fontanelli';<|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,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: What is the stage with a point classification of Silvio Martinello and Davide Rebellin as the general classification?
<|assistant|>
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "points_classification"='silvio martinello' AND "general_classification"='davide rebellin';<|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,
"intergiro_classification" text,
"trofeo_fast_team" text
);
Question: What is the Trofeo Fast Team with a point classification of Silvio Martinello and stage 6?
<|assistant|>
SELECT "trofeo_fast_team" FROM "classification_leadership_by_stage" WHERE "points_classification"='silvio martinello' AND "stage"='6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"bonus_points" text,
"points" text
);
Question: How many points did the Castres have?
<|assistant|>
SELECT "points_for" FROM "table" WHERE "club"='castres';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"bonus_points" text,
"points" text
);
Question: Who is the club that had 617 points and a draw of 0?
<|assistant|>
SELECT "club" FROM "table" WHERE "drawn"='0' AND "points_for"='617';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"bonus_points" text,
"points" text
);
Question: What number of bonus points did Stade Français?
<|assistant|>
SELECT "bonus_points" FROM "table" WHERE "club"='stade français';<|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: Who was the opponent at the game when the record was 15–15?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='15–15';<|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: Who was the opponent at the game attended by 23,203?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "attendance"='23,203';<|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 loss of the game when the record was 16–15?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='16–15';<|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 that had a score of 16–7?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "score"='16–7';<|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 date of the game attended by 25,022?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "attendance"='25,022';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Which record has an attendance larger than 28,459?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "attendance">'28,459';<|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: When the record was 32-37 what was the score?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='32-37';<|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: On the date of june 7 what was the score?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='june 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: What was the score of the game when the record was 68-39?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='68-39';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: What was the game of the game against the White Sox with a record of 81-48?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "opponent"='white sox' AND "record"='81-48';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: What was the date of the game when the record was 66-38?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='66-38';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "original_broadway_production" (
"year" real,
"award_ceremony" text,
"category" text,
"nominee" text,
"result" text
);
Question: What category was Brian D'arcy James nominated for?
<|assistant|>
SELECT "category" FROM "original_broadway_production" WHERE "nominee"='brian d''arcy james' AND "result"='nominated';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
Question: What is the item "Moving to", when the Transfer fee is £300,000?
<|assistant|>
SELECT "moving_to" FROM "out" WHERE "transfer_fee"='£300,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
Question: What is the Country, when the Transfer fee is "loan", and when the Name is Lynch?
<|assistant|>
SELECT "country" FROM "out" WHERE "transfer_fee"='loan' AND "name"='lynch';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
Question: What is the Transfer window, when the Transfer fee is "free", and when the Name is Dugdale?
<|assistant|>
SELECT "transfer_window" FROM "out" WHERE "transfer_fee"='free' AND "name"='dugdale';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
Question: What is the Name, when the Transfer fee is "loan"?
<|assistant|>
SELECT "name" FROM "out" WHERE "transfer_fee"='loan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
Question: What is the Transfer window, when the Transfer fee is "free", and when the item "Moving to" is Norwich City?
<|assistant|>
SELECT "transfer_window" FROM "out" WHERE "transfer_fee"='free' AND "moving_to"='norwich city';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
Question: What is the Transfer fee, when the Transfer window is "winter", and when the item "Moving to" is Northwich Victoria?
<|assistant|>
SELECT "transfer_fee" FROM "out" WHERE "transfer_window"='winter' AND "moving_to"='northwich victoria';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What companyw as the constructor when the Time/Retired was collision, and a Grid of 11?
<|assistant|>
SELECT "constructor" FROM "race" WHERE "time_retired"='collision' AND "grid"='11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What shows as the Time/Retired for Grid 8?
<|assistant|>
SELECT "time_retired" FROM "race" WHERE "grid"='8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What is the number of laps for Grid 3?
<|assistant|>
SELECT "laps" FROM "race" WHERE "grid"='3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What company was the constructor when Nick Heidfeld was the driver/
<|assistant|>
SELECT "constructor" FROM "race" WHERE "driver"='nick heidfeld';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What shows for laps when the Time/Retired was +1:08.577?
<|assistant|>
SELECT "laps" FROM "race" WHERE "time_retired"='+1:08.577';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What is the name of the constructor for Grid 1?
<|assistant|>
SELECT "constructor" FROM "race" WHERE "grid"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"player" text,
"test_career" text,
"tests" real,
"catches" real,
"stumpings" real,
"total_dismissals" real
);
Question: When was Mushfiqur Rahim's test career?
<|assistant|>
SELECT "test_career" FROM "see_also" WHERE "player"='mushfiqur rahim';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indycar_career_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"rank" text,
"points" real
);
Question: Name the sum of points for 1984
<|assistant|>
SELECT SUM("points") FROM "indycar_career_results" WHERE "year"<1984;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indycar_career_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"rank" text,
"points" real
);
Question: Name the points for Engine of chevrolet 265c
<|assistant|>
SELECT "points" FROM "indycar_career_results" WHERE "engine"='chevrolet 265c';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indycar_career_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"rank" text,
"points" real
);
Question: Name the chassis of 147 points and engine of ford cosworth dfx
<|assistant|>
SELECT "chassis" FROM "indycar_career_results" WHERE "points"=147 AND "engine"='ford cosworth dfx';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "state_house" (
"name" text,
"party" text,
"hometown" text,
"district" text,
"term" text,
"legislatures" text
);
Question: Which term had a Democratic representative from district 7?
<|assistant|>
SELECT "term" FROM "state_house" WHERE "district"='7' AND "party"='democratic';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "state_house" (
"name" text,
"party" text,
"hometown" text,
"district" text,
"term" text,
"legislatures" text
);
Question: What was the term of Bruce Biers Kendall whose hometown is Anchorage?
<|assistant|>
SELECT "term" FROM "state_house" WHERE "hometown"='anchorage' AND "name"='bruce biers kendall';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "state_house" (
"name" text,
"party" text,
"hometown" text,
"district" text,
"term" text,
"legislatures" text
);
Question: What is the hometown of the representative that served the twenty-sixth legislature?
<|assistant|>
SELECT "hometown" FROM "state_house" WHERE "legislatures"='twenty-sixth';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: What is the qual with a 19 rank?
<|assistant|>
SELECT "qual" FROM "indy_500_results" WHERE "rank"='19';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: What rank has a 25 finish?
<|assistant|>
SELECT "rank" FROM "indy_500_results" WHERE "finish"='25';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: What finish has a 143.056 qual?
<|assistant|>
SELECT "finish" FROM "indy_500_results" WHERE "qual"='143.056';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: What rank had more than 165 laps and a finish of 5?
<|assistant|>
SELECT "rank" FROM "indy_500_results" WHERE "laps">165 AND "finish"='5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"time" text,
"att" text,
"record" text
);
Question: What was the record at the game against the Blue Jays with a loss of Batista (0–3)?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "opponent"='blue jays' AND "loss"='batista (0–3)';<|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 was the loss of the game when the record was 14–8?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='14–8';<|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 was the score of the game when the record was 28–19?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='28–19';<|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 was the record at the game held on May 1st with a loss of Speier (1–3)?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='may 1' AND "loss"='speier (1–3)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: How many goes played fot hteam that lost less than 12 games, drew 5, and had over 37 points?
<|assistant|>
SELECT "played" FROM "ppl_2005_final_standings" WHERE "lost"<12 AND "points">37 AND "drawn"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: How many games lost for the team that drew 5 times and had over 41 points?
<|assistant|>
SELECT AVG("lost") FROM "ppl_2005_final_standings" WHERE "drawn"=5 AND "points">41;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: How many games played for the army team with over 51 points and under 5 games drawn?
<|assistant|>
SELECT COUNT("played") FROM "ppl_2005_final_standings" WHERE "drawn"<5 AND "team"='army' AND "points">51;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: How many points for the navy team that lost over 11?
<|assistant|>
SELECT SUM("points") FROM "ppl_2005_final_standings" WHERE "team"='navy' AND "lost">11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
Question: What class of car had the XI Coppa Acerbo title?
<|assistant|>
SELECT "class" FROM "race_winners" WHERE "race_title"='xi coppa acerbo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
Question: Who won the III Coppa Acerbo title?
<|assistant|>
SELECT "driver_s" FROM "race_winners" WHERE "race_title"='iii coppa acerbo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
Question: What's the name of the title for the Maserati A6GCS?
<|assistant|>
SELECT "race_title" FROM "race_winners" WHERE "vehicle"='maserati a6gcs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
Question: Who won the XXIV Gran Premio di Pescara in the sports car class?
<|assistant|>
SELECT "driver_s" FROM "race_winners" WHERE "class"='sports car' AND "race_title"='xxiv gran premio di pescara';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles" (
"outcome" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: What surface was the città di caltanissetta played on?
<|assistant|>
SELECT "surface" FROM "doubles" WHERE "tournament"='città di caltanissetta';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles" (
"outcome" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: What was the score in Volkswagen Challenger tournament?
<|assistant|>
SELECT "score" FROM "doubles" WHERE "tournament"='volkswagen challenger';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_grape_producing_countries_by_years_i" (
"rank" text,
"country" text,
"2009" text,
"2010" text,
"2011" text
);
Question: what is the production in 2010 with 2011 production of 2,240,000?
<|assistant|>
SELECT "2010" FROM "top_grape_producing_countries_by_years_i" WHERE "2011"='2,240,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_grape_producing_countries_by_years_i" (
"rank" text,
"country" text,
"2009" text,
"2010" text,
"2011" text
);
Question: what is the ranking for 2010 production of 2,903,000?
<|assistant|>
SELECT "rank" FROM "top_grape_producing_countries_by_years_i" WHERE "2010"='2,903,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_grape_producing_countries_by_years_i" (
"rank" text,
"country" text,
"2009" text,
"2010" text,
"2011" text
);
Question: what is the production in 2010 with rank of 8?
<|assistant|>
SELECT "2010" FROM "top_grape_producing_countries_by_years_i" WHERE "rank"='8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
Question: What club captain is John Hutchinson in?
<|assistant|>
SELECT "club" FROM "marquee_player" WHERE "captain"='john hutchinson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
Question: What team is Michael McGlinchey vice captain of?
<|assistant|>
SELECT "international_marquee" FROM "marquee_player" WHERE "vice_captain"='michael mcglinchey';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
Question: What Australian Marquee team is Michael Beauchamp a captain of?
<|assistant|>
SELECT "australian_marquee" FROM "marquee_player" WHERE "captain"='michael beauchamp';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
Question: What Junior Marquee team is Harry Kewell of?
<|assistant|>
SELECT "junior_marquee_player" FROM "marquee_player" WHERE "captain"='harry kewell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What is the name of call sign that uses a Frequency MHz of 91.1 fm?
<|assistant|>
SELECT "call_sign" FROM "translators" WHERE "frequency_m_hz"='91.1 fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: How much is the total ERP W for an 107.9 fm freqeuncy MHz?
<|assistant|>
SELECT COUNT("erp_w") FROM "translators" WHERE "frequency_m_hz"='107.9 fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: Can you tell me what is FCC info for harmony township, new jersey?
<|assistant|>
SELECT "fcc_info" FROM "translators" WHERE "city_of_license"='harmony township, new jersey';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What is the smallest ERP for allentown, pennsylvania?
<|assistant|>
SELECT MIN("erp_w") FROM "translators" WHERE "city_of_license"='allentown, pennsylvania';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which grid has a time/retired of +3.9 secs in less than 96 laps?
<|assistant|>
SELECT AVG("grid") FROM "race" WHERE "time_retired"='+3.9 secs' AND "laps"<96;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which driver has 7 points for team Australia?
<|assistant|>
SELECT "driver" FROM "race" WHERE "points"=7 AND "team"='team australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: What is the fewest number of laps for a Dale Coyne Racing team with a mechanical time/retired and fewer than 5 points?
<|assistant|>
SELECT MIN("laps") FROM "race" WHERE "team"='dale coyne racing' AND "time_retired"='mechanical' AND "points"<5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: What is the highest points total scored by Dan Clarke in a grid higher than 10?
<|assistant|>
SELECT MAX("points") FROM "race" WHERE "driver"='dan clarke' AND "grid">10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_6" (
"ep_num" real,
"total" real,
"title" text,
"location" text,
"party_theme" text,
"airdate" text
);
Question: What is the earliest episode of the series that is set in Boston, Massachusetts?
<|assistant|>
SELECT MIN("total") FROM "season_6" WHERE "location"='boston, massachusetts';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
Question: How many people were surveyed in the poll from June 30, 2010?
<|assistant|>
SELECT "sample_size" FROM "general_election" WHERE "date_s_administered"='june 30, 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
Question: What percentage of the vote with a margin of error of ± 3.3% did Meg Whitman (R) get?
<|assistant|>
SELECT "meg_whitman_r" FROM "general_election" WHERE "margin_of_error"='± 3.3%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
Question: How many people participated in the Rasmussen Reports poll on October 13, 2010?
<|assistant|>
SELECT "sample_size" FROM "general_election" WHERE "poll_source"='rasmussen reports' AND "date_s_administered"='october 13, 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
Question: What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010.
<|assistant|>
SELECT "meg_whitman_r" FROM "general_election" WHERE "date_s_administered"='october 21, 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
Question: What is the Prize, when the Event is Ept Deauville?
<|assistant|>
SELECT "prize" FROM "european_poker_tour" WHERE "event"='ept deauville';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
Question: What is the City, when the Prize is €880,000?
<|assistant|>
SELECT "city" FROM "european_poker_tour" WHERE "prize"='€880,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
Question: What is the City, when the Winner is Ruben Visser?
<|assistant|>
SELECT "city" FROM "european_poker_tour" WHERE "winner"='ruben visser';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
Question: Who is the Winner, when the Prize is €880,000?
<|assistant|>
SELECT "winner" FROM "european_poker_tour" WHERE "prize"='€880,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
Question: What is the City, when the Prize is $1,859,000?
<|assistant|>
SELECT "city" FROM "european_poker_tour" WHERE "prize"='$1,859,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
Question: What is the Prize, when the Event is Ept Sanremo?
<|assistant|>
SELECT "prize" FROM "european_poker_tour" WHERE "event"='ept sanremo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: On what date was the venue at Edgbaston?
<|assistant|>
SELECT "date" FROM "west_indies_in_england" WHERE "venue"='edgbaston';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
Question: What is the lowest image with a 20w Harrison, and less than 20 for Ashmolean?
<|assistant|>
SELECT MIN("image") FROM "reconstruction_in_the_british_museum" WHERE "harrison"='20w' AND "ashmolean"<20;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
Question: What is the number of Ashmolean with 14s Harrison, and image less than 542?
<|assistant|>
SELECT COUNT("ashmolean") FROM "reconstruction_in_the_british_museum" WHERE "harrison"='14s' AND "image"<542;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
Question: What is the cooper with an Ashmolean less than 21, and hahland smaller than 4?
<|assistant|>
SELECT "cooper" FROM "reconstruction_in_the_british_museum" WHERE "ashmolean"<21 AND "hahland"<4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
Question: What is the smith with a 16 ashmolean?
<|assistant|>
SELECT "smith" FROM "reconstruction_in_the_british_museum" WHERE "ashmolean"=16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rodentia" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
Question: What order has the Species Authority of hydrochaeris hydrochaeris (linnaeus, 1766)?
<|assistant|>
SELECT "order" FROM "rodentia" WHERE "species_authority"='hydrochaeris hydrochaeris (linnaeus, 1766)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rodentia" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
Question: What is the highest Red List for the muridae family and species Authority of microtus pinetorum (le conte, 1830)?
<|assistant|>
SELECT MAX("red_list") FROM "rodentia" WHERE "family"='muridae' AND "species_authority"='microtus pinetorum (le conte, 1830)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rodentia" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
Question: What is the name for the species Authority of sigmodon hispidus say & ord, 1825?
<|assistant|>
SELECT "name" FROM "rodentia" WHERE "species_authority"='sigmodon hispidus say & ord, 1825';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the largest total with a Silver of 1, and a Rank larger than 7?
<|assistant|>
SELECT MAX("total") FROM "medal_standings" WHERE "silver"=1 AND "rank">7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many totals have a Bronze smaller than 3, a Nation of zimbabwe, and a Silver smaller than 6?
<|assistant|>
SELECT COUNT("total") FROM "medal_standings" WHERE "bronze"<3 AND "nation"='zimbabwe' AND "silver"<6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the smallest silver with a Bronze smaller than 6, a Total of 3, and a Rank smaller than 9?
<|assistant|>
SELECT MIN("silver") FROM "medal_standings" WHERE "bronze"<6 AND "total"=3 AND "rank"<9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many ranks have 0 golds, a Nation of namibia, and a Total smaller than 1?
<|assistant|>
SELECT COUNT("rank") FROM "medal_standings" WHERE "gold"=0 AND "nation"='namibia' AND "total"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many totals have a Bronze of 0, and a Gold smaller than 0?
<|assistant|>
SELECT SUM("total") FROM "medal_standings" WHERE "bronze"=0 AND "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the total silver with a Rank larger than 9, and a Total larger than 1?
<|assistant|>
SELECT SUM("silver") FROM "medal_standings" WHERE "rank">9 AND "total">1;<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.