text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" text
);
Question: What was the value of 1st prize when the score was 271 (-9)?
<|assistant|>
SELECT "1st_prize" FROM "tournament_results" WHERE "score"='271 (-9)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" text
);
Question: What day was the score 200 (-16)?
<|assistant|>
SELECT "date" FROM "tournament_results" WHERE "score"='200 (-16)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" text
);
Question: Where was Outback Steakhouse Pro-AM held?
<|assistant|>
SELECT "location" FROM "tournament_results" WHERE "tournament"='Outback Steakhouse Pro-Am';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "chhattisgarh_result" (
"state" text,
"date_of_polls" text,
"seats_a_cs" real,
"date_of_counting" text,
"incumbent" text,
"election_winner" text
);
Question: Which dates of polls occur in the Mizoram state?
<|assistant|>
SELECT "date_of_polls" FROM "chhattisgarh_result" WHERE "state"='Mizoram';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "chhattisgarh_result" (
"state" text,
"date_of_polls" text,
"seats_a_cs" real,
"date_of_counting" text,
"incumbent" text,
"election_winner" text
);
Question: How many dates of polls occur in the Madhya Pradesh state?
<|assistant|>
SELECT COUNT("date_of_polls") FROM "chhattisgarh_result" WHERE "state"='Madhya Pradesh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" real
);
Question: How many under the category of Against have a Difference of 11
<|assistant|>
SELECT COUNT("against") FROM "campeonato_paulista" WHERE "difference"=11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" real
);
Question: if Against is 20 how much is Won?
<|assistant|>
SELECT "won" FROM "campeonato_paulista" WHERE "against"=20;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" real
);
Question: How many Drawn does the team Portuguesa Santista have?
<|assistant|>
SELECT "drawn" FROM "campeonato_paulista" WHERE "team"='Portuguesa Santista';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" real
);
Question: If the difference is 11 how much is for?
<|assistant|>
SELECT MAX("for") FROM "campeonato_paulista" WHERE "difference"=11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" real
);
Question: How many drawn does the team Corinthians have?
<|assistant|>
SELECT "drawn" FROM "campeonato_paulista" WHERE "team"='Corinthians';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: What is the highest number won with a difference of 1?
<|assistant|>
SELECT MAX("won") FROM "campeonato_paulista" WHERE "difference"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: What the highest position when there is 28 against?
<|assistant|>
SELECT MAX("position") FROM "campeonato_paulista" WHERE "against"=28;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: What is the highest number won when the number of points is 31?
<|assistant|>
SELECT MAX("won") FROM "campeonato_paulista" WHERE "points"=31;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: What is the smalledt position when the difference was 6?
<|assistant|>
SELECT MIN("position") FROM "campeonato_paulista" WHERE "difference"='6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_ratings" (
"season" real,
"num_of_episodes" real,
"timeslot" text,
"season_premiere" text,
"season_final" text,
"peak_audience" real,
"average_audience" real,
"average_nightly_rank" text,
"average_weekly_rank" text,
"average_yearly_ranking" text
);
Question: How many were the show's average weekly ranking when it reached No. 2 in average nightly ranking?
<|assistant|>
SELECT COUNT("average_weekly_rank") FROM "series_ratings" WHERE "average_nightly_rank"='No. 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_ratings" (
"season" real,
"num_of_episodes" real,
"timeslot" text,
"season_premiere" text,
"season_final" text,
"peak_audience" real,
"average_audience" real,
"average_nightly_rank" text,
"average_weekly_rank" text,
"average_yearly_ranking" text
);
Question: What is the show's time slot during season 3?
<|assistant|>
SELECT "timeslot" FROM "series_ratings" WHERE "season"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scoring_format" (
"from" real,
"to" real,
"goal" real,
"round_1" text,
"round_2" text,
"round_3" text,
"round_4" text,
"round_5" text,
"round_6" text
);
Question: What are all the round 3's after 1982?
<|assistant|>
SELECT "round_3" FROM "scoring_format" WHERE "from"=1982;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scoring_format" (
"from" real,
"to" real,
"goal" real,
"round_1" text,
"round_2" text,
"round_3" text,
"round_4" text,
"round_5" text,
"round_6" text
);
Question: What are all the round 5's where round 6 and up is double?
<|assistant|>
SELECT "round_5" FROM "scoring_format" WHERE "round_6"='Double';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scoring_format" (
"from" real,
"to" real,
"goal" real,
"round_1" text,
"round_2" text,
"round_3" text,
"round_4" text,
"round_5" text,
"round_6" text
);
Question: What is the maximum goal after 1979?
<|assistant|>
SELECT MAX("goal") FROM "scoring_format" WHERE "from"=1979;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"2000" text,
"january" text,
"february" text,
"march" text,
"april" text,
"may" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name all of the february
<|assistant|>
SELECT "february" FROM "2000s";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"2000" text,
"january" text,
"february" text,
"march" text,
"april" text,
"may" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the junes
<|assistant|>
SELECT "june" FROM "2000s";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"2000" text,
"january" text,
"february" text,
"march" text,
"april" text,
"may" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the julys
<|assistant|>
SELECT "july" FROM "2000s";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"2000" text,
"january" text,
"february" text,
"march" text,
"april" text,
"may" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the number of februaries
<|assistant|>
SELECT COUNT("february") FROM "2000s";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"2000" text,
"january" text,
"february" text,
"march" text,
"april" text,
"may" text,
"june" text,
"july" text,
"august" text,
"september" text,
"october" text,
"november" text,
"december" text
);
Question: Name the february
<|assistant|>
SELECT "february" FROM "2000s";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apea_s_campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: How many points are listed when the position is 2?
<|assistant|>
SELECT MAX("points") FROM "apea_s_campeonato_paulista" WHERE "position"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apea_s_campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: When there is a lost of 2 what is the mumber drawn?
<|assistant|>
SELECT MAX("drawn") FROM "apea_s_campeonato_paulista" WHERE "lost"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apea_s_campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: How many games are played?
<|assistant|>
SELECT MIN("played") FROM "apea_s_campeonato_paulista";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apea_s_campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: When the position is 2 what is the number lost?
<|assistant|>
SELECT MIN("lost") FROM "apea_s_campeonato_paulista" WHERE "position"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apea_s_campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: When the team is ypiranga-sp what is the number of won games?
<|assistant|>
SELECT MIN("won") FROM "apea_s_campeonato_paulista" WHERE "team"='Ypiranga-SP';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15400878_1" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: Name the lease for when points is 19
<|assistant|>
SELECT MIN("for") FROM "table1_15400878_1" WHERE "points"=19;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15400878_1" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: Name the difference for when drawn is larger than 2.0
<|assistant|>
SELECT "difference" FROM "table1_15400878_1" WHERE "drawn">2.0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15400878_1" (
"position" real,
"team" text,
"points" real,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" text
);
Question: Name the most against for minas gerais
<|assistant|>
SELECT MAX("against") FROM "table1_15400878_1" WHERE "team"='Minas Gerais';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: What is the LMS class of trains with numbers 14510-5?
<|assistant|>
SELECT "lms_class" FROM "peter_drummond_1911_1918" WHERE "lms_nos"='14510-5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: What is the date of the 279 wheels?
<|assistant|>
SELECT "date" FROM "peter_drummond_1911_1918" WHERE "wheels"=279;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: What is the class when the LMS class is 3F?
<|assistant|>
SELECT "class" FROM "peter_drummond_1911_1918" WHERE "lms_class"='3F';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: What is the LMS number of the trains built by G&SWR Kilmarnock?
<|assistant|>
SELECT "lms_nos" FROM "peter_drummond_1911_1918" WHERE "builder"='G&SWR Kilmarnock';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: How many figures are there for wheels for LMS numbers 16377-9?
<|assistant|>
SELECT COUNT("wheels") FROM "peter_drummond_1911_1918" WHERE "lms_nos"='16377-9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: What is the builder of the train with LMS Class 3f?
<|assistant|>
SELECT "builder" FROM "peter_drummond_1911_1918" WHERE "lms_class"='3F';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_1_historical_storms_and_the_chi_19" (
"name" text,
"year" real,
"landfall" text,
"nhc_advisory_number" text,
"v_mph" real,
"r_miles" real,
"saffir_simpson_category" real,
"chi" text
);
Question: What is the maximum number for the Saffir-Simpson category in the Carvill Hurricane Index?
<|assistant|>
SELECT MAX("saffir_simpson_category") FROM "table_1_historical_storms_and_the_chi_19";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_1_historical_storms_and_the_chi_19" (
"name" text,
"year" real,
"landfall" text,
"nhc_advisory_number" text,
"v_mph" real,
"r_miles" real,
"saffir_simpson_category" real,
"chi" text
);
Question: What is the maximum miles per hour recorded when the CHI (Carvill Hurricane Index) is equal to 13.5
<|assistant|>
SELECT MAX("v_mph") FROM "table_1_historical_storms_and_the_chi_19" WHERE "chi"='13.5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_1_historical_storms_and_the_chi_19" (
"name" text,
"year" real,
"landfall" text,
"nhc_advisory_number" text,
"v_mph" real,
"r_miles" real,
"saffir_simpson_category" real,
"chi" text
);
Question: What is the CHI (Carvill Hurricane Index) when the NHC advisory number is equal to 49b?
<|assistant|>
SELECT "chi" FROM "table_1_historical_storms_and_the_chi_19" WHERE "nhc_advisory_number"='49B';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_1_historical_storms_and_the_chi_19" (
"name" text,
"year" real,
"landfall" text,
"nhc_advisory_number" text,
"v_mph" real,
"r_miles" real,
"saffir_simpson_category" real,
"chi" text
);
Question: What is the maximum number of miles reached in a Texas landfall when the Saffir-Simpson category is smaller than 3.0?
<|assistant|>
SELECT MAX("r_miles") FROM "table_1_historical_storms_and_the_chi_19" WHERE "landfall"='Texas' AND "saffir_simpson_category"<3.0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_1_historical_storms_and_the_chi_19" (
"name" text,
"year" real,
"landfall" text,
"nhc_advisory_number" text,
"v_mph" real,
"r_miles" real,
"saffir_simpson_category" real,
"chi" text
);
Question: What are the miles when the Carvill Hurricane Index (CHI) is equal to 9.9?
<|assistant|>
SELECT "r_miles" FROM "table_1_historical_storms_and_the_chi_19" WHERE "chi"='9.9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_1_historical_storms_and_the_chi_19" (
"name" text,
"year" real,
"landfall" text,
"nhc_advisory_number" text,
"v_mph" real,
"r_miles" real,
"saffir_simpson_category" real,
"chi" text
);
Question: What is the Saffir-Simpson category for the hurricane named Bonnie?
<|assistant|>
SELECT "saffir_simpson_category" FROM "table_1_historical_storms_and_the_chi_19" WHERE "name"='Bonnie';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15417439_1" (
"genus_species" text,
"common_name" text,
"accession_number" text,
"length" text,
"similarity" text,
"identity" text
);
Question: What kind of animal corresponds to the accession number xp_852505.1?
<|assistant|>
SELECT "common_name" FROM "table1_15417439_1" WHERE "accession_number"='XP_852505.1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15417439_1" (
"genus_species" text,
"common_name" text,
"accession_number" text,
"length" text,
"similarity" text,
"identity" text
);
Question: How similar is the genus/species sus scrofa?
<|assistant|>
SELECT "similarity" FROM "table1_15417439_1" WHERE "genus_species"='Sus scrofa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15417439_1" (
"genus_species" text,
"common_name" text,
"accession_number" text,
"length" text,
"similarity" text,
"identity" text
);
Question: What identities do the genus/species arabidopsis thaliana have?
<|assistant|>
SELECT "identity" FROM "table1_15417439_1" WHERE "genus_species"='Arabidopsis thaliana';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15417439_1" (
"genus_species" text,
"common_name" text,
"accession_number" text,
"length" text,
"similarity" text,
"identity" text
);
Question: What's the animals name when the genus/species is rattus norvegicus?
<|assistant|>
SELECT "common_name" FROM "table1_15417439_1" WHERE "genus_species"='Rattus norvegicus';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15417439_1" (
"genus_species" text,
"common_name" text,
"accession_number" text,
"length" text,
"similarity" text,
"identity" text
);
Question: For the genus/species arabidopsis thaliana, what are the lengths?
<|assistant|>
SELECT "length" FROM "table1_15417439_1" WHERE "genus_species"='Arabidopsis thaliana';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15430813_1" (
"no_in_season" real,
"no_disc" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: How many original air dates were there for episode 17?
<|assistant|>
SELECT COUNT("original_air_date") FROM "table1_15430813_1" WHERE "no_in_season"=17;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15430813_1" (
"no_in_season" real,
"no_disc" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: When did the episode titled "Prisoners" first air?
<|assistant|>
SELECT "original_air_date" FROM "table1_15430813_1" WHERE "title"='\"Prisoners\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_of_largest_rogue_trader_losses" (
"name" text,
"country" text,
"date_s" real,
"loss" text,
"institution" text,
"market_activity" text,
"sentence" text
);
Question: Which company was based in London, United Kingdom?
<|assistant|>
SELECT "institution" FROM "table_of_largest_rogue_trader_losses" WHERE "country"='London, United Kingdom';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15431959_1" (
"no_in_season" real,
"no_disc" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: What was the original air date of Stargate SG-1 written by Peter Deluise?
<|assistant|>
SELECT "original_air_date" FROM "table1_15431959_1" WHERE "written_by"='Peter DeLuise';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15431959_1" (
"no_in_season" real,
"no_disc" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: How many seasons did Peter Deluise direct Stargate SG-1?
<|assistant|>
SELECT MAX("no_in_season") FROM "table1_15431959_1" WHERE "directed_by"='Peter DeLuise';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_15431959_1" (
"no_in_season" real,
"no_disc" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: Which number episode of season 6 was the title "Sight Unseen"?
<|assistant|>
SELECT MIN("no_in_season") FROM "table1_15431959_1" WHERE "title"='\"Sight Unseen\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Name the fifth district for william womer
<|assistant|>
SELECT "fifth_district" FROM "current_members" WHERE "third_district"='William Womer';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Name the third district for christine young
<|assistant|>
SELECT "third_district" FROM "current_members" WHERE "fifth_district"='Christine Young';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Name the fourth district for joan runnels
<|assistant|>
SELECT "fourth_district" FROM "current_members" WHERE "second_district"='Joan Runnels';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Name the fourth district for beverly bodem
<|assistant|>
SELECT "fourth_district" FROM "current_members" WHERE "first_district"='Beverly Bodem';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Name the number for fifth district for richard houskamp
<|assistant|>
SELECT COUNT("fifth_district") FROM "current_members" WHERE "third_district"='Richard Houskamp';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Name the fifth district for steve rudoni
<|assistant|>
SELECT "fifth_district" FROM "current_members" WHERE "fourth_district"='Steve Rudoni';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"locale" text,
"skip" text,
"w" real,
"l" real,
"pf" real,
"pa" real,
"ends_won" real,
"ends_lost" real,
"blank_ends" real,
"stolen_ends" real,
"shot_pct" text
);
Question: What was the top ends lost where the ends won 47?
<|assistant|>
SELECT MAX("ends_lost") FROM "standings" WHERE "ends_won"=47;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"locale" text,
"skip" text,
"w" real,
"l" real,
"pf" real,
"pa" real,
"ends_won" real,
"ends_lost" real,
"blank_ends" real,
"stolen_ends" real,
"shot_pct" text
);
Question: What was the location when the stolen ends is 12 and shot pct is 77%?
<|assistant|>
SELECT "locale" FROM "standings" WHERE "stolen_ends"=12 AND "shot_pct"='77%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"locale" text,
"skip" text,
"w" real,
"l" real,
"pf" real,
"pa" real,
"ends_won" real,
"ends_lost" real,
"blank_ends" real,
"stolen_ends" real,
"shot_pct" text
);
Question: How many stolen ends were there when the locale was Sweden?
<|assistant|>
SELECT "stolen_ends" FROM "standings" WHERE "locale"='Sweden';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" text,
"acquisition_via" text
);
Question: What was the school/club team whose season was in 2012 and were acquired via trade?
<|assistant|>
SELECT "school_club_team" FROM "s" WHERE "season"='2012' AND "acquisition_via"='Trade';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" text,
"acquisition_via" text
);
Question: Which school/club team has a player named Mark Sanford?
<|assistant|>
SELECT "school_club_team" FROM "s" WHERE "name"='Mark Sanford';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" text,
"acquisition_via" text
);
Question: How many school/club teams have a player named Manuel Luis Quezon?
<|assistant|>
SELECT COUNT("number") FROM "s" WHERE "school_club_team"='Manuel Luis Quezon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" text,
"acquisition_via" text
);
Question: How many players are listed for the school/club team Washington?
<|assistant|>
SELECT COUNT("name") FROM "s" WHERE "school_club_team"='Washington';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" text,
"acquisition_via" text
);
Question: How many players with a position are listed for the 2009 season?
<|assistant|>
SELECT COUNT("position") FROM "s" WHERE "season"='2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" real,
"acquisition_via" text
);
Question: Name the school/club for guard
<|assistant|>
SELECT "school_club_team" FROM "a" WHERE "position"='Guard';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a" (
"name" text,
"position" text,
"number" real,
"school_club_team" text,
"season" real,
"acquisition_via" text
);
Question: Name the position for judy-ann ramirez
<|assistant|>
SELECT "position" FROM "a" WHERE "name"='judy-ann ramirez';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points_difference" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What is the losing bonus for the team with a point difference of -99?
<|assistant|>
SELECT "losing_bonus" FROM "league_table" WHERE "points_difference"='-99';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points_difference" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many games played for teams with 277 points?
<|assistant|>
SELECT "played" FROM "league_table" WHERE "points_for"='277';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points_difference" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many games won for teams with 49 tries against?
<|assistant|>
SELECT "won" FROM "league_table" WHERE "tries_against"='49';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points_difference" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many teams have 62 tries against?
<|assistant|>
SELECT COUNT("points_difference") FROM "league_table" WHERE "tries_against"='62';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points_difference" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many tries for, for club cambrian welfare rfc?
<|assistant|>
SELECT "tries_for" FROM "league_table" WHERE "club"='Cambrian Welfare RFC';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"points_difference" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many teams have 21 tries for?
<|assistant|>
SELECT COUNT("points_difference") FROM "league_table" WHERE "tries_for"='21';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "entries" (
"no" real,
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text
);
Question: How many chassis used number 34?
<|assistant|>
SELECT COUNT("chassis") FROM "entries" WHERE "no"=34;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "entries" (
"no" real,
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text
);
Question: Who was the constructor of car 22?
<|assistant|>
SELECT "constructor" FROM "entries" WHERE "no"=22;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "entries" (
"no" real,
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text
);
Question: How many cars used number 48?
<|assistant|>
SELECT COUNT("engine") FROM "entries" WHERE "no"=48;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "entries" (
"no" real,
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text
);
Question: Who drove car 44?
<|assistant|>
SELECT "driver" FROM "entries" WHERE "no"=44;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_doubles_finals_15_7_8" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Name the total number of years where runner-up and championship is us open
<|assistant|>
SELECT COUNT("year") FROM "mixed_doubles_finals_15_7_8" WHERE "outcome"='Runner-up' AND "championship"='US Open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_doubles_finals_15_7_8" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Name the surfaace where outcome is runner-up and championship is us open
<|assistant|>
SELECT "surface" FROM "mixed_doubles_finals_15_7_8" WHERE "outcome"='Runner-up' AND "championship"='US Open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_doubles_finals_15_7_8" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Name the partner for mark woodforde martina navratilova
<|assistant|>
SELECT "partner" FROM "mixed_doubles_finals_15_7_8" WHERE "opponents"='Mark Woodforde Martina Navratilova';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_doubles_finals_15_7_8" (
"outcome" text,
"year" real,
"championship" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: Name the score for rick leach zina garrison
<|assistant|>
SELECT "score" FROM "mixed_doubles_finals_15_7_8" WHERE "opponents"='Rick Leach Zina Garrison';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_scores" (
"state" text,
"preliminary_average" text,
"interview" text,
"swimsuit" text,
"evening_gown" text,
"semifinal_average" text
);
Question: Name the swimsuit for arizona
<|assistant|>
SELECT "swimsuit" FROM "semifinal_scores" WHERE "state"='Arizona';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_f3_challenge" (
"pos" real,
"driver" text,
"qualifying" real,
"race_1" text,
"race_2" text,
"race_3" text,
"points" real
);
Question: Name the driver for race 2 7
<|assistant|>
SELECT "driver" FROM "indy_f3_challenge" WHERE "race_2"='7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_f3_challenge" (
"pos" real,
"driver" text,
"qualifying" real,
"race_1" text,
"race_2" text,
"race_3" text,
"points" real
);
Question: Name the total number of qualifiying for race 3 being 3
<|assistant|>
SELECT COUNT("qualifying") FROM "indy_f3_challenge" WHERE "race_3"='3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_f3_challenge" (
"pos" real,
"driver" text,
"qualifying" real,
"race_1" text,
"race_2" text,
"race_3" text,
"points" real
);
Question: Name the driver for race 2 2
<|assistant|>
SELECT "driver" FROM "indy_f3_challenge" WHERE "race_2"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_f3_challenge" (
"pos" real,
"driver" text,
"qualifying" real,
"race_1" text,
"race_2" text,
"race_3" text,
"points" real
);
Question: Name the race 1 when race 3 is 8
<|assistant|>
SELECT "race_1" FROM "indy_f3_challenge" WHERE "race_3"='8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_f3_challenge" (
"pos" real,
"driver" text,
"qualifying" real,
"race_1" text,
"race_2" text,
"race_3" text,
"points" real
);
Question: Name the race 2 for james winslow
<|assistant|>
SELECT "race_2" FROM "indy_f3_challenge" WHERE "driver"='James Winslow';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_f3_challenge" (
"pos" real,
"driver" text,
"qualifying" real,
"race_1" text,
"race_2" text,
"race_3" text,
"points" real
);
Question: Name the total number of positions for race 1 being 2
<|assistant|>
SELECT COUNT("pos") FROM "indy_f3_challenge" WHERE "race_1"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "full_series_results" (
"rd" real,
"race" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text,
"report" text
);
Question: Did the race get reported where the winning team was Newman Wachs racing and the pole belonged to Carl Skerlong
<|assistant|>
SELECT "report" FROM "full_series_results" WHERE "pole_position"='Carl Skerlong' AND "winning_team"='Newman Wachs Racing';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "full_series_results" (
"rd" real,
"race" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text,
"report" text
);
Question: Did the round 8 race get reported
<|assistant|>
SELECT "report" FROM "full_series_results" WHERE "rd"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "full_series_results" (
"rd" real,
"race" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text,
"report" text
);
Question: Which race was the winning team mathiasen motorsports and the pole belonged to jonathan bomarito
<|assistant|>
SELECT "race" FROM "full_series_results" WHERE "winning_team"='Mathiasen Motorsports' AND "pole_position"='Jonathan Bomarito';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "full_series_results" (
"rd" real,
"race" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text,
"report" text
);
Question: how many winners were in round 8
<|assistant|>
SELECT COUNT("winning_driver") FROM "full_series_results" WHERE "rd"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "afternoon" (
"time" text,
"12_00_pm" text,
"01_00_pm" text,
"02_00_pm" text,
"03_00_pm" text,
"04_00_pm" text,
"05_00_pm" text,
"05_55_pm" text
);
Question: How many episodes air on Wednesday at 12:00pm?
<|assistant|>
SELECT COUNT("12_00_pm") FROM "afternoon" WHERE "time"='Wednesday';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "afternoon" (
"time" text,
"12_00_pm" text,
"01_00_pm" text,
"02_00_pm" text,
"03_00_pm" text,
"04_00_pm" text,
"05_00_pm" text,
"05_55_pm" text
);
Question: What are the names of the episodes that airs at 2:00pm?
<|assistant|>
SELECT "02_00_pm" FROM "afternoon";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "afternoon" (
"time" text,
"12_00_pm" text,
"01_00_pm" text,
"02_00_pm" text,
"03_00_pm" text,
"04_00_pm" text,
"05_00_pm" text,
"05_55_pm" text
);
Question: What is the name of the show that airs Friday at 5:55pm?
<|assistant|>
SELECT "05_55_pm" FROM "afternoon" WHERE "time"='Friday';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "night" (
"time" text,
"06_00_pm" text,
"07_00_pm" text,
"08_00_pm" text,
"09_00_pm" text,
"10_00_pm" text,
"10_30_pm" text,
"11_00_pm" text
);
Question: Name the 10 pm for thursday
<|assistant|>
SELECT "10_00_pm" FROM "night" WHERE "time"='Thursday';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.