text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_donegal_railway" (
"class" text,
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"manufacturer" text,
"date_made" real,
"date_withdrawn" text
);
Question: Which locomotive class had 5 items made?
<|assistant|>
SELECT "class" FROM "west_donegal_railway" WHERE "quantity_made"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_donegal_railway" (
"class" text,
"type" text,
"fleet_numbers" text,
"quantity_made" real,
"manufacturer" text,
"date_made" real,
"date_withdrawn" text
);
Question: Which manufacturer made a locomotive with a type of 4-6-4t?
<|assistant|>
SELECT "manufacturer" FROM "west_donegal_railway" WHERE "type"='4-6-4t';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "miscellaneous" (
"aces" real,
"player" real,
"opponent" text,
"round" text,
"year" text,
"event" real,
"surface" text,
"sets" text
);
Question: What is the event year radek štěpánek was the round and there were less than 3 aces?
<|assistant|>
SELECT COUNT("event") FROM "miscellaneous" WHERE "round"='radek štěpánek' AND "aces"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "miscellaneous" (
"aces" real,
"player" real,
"opponent" text,
"round" text,
"year" text,
"event" real,
"surface" text,
"sets" text
);
Question: How many players were in the event after 2011 with less than 9 aces?
<|assistant|>
SELECT COUNT("player") FROM "miscellaneous" WHERE "event">2011 AND "aces"<9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "miscellaneous" (
"aces" real,
"player" real,
"opponent" text,
"round" text,
"year" text,
"event" real,
"surface" text,
"sets" text
);
Question: Who was the opponent in the 2011 event with less than 113 players?
<|assistant|>
SELECT "opponent" FROM "miscellaneous" WHERE "player"<113 AND "event"=2011;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "miscellaneous" (
"aces" real,
"player" real,
"opponent" text,
"round" text,
"year" text,
"event" real,
"surface" text,
"sets" text
);
Question: What is the highest number of players during 1r year with a clay set and more than 4 aces?
<|assistant|>
SELECT MAX("player") FROM "miscellaneous" WHERE "year"='1r' AND "sets"='clay' AND "aces">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: Who played as Team 2 against Team 1 SC Gagnoa?
<|assistant|>
SELECT "team_2" FROM "second_round" WHERE "team_1"='sc gagnoa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What was the 1st leg score when Mufulira Wanderers played as Team 2?
<|assistant|>
SELECT "1st_leg" FROM "second_round" WHERE "team_2"='mufulira wanderers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What's the score of the 1st leg when Water Corporation was Team 1?
<|assistant|>
SELECT "1st_leg" FROM "second_round" WHERE "team_1"='water corporation';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What's the 1st leg score when Team 1 was Gor Mahia?
<|assistant|>
SELECT "1st_leg" FROM "second_round" WHERE "team_1"='gor mahia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: Who played as Team 1 against Lomé i?
<|assistant|>
SELECT "team_1" FROM "second_round" WHERE "team_2"='lomé i';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the entrant for year of 1952
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year"=1952;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the total number of points for 1952
<|assistant|>
SELECT COUNT("points") FROM "complete_formula_one_world_championship_" WHERE "year"=1952;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Name the total number of years for talbot-lago t26c and points less than 3
<|assistant|>
SELECT COUNT("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='talbot-lago t26c' AND "points"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_11" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" text,
"investing_dragon_s" text
);
Question: What episode featured entrepreneur Richard Ernest?
<|assistant|>
SELECT "first_aired" FROM "series_11" WHERE "entrepreneur_s"='richard ernest';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_11" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" text,
"investing_dragon_s" text
);
Question: What Investing Dragons had a request of £100,000?
<|assistant|>
SELECT "investing_dragon_s" FROM "series_11" WHERE "money_requested"='100,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_11" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" text,
"investing_dragon_s" text
);
Question: What Entrepreneurs requested £60,000?
<|assistant|>
SELECT "entrepreneur_s" FROM "series_11" WHERE "money_requested"='60,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_11" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" text,
"investing_dragon_s" text
);
Question: How much was requested from Investing Dragon Peter Jones request in episode 2?
<|assistant|>
SELECT "money_requested" FROM "series_11" WHERE "investing_dragon_s"='peter jones' AND "episode"='episode 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_4" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" real,
"investing_dragon_s" text
);
Question: Name the investing dragon for razzamataz
<|assistant|>
SELECT "investing_dragon_s" FROM "series_4" WHERE "company_or_product_name"='razzamataz';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_4" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" real,
"investing_dragon_s" text
);
Question: Name the first aired with money requested more than 85,000
<|assistant|>
SELECT "first_aired" FROM "series_4" WHERE "money_requested">'85,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What is the competition type of the event with a result of 3-2 and a score of 2-1?
<|assistant|>
SELECT "competition" FROM "international_goals" WHERE "result"='3-2' AND "score"='2-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which date has a competition type of friendly and a score of 2-1?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "competition"='friendly' AND "score"='2-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What is the score of the event with a competition type of friendly and a result of 4-5?
<|assistant|>
SELECT "score" FROM "international_goals" WHERE "competition"='friendly' AND "result"='4-5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which date has a score of 2-1?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "score"='2-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which date has a competition type of British home championship?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "competition"='british home championship';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_calendar" (
"circuit" text,
"location_state" text,
"date" text,
"winning_driver" text,
"team" text
);
Question: what date was mallala motor sport park the circuit?
<|assistant|>
SELECT "date" FROM "race_calendar" WHERE "circuit"='mallala motor sport park';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_calendar" (
"circuit" text,
"location_state" text,
"date" text,
"winning_driver" text,
"team" text
);
Question: what date did the m3 motorsport team compete at winton motor raceway?
<|assistant|>
SELECT "date" FROM "race_calendar" WHERE "team"='m3 motorsport' AND "circuit"='winton motor raceway';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: Name the agg for team 2 of asl sport guyanais.
<|assistant|>
SELECT "agg" FROM "first_round" WHERE "team_2"='asl sport guyanais';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: Name the agg for seba united
<|assistant|>
SELECT "agg" FROM "first_round" WHERE "team_1"='seba united';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: Name the 2nd leg for defence force
<|assistant|>
SELECT "2nd_leg" FROM "first_round" WHERE "team_2"='defence force';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "club_career_stats" (
"season" real,
"team" text,
"country" text,
"apps" real,
"goals" real
);
Question: Which country does FC Atyrau represent after the 2006 season?
<|assistant|>
SELECT "country" FROM "club_career_stats" WHERE "season">2006 AND "team"='fc atyrau';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "club_career_stats" (
"season" real,
"team" text,
"country" text,
"apps" real,
"goals" real
);
Question: In which season did Fc Pakhtakor Tashkent represent the country of Uzbekistan with more than 6 apps?
<|assistant|>
SELECT MAX("season") FROM "club_career_stats" WHERE "country"='uzbekistan' AND "team"='fc pakhtakor tashkent' AND "apps">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "club_career_stats" (
"season" real,
"team" text,
"country" text,
"apps" real,
"goals" real
);
Question: How many seasons have 1 goals and more than 11 apps?
<|assistant|>
SELECT COUNT("season") FROM "club_career_stats" WHERE "goals"=1 AND "apps">11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What game that had a record of 39-44 had the lowest attendance?
<|assistant|>
SELECT MIN("attendance") FROM "game_log" WHERE "record"='39-44';<|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: Who was the opponent at the game that had a loss of Saarloos (7-7)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='saarloos (7-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" real,
"record" text
);
Question: What was the date of the game attended by more than 24,383 with a score of 4-3?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "attendance">'24,383' AND "score"='4-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,
"attendance" real,
"record" text
);
Question: What was the score of the game with a record of 81-60?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='81-60';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What was the lowest attendance at a game that had a score of 5-4 and a loss of Williams (2-4)?
<|assistant|>
SELECT MIN("attendance") FROM "game_log" WHERE "score"='5-4' AND "loss"='williams (2-4)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "honours" (
"year" text,
"division" text,
"place" text,
"played" real,
"drawn" text,
"lost" text,
"g_f" text,
"g_a" text,
"g_d" text,
"points" real
);
Question: What year did the 11th place play 26 games?
<|assistant|>
SELECT "year" FROM "honours" WHERE "place"='11th' AND "played"=26;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "honours" (
"year" text,
"division" text,
"place" text,
"played" real,
"drawn" text,
"lost" text,
"g_f" text,
"g_a" text,
"g_d" text,
"points" real
);
Question: What is the total played games of a 22 G.A.?
<|assistant|>
SELECT COUNT("played") FROM "honours" WHERE "g_a"='22';<|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,
"winner" text,
"race_leader" text
);
Question: Name the winner for genoa to livorno
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "course"='genoa to livorno';<|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,
"winner" text,
"race_leader" text
);
Question: Name the winner for 5 june
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "date"='5 june';<|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,
"winner" text,
"race_leader" text
);
Question: Name the winner for rest day race leader
<|assistant|>
SELECT "winner" FROM "stage_results" WHERE "race_leader"='rest day';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: Name the least rank for lane less than 5 for germany and sandra völker
<|assistant|>
SELECT MIN("rank") FROM "semifinal_1" WHERE "lane"<5 AND "nationality"='germany' AND "name"='sandra völker';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: Name the total number of rank for lane 7
<|assistant|>
SELECT COUNT("rank") FROM "semifinal_1" WHERE "lane"=7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: Name the most time for katrin meißner and rank less than 5
<|assistant|>
SELECT MAX("time") FROM "semifinal_1" WHERE "name"='katrin meißner' AND "rank"<5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: Tell me the name for time of 25.74
<|assistant|>
SELECT "name" FROM "semifinal_1" WHERE "time"=25.74;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_secondary_phase" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: Was the University of Southern California Signed?
<|assistant|>
SELECT "signed" FROM "june_secondary_phase" WHERE "school"='university of southern california';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_secondary_phase" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: Was the University of Michigan Signed?
<|assistant|>
SELECT "signed" FROM "june_secondary_phase" WHERE "school"='university of michigan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "june_secondary_phase" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: What is the University of Southern California's highest Round?
<|assistant|>
SELECT MAX("round") FROM "june_secondary_phase" WHERE "school"='university of southern california';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england_in_west_indies" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Who was the home captain at Sabina Park?
<|assistant|>
SELECT "home_captain" FROM "england_in_west_indies" WHERE "venue"='sabina park';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "england_in_west_indies" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: What was the result of the game hosted at Queen's Park Oval?
<|assistant|>
SELECT "result" FROM "england_in_west_indies" WHERE "venue"='queen''s park oval';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "80_million_to_99_million_records" (
"artist" text,
"country_of_origin" text,
"period_active" text,
"release_year_of_first_charted_record" real,
"genre" text,
"claimed_sales" text
);
Question: Name the genre for release-year of first charted record of 1988
<|assistant|>
SELECT "genre" FROM "80_million_to_99_million_records" WHERE "release_year_of_first_charted_record"=1988;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: What was the loss of the game with a record of 77-65?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='77-65';<|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 loss of the game with a record of 84-71?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='84-71';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What date was the record 34-41?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='34-41';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
Question: What type had a course of Grosseto To Rieti?
<|assistant|>
SELECT "type" FROM "stage_results" WHERE "course"='grosseto to rieti';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scoring_champions" (
"season" text,
"league" text,
"winner" text,
"goals" real,
"assists" real,
"points" real
);
Question: In what Season were there 86 Assists in the WCJHL League?
<|assistant|>
SELECT "season" FROM "scoring_champions" WHERE "league"='wcjhl' AND "assists"=86;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scoring_champions" (
"season" text,
"league" text,
"winner" text,
"goals" real,
"assists" real,
"points" real
);
Question: In the WCHL League, what is the last Assists with less than 65 Goals?
<|assistant|>
SELECT MIN("assists") FROM "scoring_champions" WHERE "league"='wchl' AND "goals"<65;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scoring_champions" (
"season" text,
"league" text,
"winner" text,
"goals" real,
"assists" real,
"points" real
);
Question: What are the most Points with an Assist of 46?
<|assistant|>
SELECT MAX("points") FROM "scoring_champions" WHERE "assists"=46;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_6_f1_tyre_compounds_as_supplied_by_p" (
"compound_name" text,
"colour" text,
"tread" text,
"driving_conditions" text,
"dry_type" text,
"grip" text,
"durability" text
);
Question: What compound is yellow?
<|assistant|>
SELECT "compound_name" FROM "the_6_f1_tyre_compounds_as_supplied_by_p" WHERE "colour"='yellow';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_6_f1_tyre_compounds_as_supplied_by_p" (
"compound_name" text,
"colour" text,
"tread" text,
"driving_conditions" text,
"dry_type" text,
"grip" text,
"durability" text
);
Question: What grip has a dry option?
<|assistant|>
SELECT "grip" FROM "the_6_f1_tyre_compounds_as_supplied_by_p" WHERE "dry_type"='option';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_6_f1_tyre_compounds_as_supplied_by_p" (
"compound_name" text,
"colour" text,
"tread" text,
"driving_conditions" text,
"dry_type" text,
"grip" text,
"durability" text
);
Question: What color is the super-soft compound?
<|assistant|>
SELECT "colour" FROM "the_6_f1_tyre_compounds_as_supplied_by_p" WHERE "compound_name"='super-soft';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"tickets_sold_available" text,
"gross_revenue_1979" text,
"gross_revenue_2012" text
);
Question: Which venue has Tickets Sold/ Available with a Gross Revenue (1979) of $665,232?
<|assistant|>
SELECT "tickets_sold_available" FROM "box_office_score_data" WHERE "gross_revenue_1979"='$665,232';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"tickets_sold_available" text,
"gross_revenue_1979" text,
"gross_revenue_2012" text
);
Question: What is the Gross Revenue (1979) of the Venue, lyceum theatre?
<|assistant|>
SELECT "gross_revenue_1979" FROM "box_office_score_data" WHERE "venue"='lyceum theatre';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"tickets_sold_available" text,
"gross_revenue_1979" text,
"gross_revenue_2012" text
);
Question: What is the amount of Tickets Sold/ Available at the Venue of hippodrome?
<|assistant|>
SELECT "tickets_sold_available" FROM "box_office_score_data" WHERE "venue"='hippodrome';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"tickets_sold_available" text,
"gross_revenue_1979" text,
"gross_revenue_2012" text
);
Question: Which Venue has a Gross Revenue (2012) of $179,712?
<|assistant|>
SELECT "venue" FROM "box_office_score_data" WHERE "gross_revenue_2012"='$179,712';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"tickets_sold_available" text,
"gross_revenue_1979" text,
"gross_revenue_2012" text
);
Question: Which Venue has an amount of Tickets Sold/ Available of 4,700 / 4,700 (100%)?
<|assistant|>
SELECT "venue" FROM "box_office_score_data" WHERE "tickets_sold_available"='4,700 / 4,700 (100%)';<|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 that had a loss of Willis (0–1)?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "loss"='willis (0–1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: What was the opponent at the game that had a loss of Travers (0–2)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='travers (0–2)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: What was the Loss when the Record was 50-54?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='50-54';<|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: Who was the opponent when the loss was Wells (4-7)?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='wells (4-7)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "forwards" (
"number" real,
"player" text,
"shoots" text,
"position" text,
"acquired" real,
"place_of_birth" text,
"joined_from" text
);
Question: What shows for shoots for craig peacock a?
<|assistant|>
SELECT "shoots" FROM "forwards" WHERE "player"='craig peacock a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "forwards" (
"number" real,
"player" text,
"shoots" text,
"position" text,
"acquired" real,
"place_of_birth" text,
"joined_from" text
);
Question: What is the average Acquired when the Number shows as 7?
<|assistant|>
SELECT AVG("acquired") FROM "forwards" WHERE "number"=7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team_appearances" (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"total" real
);
Question: What is the total of 2013 with 6th?
<|assistant|>
SELECT MAX("total") FROM "team_appearances" WHERE "2013"='6th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team_appearances" (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"total" real
);
Question: Which 2009 year has a total of 1, and 2004 year of 7th?
<|assistant|>
SELECT "2009" FROM "team_appearances" WHERE "total"=1 AND "2004"='7th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team_appearances" (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"total" real
);
Question: What is the year 2013 with a total of 5, and 5th in 2009?
<|assistant|>
SELECT "2013" FROM "team_appearances" WHERE "total"=5 AND "2009"='5th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team_appearances" (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"total" real
);
Question: What is the year 2001 with a total larger than 1, and 2009 with 8?
<|assistant|>
SELECT "2001" FROM "team_appearances" WHERE "total">1 AND "2009"='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,
"attendance" real,
"record" text
);
Question: What opponents have a record of 90-70?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='90-70';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What game had more than 50,324 in attendance?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "attendance">'50,324';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"entrant" text
);
Question: What is the start of Offy engine and in 1972?
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "engine"='offy' AND "year"=1972;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"entrant" text
);
Question: What is the chassis for offy engine and 25th finish?
<|assistant|>
SELECT "chassis" FROM "indy_500_results" WHERE "engine"='offy' AND "finish"='25th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"entrant" text
);
Question: What is the finish of Mclaren chassis?
<|assistant|>
SELECT "finish" FROM "indy_500_results" WHERE "chassis"='mclaren';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "title_history" (
"wrestlers" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
Question: Name the wrestlers with days held of 428
<|assistant|>
SELECT "wrestlers" FROM "title_history" WHERE "days_held"='428';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "title_history" (
"wrestlers" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
Question: Name the wrestlers for days held of 69
<|assistant|>
SELECT "wrestlers" FROM "title_history" WHERE "days_held"='69';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_22_15_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which opponent has a Surface of clay, an Outcome of winner, a Tournament of bogotá, and a Score of 6–0, 6–4?
<|assistant|>
SELECT "opponent" FROM "singles_22_15_7" WHERE "surface"='clay' AND "outcome"='winner' AND "tournament"='bogotá' AND "score"='6–0, 6–4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_22_15_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which opponent has a Score of 6–4, 3–6, 6–3?
<|assistant|>
SELECT "opponent" FROM "singles_22_15_7" WHERE "score"='6–4, 3–6, 6–3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_22_15_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What is the score for 04 september 2006?
<|assistant|>
SELECT "score" FROM "singles_22_15_7" WHERE "date"='04 september 2006';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_22_15_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which Tournament has a Score of 4-6 6-2 6-1?
<|assistant|>
SELECT "tournament" FROM "singles_22_15_7" WHERE "score"='4-6 6-2 6-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_22_15_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which outcome has a Surface of clay and a Score of 4–6, 7–5, 2–6?
<|assistant|>
SELECT "outcome" FROM "singles_22_15_7" WHERE "surface"='clay' AND "score"='4–6, 7–5, 2–6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_22_15_7" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What date was versmold?
<|assistant|>
SELECT "date" FROM "singles_22_15_7" WHERE "tournament"='versmold';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_record" (
"season" text,
"competition" text,
"round" text,
"opponents" text,
"home_leg" text,
"away_leg" text,
"aggregate" text
);
Question: Name the competition for motherwell opponents
<|assistant|>
SELECT "competition" FROM "european_record" WHERE "opponents"='motherwell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_record" (
"season" text,
"competition" text,
"round" text,
"opponents" text,
"home_leg" text,
"away_leg" text,
"aggregate" text
);
Question: Name the home leg for uefa europa league and round of q1 with opponents of motherwell
<|assistant|>
SELECT "home_leg" FROM "european_record" WHERE "competition"='uefa europa league' AND "round"='q1' AND "opponents"='motherwell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_record" (
"season" text,
"competition" text,
"round" text,
"opponents" text,
"home_leg" text,
"away_leg" text,
"aggregate" text
);
Question: Name the aggregate with opponents of tauras
<|assistant|>
SELECT "aggregate" FROM "european_record" WHERE "opponents"='tauras';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What date was 53-75 recorded?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='53-75';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Overall of 62 is what average round?
<|assistant|>
SELECT AVG("round") FROM "indianapolis_colts_draft_history" WHERE "overall"=62;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: College of san diego state, and a Pick # smaller than 30 is what lowest overall?
<|assistant|>
SELECT MIN("overall") FROM "indianapolis_colts_draft_history" WHERE "college"='san diego state' AND "pick_num"<30;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: College of san diego state, and a Pick # smaller than 30 has what lowest overall?
<|assistant|>
SELECT MIN("overall") FROM "indianapolis_colts_draft_history" WHERE "college"='san diego state' AND "pick_num"<30;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm" (
"station" text,
"frequency" real,
"network_affiliation" text,
"format" text,
"city_of_license" text,
"status" text
);
Question: Which city of license has an independent network affiliation, a variety format and is station KKUP?
<|assistant|>
SELECT "city_of_license" FROM "fm" WHERE "network_affiliation"='independent' AND "format"='variety' AND "station"='kkup';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm" (
"station" text,
"frequency" real,
"network_affiliation" text,
"format" text,
"city_of_license" text,
"status" text
);
Question: What is the status of the independent station KPFB?
<|assistant|>
SELECT "status" FROM "fm" WHERE "network_affiliation"='independent' AND "station"='kpfb';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.