text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sandy_bridge_quad_core_32_nm" (
"model_number" text,
"s_spec_number" text,
"cores" text,
"frequency" text,
"turbo" text,
"l2_cache" text,
"l3_cache" text,
"gpu_model" text,
"gpu_frequency" text,
"socket" text,
"i_o_bus" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
Question: What is the release price for the GPU frequency of standard power, embedded?
<|assistant|>
SELECT "release_price_usd" FROM "sandy_bridge_quad_core_32_nm" WHERE "gpu_frequency"='standard power, embedded';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sandy_bridge_quad_core_32_nm" (
"model_number" text,
"s_spec_number" text,
"cores" text,
"frequency" text,
"turbo" text,
"l2_cache" text,
"l3_cache" text,
"gpu_model" text,
"gpu_frequency" text,
"socket" text,
"i_o_bus" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
Question: What is the socked when the turbo is 8/8/10/11?
<|assistant|>
SELECT "socket" FROM "sandy_bridge_quad_core_32_nm" WHERE "turbo"='8/8/10/11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: Which round did the bout that led to a 1-0 record end in?
<|assistant|>
SELECT "round" FROM "mixed_martial_arts_record" WHERE "record"='1-0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: Which Time has a Lane smaller than 2, and a Nationality of spain?
<|assistant|>
SELECT "time" FROM "heats" WHERE "lane"<2 AND "nationality"='spain';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: How many Heats have a Name of miguel molina?
<|assistant|>
SELECT COUNT("heat") FROM "heats" WHERE "name"='miguel molina';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_standings" (
"year" text,
"league" text,
"position" text,
"leading_scorer" text,
"fa_cup" text,
"fa_trophy" text
);
Question: what is the league when the fa cup is qr4 and the fa trophy is qf?
<|assistant|>
SELECT "league" FROM "league_standings" WHERE "fa_cup"='qr4' AND "fa_trophy"='qf';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_standings" (
"year" text,
"league" text,
"position" text,
"leading_scorer" text,
"fa_cup" text,
"fa_trophy" text
);
Question: what is the fa trophy when the leading scorer is lee gregory (8)?
<|assistant|>
SELECT "fa_trophy" FROM "league_standings" WHERE "leading_scorer"='lee gregory (8)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_standings" (
"year" text,
"league" text,
"position" text,
"leading_scorer" text,
"fa_cup" text,
"fa_trophy" text
);
Question: what is the year when the position is 1/22 promoted and the leading scorer is james dean (27)?
<|assistant|>
SELECT "year" FROM "league_standings" WHERE "position"='1/22 promoted' AND "leading_scorer"='james dean (27)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: When the Altrincham was the home team what was the tie no?
<|assistant|>
SELECT "tie_no" FROM "third_round" WHERE "home_team"='altrincham';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: Crawley Town as the home team has what as the tie no?
<|assistant|>
SELECT "tie_no" FROM "third_round" WHERE "home_team"='crawley town';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the nationality of the swimmer with a rank over 2 with a time of 55.77?
<|assistant|>
SELECT "nationality" FROM "heats" WHERE "rank">2 AND "time"='55.77';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the earliest heat with a finisher from the Czech Republic and a rank over 41?
<|assistant|>
SELECT MIN("heat") FROM "heats" WHERE "nationality"='czech republic' AND "rank">41;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the total number of heats with a finisher named Gregor Tait in lanes over 6?
<|assistant|>
SELECT COUNT("heat") FROM "heats" WHERE "name"='gregor tait' AND "lane">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the time of the swimmer in rank 40?
<|assistant|>
SELECT "time" FROM "heats" WHERE "rank"=40;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1943" (
"title" text,
"series" text,
"director" text,
"release_date" text,
"reissue" text
);
Question: From what series was Tokio Jokio, directed by Norm McCabe?
<|assistant|>
SELECT "series" FROM "1943" WHERE "director"='norm mccabe' AND "title"='tokio jokio';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1943" (
"title" text,
"series" text,
"director" text,
"release_date" text,
"reissue" text
);
Question: When was Inki and the Minah Bird released?
<|assistant|>
SELECT "release_date" FROM "1943" WHERE "title"='inki and the minah bird';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1945" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: From what series is Peck Up Your Troubles?
<|assistant|>
SELECT "series" FROM "1945" WHERE "title"='peck up your troubles';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "historical_rankings" (
"year" real,
"political_rights" real,
"civil_liberties" real,
"status" text,
"president" text
);
Question: When the president was Yoweri Museveni, and the year was 1993, with rank of 6 under political rights, what was the total of civil liberties?
<|assistant|>
SELECT SUM("civil_liberties") FROM "historical_rankings" WHERE "political_rights"=6 AND "president"='yoweri museveni' AND "year"=1993;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "historical_rankings" (
"year" real,
"political_rights" real,
"civil_liberties" real,
"status" text,
"president" text
);
Question: What is the year average when not free was the status, and less than 7 was the civil liberties, and less than 6 political rights?
<|assistant|>
SELECT AVG("year") FROM "historical_rankings" WHERE "status"='not free' AND "civil_liberties"<7 AND "political_rights"<6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "historical_rankings" (
"year" real,
"political_rights" real,
"civil_liberties" real,
"status" text,
"president" text
);
Question: What is the least political rights rank in 1976?
<|assistant|>
SELECT MIN("political_rights") FROM "historical_rankings" WHERE "year"=1976;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: What is average ratings for Japanese title of ホタルノヒカリ, with episodes larger than 9?
<|assistant|>
SELECT "average_ratings" FROM "2007_summer_season" WHERE "episodes">9 AND "japanese_title"='ホタルノヒカリ';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: Which episodes has the lowest average ratings of 8.7%?
<|assistant|>
SELECT MIN("episodes") FROM "2007_summer_season" WHERE "average_ratings"='8.7%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: Which romaji title, has Japanese title of 菊次郎とさき 3?
<|assistant|>
SELECT "romaji_title" FROM "2007_summer_season" WHERE "japanese_title"='菊次郎とさき 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2007_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: Which TV station, has romaji title of tantei gakuen q and episodes larger than 10?
<|assistant|>
SELECT "tv_station" FROM "2007_summer_season" WHERE "episodes">10 AND "romaji_title"='tantei gakuen q';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"sergey_filimonov_kaz" text,
"173kg" text,
"almaty_kazakhstan" text
);
Question: What is the snatch for the person holding the Olympic record, and 173kg of 172kg?
<|assistant|>
SELECT "snatch" FROM "records" WHERE "world_record"='olympic record' AND "173kg"='172kg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"sergey_filimonov_kaz" text,
"173kg" text,
"almaty_kazakhstan" text
);
Question: What is the Almaty, Kazakhstan when Sergey Filimonov ( KAZ ) is 210kg?
<|assistant|>
SELECT "almaty_kazakhstan" FROM "records" WHERE "sergey_filimonov_kaz"='210kg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"sergey_filimonov_kaz" text,
"173kg" text,
"almaty_kazakhstan" text
);
Question: What shows for Sergey Filimonov (KAZ) when the Snatch shows snatch?
<|assistant|>
SELECT "sergey_filimonov_kaz" FROM "records" WHERE "snatch"='snatch';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"sergey_filimonov_kaz" text,
"173kg" text,
"almaty_kazakhstan" text
);
Question: What is the Almaty, Kazakhstan when the Sergey Filimonov (KAZ) is 210kg?
<|assistant|>
SELECT "almaty_kazakhstan" FROM "records" WHERE "sergey_filimonov_kaz"='210kg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What is the total weeks with more 56,134 attendees against the minnesota vikings?
<|assistant|>
SELECT SUM("week") FROM "schedule" WHERE "attendance">'56,134' AND "opponent"='minnesota vikings';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television_series" (
"year" real,
"chinese_title" text,
"english" text,
"role" text,
"character" text
);
Question: What year was the main role a character named Guan Yu (關羽)?
<|assistant|>
SELECT MIN("year") FROM "television_series" WHERE "role"='main' AND "character"='guan yu (關羽)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television_series" (
"year" real,
"chinese_title" text,
"english" text,
"role" text,
"character" text
);
Question: What is the English character for Lin Ming Kuan (林明寬)?
<|assistant|>
SELECT "english" FROM "television_series" WHERE "character"='lin ming kuan (林明寬)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television_series" (
"year" real,
"chinese_title" text,
"english" text,
"role" text,
"character" text
);
Question: What character has a Year larger than 2010 with a lead role, and Chinese Title of 戀夏38℃?
<|assistant|>
SELECT "character" FROM "television_series" WHERE "year">2010 AND "role"='lead role' AND "chinese_title"='戀夏38℃';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television_series" (
"year" real,
"chinese_title" text,
"english" text,
"role" text,
"character" text
);
Question: What is the year that has a character named Wu Ji Wei (無極威)?
<|assistant|>
SELECT AVG("year") FROM "television_series" WHERE "character"='wu ji wei (無極威)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "kickboxing_record" (
"result" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
Question: Which Round has an Opponent of aleksandr pitchkounov?
<|assistant|>
SELECT MIN("round") FROM "kickboxing_record" WHERE "opponent"='aleksandr pitchkounov';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "kickboxing_record" (
"result" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"location" text
);
Question: Which Result has a Round of 5, and an Event of mt one?
<|assistant|>
SELECT "result" FROM "kickboxing_record" WHERE "round"=5 AND "event"='mt one';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1948_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: Mortlake club has more than 924 against, less than 14 losses, and how many total draws?
<|assistant|>
SELECT COUNT("draws") FROM "1948_ladder" WHERE "against">924 AND "club"='mortlake' AND "losses"<14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1948_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the total number of wins for Cobden club when there are more than 2 draws?
<|assistant|>
SELECT SUM("wins") FROM "1948_ladder" WHERE "club"='cobden' AND "draws">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1948_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: When against is 797 and wins is more than 10, what is the sum of draws?
<|assistant|>
SELECT COUNT("draws") FROM "1948_ladder" WHERE "against"=797 AND "wins">10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1948_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: Club warrnambool has less than 9 wins and what average of draws?
<|assistant|>
SELECT AVG("draws") FROM "1948_ladder" WHERE "wins"<9 AND "club"='warrnambool';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1948_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the average number of draws for Mortlake club when they have less than 0 wins?
<|assistant|>
SELECT AVG("draws") FROM "1948_ladder" WHERE "club"='mortlake' AND "wins"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "subdivisions" (
"name" text,
"geographic_code" text,
"type" text,
"households" real,
"population_2004" real,
"foreign_population" real,
"moroccan_population" real
);
Question: Which Foreign population has a Population (2004) larger than 234733?
<|assistant|>
SELECT AVG("foreign_population") FROM "subdivisions" WHERE "population_2004">234733;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "subdivisions" (
"name" text,
"geographic_code" text,
"type" text,
"households" real,
"population_2004" real,
"foreign_population" real,
"moroccan_population" real
);
Question: Which Population (2004) has a Moroccan population larger than 234506?
<|assistant|>
SELECT AVG("population_2004") FROM "subdivisions" WHERE "moroccan_population">234506;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cup" (
"round" text,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" text,
"report" text
);
Question: What date was the opponent VFL Sindelfingen?
<|assistant|>
SELECT "date" FROM "cup" WHERE "opponent"='vfl sindelfingen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cup" (
"round" text,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" text,
"report" text
);
Question: What date was the attendance 1,804?
<|assistant|>
SELECT "date" FROM "cup" WHERE "attendance"='1,804';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cup" (
"round" text,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" text,
"report" text
);
Question: Who was the opponent with an attendance of 628?
<|assistant|>
SELECT "opponent" FROM "cup" WHERE "attendance"='628';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_1_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: What bike has a grid greater than 17, laps less than 8, with milos cihak as the rider?
<|assistant|>
SELECT "bike" FROM "superbike_race_1_classification" WHERE "grid">17 AND "laps"<8 AND "rider"='milos cihak';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_1_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: What is the highest grid that has gregorio lavilla as the rider?
<|assistant|>
SELECT MAX("grid") FROM "superbike_race_1_classification" WHERE "rider"='gregorio lavilla';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_1_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: What rider has laps less than 20, a ducati 1098 rs 08 as the bike, with accident as the time, and a grid less than 14?
<|assistant|>
SELECT "rider" FROM "superbike_race_1_classification" WHERE "laps"<20 AND "bike"='ducati 1098 rs 08' AND "time"='accident' AND "grid"<14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"career" text,
"matches" real,
"overs" real,
"maidens" real,
"runs" real,
"wickets" real,
"average" real,
"best" text
);
Question: How many overs when there are 5231 runs and fewer than 37 matches?
<|assistant|>
SELECT SUM("overs") FROM "references" WHERE "runs"=5231 AND "matches"<37;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"career" text,
"matches" real,
"overs" real,
"maidens" real,
"runs" real,
"wickets" real,
"average" real,
"best" text
);
Question: What are the fewest wickets when player's career spanned 1946-1960 and maidens were more than 419?
<|assistant|>
SELECT MIN("wickets") FROM "references" WHERE "career"='1946-1960' AND "maidens">419;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"career" text,
"matches" real,
"overs" real,
"maidens" real,
"runs" real,
"wickets" real,
"average" real,
"best" text
);
Question: What is the largest number of wickets when there are more than 630 maidens and a best of 7/72?
<|assistant|>
SELECT MAX("wickets") FROM "references" WHERE "maidens">630 AND "best"='7/72';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"career" text,
"matches" real,
"overs" real,
"maidens" real,
"runs" real,
"wickets" real,
"average" real,
"best" text
);
Question: Who has fewer than 2047.3 overs, more than 200 wickets and an average of 29.02?
<|assistant|>
SELECT "name" FROM "references" WHERE "overs"<2047.3 AND "wickets">200 AND "average">29.02;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_played" (
"season" text,
"date" text,
"venue" text,
"competition" text,
"score" text,
"attendance" real,
"report" text
);
Question: How many people attended the Scottish Cup on 29.02.2000?
<|assistant|>
SELECT "attendance" FROM "matches_played" WHERE "competition"='scottish cup' AND "date"='29.02.2000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_played" (
"season" text,
"date" text,
"venue" text,
"competition" text,
"score" text,
"attendance" real,
"report" text
);
Question: What was the score of the league cup in the 2007-08 season?
<|assistant|>
SELECT "score" FROM "matches_played" WHERE "competition"='league cup' AND "season"='2007-08';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "matches_played" (
"season" text,
"date" text,
"venue" text,
"competition" text,
"score" text,
"attendance" real,
"report" text
);
Question: What is the attendance in the game in the 2010-11 season, when the score was 2–0?
<|assistant|>
SELECT MIN("attendance") FROM "matches_played" WHERE "season"='2010-11' AND "score"='2–0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_softball_league_1951_to_19" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What team was in 1st plate in a year later than 1956?
<|assistant|>
SELECT "1st_place_team" FROM "international_softball_league_1951_to_19" WHERE "year">1956;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_softball_league_1951_to_19" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What location hosted when the National Cash Register, Dayton, Oh was in 4th place in 1957?
<|assistant|>
SELECT "host_location" FROM "international_softball_league_1951_to_19" WHERE "4th_place_team"='national cash register, dayton, oh' AND "year"=1957;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_softball_league_1951_to_19" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What year were the Hoak Packers, Fresno, CA the 4th Place Team?
<|assistant|>
SELECT MIN("year") FROM "international_softball_league_1951_to_19" WHERE "4th_place_team"='hoak packers, fresno, ca';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_softball_league_1951_to_19" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What location hosted when Wells Motors, Greeley, Co was the 4th place team?
<|assistant|>
SELECT "host_location" FROM "international_softball_league_1951_to_19" WHERE "4th_place_team"='wells motors, greeley, co';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_softball_league_1951_to_19" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What year was the 1st Place Team the Hoak Packers, Fresno, CA, and 4th Place was Wells Motors, Greeley, Co?
<|assistant|>
SELECT MAX("year") FROM "international_softball_league_1951_to_19" WHERE "1st_place_team"='hoak packers, fresno, ca' AND "4th_place_team"='wells motors, greeley, co';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_softball_league_1951_to_19" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What year was the 4th Place Team of the Wyoming Angus, Johnstown, Co?
<|assistant|>
SELECT COUNT("year") FROM "international_softball_league_1951_to_19" WHERE "4th_place_team"='wyoming angus, johnstown, co';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
Question: Which base has a company of Theatro Technis Karolos Koun?
<|assistant|>
SELECT "base" FROM "references" WHERE "company"='theatro technis karolos koun';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
Question: Which company has an author of Aristophanes and play of Plutus?
<|assistant|>
SELECT "company" FROM "references" WHERE "author"='aristophanes' AND "play"='plutus';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
Question: Which author has a company of the Semeio Theatre?
<|assistant|>
SELECT "author" FROM "references" WHERE "company"='semeio theatre';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
Question: Which play was done by the Radu Stanca National Theatre company?
<|assistant|>
SELECT "play" FROM "references" WHERE "company"='radu stanca national theatre';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
Question: Which play had a base of Aosta?
<|assistant|>
SELECT "play" FROM "references" WHERE "base"='aosta';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
Question: What is the country of the play based in Athens at the Attis Theatre company?
<|assistant|>
SELECT "country" FROM "references" WHERE "base"='athens' AND "company"='attis theatre';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tank_locomotives" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"type" text
);
Question: Which Class has a Quantity larger than 96?
<|assistant|>
SELECT "class" FROM "tank_locomotives" WHERE "quantity">96;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tank_locomotives" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"type" text
);
Question: How much Quantity has a Type of 1′c1′ h2t?
<|assistant|>
SELECT COUNT("quantity") FROM "tank_locomotives" WHERE "type"='1′c1′ h2t';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tank_locomotives" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"type" text
);
Question: Which Class has a Type of 1′c n2t?
<|assistant|>
SELECT "class" FROM "tank_locomotives" WHERE "type"='1′c n2t';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tank_locomotives" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"type" text
);
Question: Which Year(s) of manufacture has a Quantity larger than 39, and a Type of 1′c1′ h2t?
<|assistant|>
SELECT "year_s_of_manufacture" FROM "tank_locomotives" WHERE "quantity">39 AND "type"='1′c1′ h2t';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tank_locomotives" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"type" text
);
Question: Which Year(s) of manufacture has a Quantity of 2, and a Type of b n2t?
<|assistant|>
SELECT "year_s_of_manufacture" FROM "tank_locomotives" WHERE "quantity"=2 AND "type"='b n2t';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: what is the highest place when lost is more than 4, points is less than 18 and team is Team of atlético veragüense?
<|assistant|>
SELECT MAX("place") FROM "standings" WHERE "lost">4 AND "points"<18 AND "team"='atlético veragüense';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: what is the least lost when the place is higher than 4, goals scored is 12 and points is more than 4?
<|assistant|>
SELECT MIN("lost") FROM "standings" WHERE "place">4 AND "goals_scored"=12 AND "points">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: how many times is the team tauro and played less than 18?
<|assistant|>
SELECT COUNT("place") FROM "standings" WHERE "team"='tauro' AND "played"<18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: what is the least played when points is 36 and place is more than 2?
<|assistant|>
SELECT MIN("played") FROM "standings" WHERE "points"=36 AND "place">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "standings" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" real
);
Question: what is the average points when goals conceded is 14 and goals scored is less than 32?
<|assistant|>
SELECT AVG("points") FROM "standings" WHERE "goals_conceded"=14 AND "goals_scored"<32;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: Playing against the Seattle Seahawks in a week after week 1 before 69,149 people what was the result of the game?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week">1 AND "attendance"='69,149' AND "opponent"='seattle seahawks';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: How many weeks in total has bye as the date?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "date"='bye';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
Question: What country does Tiger Woods come from?
<|assistant|>
SELECT "country" FROM "final_round" WHERE "player"='tiger woods';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"ri_song_hui_prk" text,
"102kg" text,
"busan_south_korea" text
);
Question: What's the Ri Song-Hui when the olympic record is the world record and snatch was snatch?
<|assistant|>
SELECT "ri_song_hui_prk" FROM "records" WHERE "world_record"='olympic record' AND "snatch"='snatch';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"ri_song_hui_prk" text,
"102kg" text,
"busan_south_korea" text
);
Question: What's the 102kg when the Ri Song-Hui was 226kg?
<|assistant|>
SELECT "102kg" FROM "records" WHERE "ri_song_hui_prk"='226kg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"ri_song_hui_prk" text,
"102kg" text,
"busan_south_korea" text
);
Question: What's the 102kg when the snatch was snatch and the olympic record was the world record?
<|assistant|>
SELECT "102kg" FROM "records" WHERE "world_record"='olympic record' AND "snatch"='snatch';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"hometown_school" text
);
Question: What was the average pick made by the Texas Rangers?
<|assistant|>
SELECT AVG("pick") FROM "first_round_selections" WHERE "team"='texas rangers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"hometown_school" text
);
Question: What was the home town of Bob Geren, picked by the San Diego Padres?
<|assistant|>
SELECT "hometown_school" FROM "first_round_selections" WHERE "team"='san diego padres' AND "player"='bob geren';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"hometown_school" text
);
Question: What was the position of Jon Perlman?
<|assistant|>
SELECT "position" FROM "first_round_selections" WHERE "player"='jon perlman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "eleventh_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What college has a pick smaller than 87 for the position of tackle?
<|assistant|>
SELECT "college" FROM "eleventh_round" WHERE "position"='tackle' AND "pick"<87;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "eleventh_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What college had the pick of 85?
<|assistant|>
SELECT "college" FROM "eleventh_round" WHERE "pick"=85;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What are the least losses of Mortlake having less than 970 against?
<|assistant|>
SELECT MIN("losses") FROM "1934_ladder" WHERE "club"='mortlake' AND "against"<970;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What's the total against when the draws are more than 0?
<|assistant|>
SELECT COUNT("against") FROM "1934_ladder" WHERE "draws">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What's the total wins when the draws are less than 0?
<|assistant|>
SELECT COUNT("wins") FROM "1934_ladder" WHERE "draws"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What's the least against number for Cobden with draws more than 0?
<|assistant|>
SELECT MIN("against") FROM "1934_ladder" WHERE "club"='cobden' AND "draws">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What's the most against when the draws are more than 0?
<|assistant|>
SELECT MAX("against") FROM "1934_ladder" WHERE "draws">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What are the total wins when there are 1261 against?
<|assistant|>
SELECT SUM("wins") FROM "1934_ladder" WHERE "against"=1261;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athletes" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the notes entry for the row with a Time of 1:42.309?
<|assistant|>
SELECT "notes" FROM "heat_1" WHERE "time"='1:42.309';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athletes" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the rank for China?
<|assistant|>
SELECT SUM("rank") FROM "heat_1" WHERE "country"='china';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athletes" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the time for Cuba, with a notes entry of QS?
<|assistant|>
SELECT "time" FROM "heat_1" WHERE "notes"='qs' AND "country"='cuba';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What is the Week number on October 10, 1976?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "date"='october 10, 1976';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What is the Date of the game with a Result of L 33–14?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "result"='l 33–14';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "augmented_seventh_chord_table" (
"chord" text,
"root" text,
"major_third" text,
"augmented_fifth" text,
"minor_seventh" text
);
Question: The Major third of D has what for the Augmented fifth?
<|assistant|>
SELECT "augmented_fifth" FROM "augmented_seventh_chord_table" WHERE "major_third"='d';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.