text
stringlengths 310
1.28k
|
|---|
<|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 station is owned by Coyote Communications?
<|assistant|>
SELECT "city_of_license" FROM "fm" WHERE "status"='owned by coyote communications';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
Question: What year were the Olympic Games?
<|assistant|>
SELECT SUM("year") FROM "achievements" WHERE "competition"='olympic games';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
Question: What's the year in 5th position that happened in Osaka, Japan?
<|assistant|>
SELECT MIN("year") FROM "achievements" WHERE "position"='5th' AND "venue"='osaka, japan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
Question: What year was the venue in Barcelona, Spain?
<|assistant|>
SELECT MIN("year") FROM "achievements" WHERE "venue"='barcelona, spain';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "whakatane_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: For a school with authority of state and a roll of 798, what is the decile?
<|assistant|>
SELECT "decile" FROM "whakatane_district" WHERE "authority"='state' AND "roll"=798;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "whakatane_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: Murupara has a roll greater than 296 for what years?
<|assistant|>
SELECT "years" FROM "whakatane_district" WHERE "roll">296 AND "area"='murupara';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "whakatane_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: When a school has authority of state and a decile greater than 1, what is the roll number?
<|assistant|>
SELECT "roll" FROM "whakatane_district" WHERE "authority"='state' AND "decile">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: Who did the Jays play on August 30?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "date"='august 30';<|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" text
);
Question: Which opponent has a record of 5-0-1?
<|assistant|>
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='5-0-1';<|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" text
);
Question: What method does the opponent of Dan New use?
<|assistant|>
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='dan new';<|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" text
);
Question: Which method has a record of 3-0?
<|assistant|>
SELECT "method" FROM "mixed_martial_arts_record" WHERE "record"='3-0';<|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" text
);
Question: Which event is a win by an opponent of Nicolas Smith, with the round marked n/a?
<|assistant|>
SELECT "event" FROM "mixed_martial_arts_record" WHERE "res"='win' AND "round"='n/a' AND "opponent"='nicolas smith';<|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" text
);
Question: Which event lasted 1 round and included an opponent of Dan Spychalski?
<|assistant|>
SELECT "event" FROM "mixed_martial_arts_record" WHERE "round"='1' AND "opponent"='dan spychalski';<|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" text
);
Question: What is Jimmy Smith's opponent's record?
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "opponent"='jimmy smith';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_radio" (
"frequency" real,
"callsign" text,
"brand" text,
"format" text,
"city_of_license" text,
"website" text,
"webcast" text
);
Question: Name the sum of frequecy with brand of exa fm
<|assistant|>
SELECT SUM("frequency") FROM "fm_radio" WHERE "brand"='exa fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_radio" (
"frequency" real,
"callsign" text,
"brand" text,
"format" text,
"city_of_license" text,
"website" text,
"webcast" text
);
Question: Name the webcast for website of β’ and frequency of 103.3
<|assistant|>
SELECT "webcast" FROM "fm_radio" WHERE "website"='β’' AND "frequency"=103.3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_radio" (
"frequency" real,
"callsign" text,
"brand" text,
"format" text,
"city_of_license" text,
"website" text,
"webcast" text
);
Question: Name the lowest frequency for brand of radio manantial
<|assistant|>
SELECT MIN("frequency") FROM "fm_radio" WHERE "brand"='radio manantial';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"game" real,
"date" text,
"score" text,
"location" text,
"time" text,
"attendance" real
);
Question: Score of new york yankees β 2, brooklyn dodgers β 3 involves how many number of games?
<|assistant|>
SELECT COUNT("game") FROM "summary" WHERE "score"='new york yankees β 2, brooklyn dodgers β 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"game" real,
"date" text,
"score" text,
"location" text,
"time" text,
"attendance" real
);
Question: Date of october 5 had what score?
<|assistant|>
SELECT "score" FROM "summary" WHERE "date"='october 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"game" real,
"date" text,
"score" text,
"location" text,
"time" text,
"attendance" real
);
Question: brooklyn dodgers β 3, new york yankees β 5, and a Game larger than 1 had what attendance figure?
<|assistant|>
SELECT SUM("attendance") FROM "summary" WHERE "score"='brooklyn dodgers β 3, new york yankees β 5' AND "game">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "21st_century" (
"season" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who won mixed doubles in the 2002 season?
<|assistant|>
SELECT "mixed_doubles" FROM "21st_century" WHERE "season"=2002;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "container_terminals" (
"terminal" text,
"operator" text,
"depth_m" text,
"berths" real,
"quay_cranes" real
);
Question: Name the lowest Quay cranes for Berths of 1 and operator of mtl with terminal of terminal 5 (ct5)
<|assistant|>
SELECT MIN("quay_cranes") FROM "container_terminals" WHERE "berths"=1 AND "operator"='mtl' AND "terminal"='terminal 5 (ct5)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "container_terminals" (
"terminal" text,
"operator" text,
"depth_m" text,
"berths" real,
"quay_cranes" real
);
Question: Name the operator with berths more than 1 and depth of 12.5-15.5
<|assistant|>
SELECT "operator" FROM "container_terminals" WHERE "berths">1 AND "depth_m"='12.5-15.5';<|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: What is the average points that Centro Asegurador earned with the McLaren M23 chassis?
<|assistant|>
SELECT AVG("points") FROM "complete_formula_one_world_championship_" WHERE "chassis"='mclaren m23' AND "entrant"='centro asegurador';<|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: What was the chassis of Emilio de Villota in 1981?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "year">1981;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"film" text,
"director_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: What directors won an award on 14/6/6?
<|assistant|>
SELECT "director_s" FROM "2006" WHERE "date"='14/6/6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"film" text,
"director_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: What date did Passion Pictures receive an award?
<|assistant|>
SELECT "date" FROM "2006" WHERE "recipient"='passion pictures';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"film" text,
"director_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: What award did Charlie Productions Ltd receive?
<|assistant|>
SELECT "award" FROM "2006" WHERE "recipient"='charlie productions ltd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"film" text,
"director_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: What film had Bub Ltd as the recipient?
<|assistant|>
SELECT "film" FROM "2006" WHERE "recipient"='bub ltd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"film" text,
"director_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: What film was awarded on 22/3/06?
<|assistant|>
SELECT "film" FROM "2006" WHERE "date"='22/3/06';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "finals_6_3_titles_3_runners_up" (
"outcome" text,
"year" real,
"tournament" text,
"partner" text,
"opponent" text,
"score" text
);
Question: What score resulted in a winner after 2008?
<|assistant|>
SELECT "score" FROM "finals_6_3_titles_3_runners_up" WHERE "outcome"='winner' AND "year">2008;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "finals_6_3_titles_3_runners_up" (
"outcome" text,
"year" real,
"tournament" text,
"partner" text,
"opponent" text,
"score" text
);
Question: What score has an opponent gan teik chai lin woon fui?
<|assistant|>
SELECT "score" FROM "finals_6_3_titles_3_runners_up" WHERE "opponent"='gan teik chai lin woon fui';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "finals_6_3_titles_3_runners_up" (
"outcome" text,
"year" real,
"tournament" text,
"partner" text,
"opponent" text,
"score" text
);
Question: What tournament has an opponent gan teik chai lin woon fui?
<|assistant|>
SELECT "tournament" FROM "finals_6_3_titles_3_runners_up" WHERE "opponent"='gan teik chai lin woon fui';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "finals_6_3_titles_3_runners_up" (
"outcome" text,
"year" real,
"tournament" text,
"partner" text,
"opponent" text,
"score" text
);
Question: What tournament has an opponent jung jae-sung lee yong-dae?
<|assistant|>
SELECT "tournament" FROM "finals_6_3_titles_3_runners_up" WHERE "opponent"='jung jae-sung lee yong-dae';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: What is the record of the team that lost to Alexander (5-2)?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "loss"='alexander (5-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,
"attendance" text,
"record" text
);
Question: Which opponent has a record of 17-11?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='17-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" text,
"record" text
);
Question: What is the score of the game that resulted in a 15-9 record?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='15-9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: What was the attendance on May 26?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "date"='may 26';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: What is the score of the game that was a loss to Dotson (2-3)?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "loss"='dotson (2-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" text,
"record" text
);
Question: On what date was the record 19-11?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='19-11';<|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: What were the highest points before the year 1974?
<|assistant|>
SELECT MAX("points") FROM "complete_formula_one_world_championship_" WHERE "year"<1974;<|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: What was the chassis when the entrant was Lavazza March, and the points were 0.5?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "entrant"='lavazza march' AND "points"=0.5;<|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: What was the chassis when the entrant was Lavazza March, and the year was 1975?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "entrant"='lavazza march' AND "year"=1975;<|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: What was the chassis when the points were greater than 0 and the entrant was March Engineering?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "points">0 AND "entrant"='march engineering';<|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: Who had a time of 56.07?
<|assistant|>
SELECT "name" FROM "semifinal_1" WHERE "time"=56.07;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" text,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
Question: What is the original title of Madame Rosa?
<|assistant|>
SELECT "original_title" FROM "1970s" WHERE "english_title"='madame rosa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" text,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
Question: What is the original title where Paul Verhoeven is the director?
<|assistant|>
SELECT "original_title" FROM "1970s" WHERE "director"='paul verhoeven';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" text,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
Question: What original title has a year of 1978?
<|assistant|>
SELECT "original_title" FROM "1970s" WHERE "year"='1978';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" text,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
Question: Who is the director of the best foreign film?
<|assistant|>
SELECT "director" FROM "1970s" WHERE "original_title"='best foreign film';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" text,
"english_title" text,
"original_title" text,
"country" text,
"director" text
);
Question: What is the English title for Ansikte Mot Ansikte?
<|assistant|>
SELECT "english_title" FROM "1970s" WHERE "original_title"='ansikte mot ansikte';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: What happened on 2009-09-05?
<|assistant|>
SELECT "circumstances" FROM "2009" WHERE "date"='2009-09-05';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: Where was the combat of 2009-09-16?
<|assistant|>
SELECT "location" FROM "2009" WHERE "circumstances"='combat' AND "date"='2009-09-16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: What happened on 2009-03-14?
<|assistant|>
SELECT "circumstances" FROM "2009" WHERE "date"='2009-03-14';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: How many casualties from the combat in the Fayzabad area?
<|assistant|>
SELECT "casualties" FROM "2009" WHERE "circumstances"='combat' AND "location"='fayzabad area';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009" (
"date" text,
"location" text,
"nature_of_incident" text,
"circumstances" text,
"casualties" text
);
Question: Where was the incident of 2009-09-05?
<|assistant|>
SELECT "location" FROM "2009" WHERE "date"='2009-09-05';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What is the home team of the game on January 22?
<|assistant|>
SELECT "home" FROM "regular_season" WHERE "date"='january 22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What is the score of the game on February 26 with the Chicago black hawks as the home team and the New York Rangers as the visitor team?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "home"='chicago black hawks' AND "visitor"='new york rangers' AND "date"='february 26';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What is the home team of the game on February 4?
<|assistant|>
SELECT "home" FROM "regular_season" WHERE "date"='february 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "formula_one_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What Team had less than 1 point with a Zakspeed 871 chassis?
<|assistant|>
SELECT "team" FROM "formula_one_results" WHERE "points"<1 AND "chassis"='zakspeed 871';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "formula_one_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What is the lowest amount of points for a Ford Cosworth DFR (Mader) 3.5 V8 engine?
<|assistant|>
SELECT MIN("points") FROM "formula_one_results" WHERE "engine"='ford cosworth dfr (mader) 3.5 v8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "formula_one_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What year was a Rial Arc2 chassis used?
<|assistant|>
SELECT SUM("year") FROM "formula_one_results" WHERE "chassis"='rial arc2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the bronze when silver is 1
<|assistant|>
SELECT "bronze" FROM "medal_table" WHERE "silver"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the least silver when gold is less than 0
<|assistant|>
SELECT MIN("silver") FROM "medal_table" WHERE "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the least silver for nation of total when bronze is more than 24
<|assistant|>
SELECT MIN("silver") FROM "medal_table" WHERE "nation"='total' AND "bronze">24;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season" (
"year" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
Question: Name the year with finish of 12th and record of 23-36
<|assistant|>
SELECT "year" FROM "season_by_season" WHERE "finish"='12th' AND "record"='23-36';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season" (
"year" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
Question: Name the record for 1997
<|assistant|>
SELECT "record" FROM "season_by_season" WHERE "year"='1997';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season" (
"year" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
Question: Name the year for jesus alfaro and finish of 6th
<|assistant|>
SELECT "year" FROM "season_by_season" WHERE "manager"='jesus alfaro' AND "finish"='6th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season" (
"year" text,
"record" text,
"finish" text,
"manager" text,
"playoffs" text
);
Question: Name the manager for playoffs of missed for 1999
<|assistant|>
SELECT "manager" FROM "season_by_season" WHERE "playoffs"='missed' AND "year"='1999';<|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 average attendance when the record was 17-18?
<|assistant|>
SELECT AVG("attendance") FROM "game_log" WHERE "record"='17-18';<|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: What was marlboro brm's lowest points by using brm p160b?
<|assistant|>
SELECT MIN("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='marlboro brm' AND "chassis"='brm p160b';<|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: What is the total points in 1974?
<|assistant|>
SELECT COUNT("points") FROM "complete_formula_one_world_championship_" WHERE "year"=1974;<|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: Who has 0 points in 1974?
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "points"=0 AND "year"=1974;<|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: What is the lowest points of using mclaren m14a as chassis?
<|assistant|>
SELECT MIN("points") FROM "complete_formula_one_world_championship_" WHERE "chassis"='mclaren m14a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_season_junior_career" (
"year" real,
"competition" text,
"location" text,
"event" text,
"final_rank" real,
"final_score" real
);
Question: Location of saint paul, and a Final-Score larger than 14.35, and a Event of all around is what sum of year?
<|assistant|>
SELECT SUM("year") FROM "2006_season_junior_career" WHERE "location"='saint paul' AND "final_score">14.35 AND "event"='all around';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_season_junior_career" (
"year" real,
"competition" text,
"location" text,
"event" text,
"final_rank" real,
"final_score" real
);
Question: Competition of u.s championships, and a Event of all around has what average year?
<|assistant|>
SELECT AVG("year") FROM "2006_season_junior_career" WHERE "competition"='u.s championships' AND "event"='all around';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominated" (
"year" real,
"song" text,
"film" text,
"music_director_s" text,
"lyricist" text
);
Question: What film was in 1970?
<|assistant|>
SELECT "film" FROM "nominated" WHERE "year"=1970;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominated" (
"year" real,
"song" text,
"film" text,
"music_director_s" text,
"lyricist" text
);
Question: Who wrote the lyrics for Mukti?
<|assistant|>
SELECT "lyricist" FROM "nominated" WHERE "film"='mukti';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominated" (
"year" real,
"song" text,
"film" text,
"music_director_s" text,
"lyricist" text
);
Question: What song was directed by Shankar Jaikishan?
<|assistant|>
SELECT "song" FROM "nominated" WHERE "music_director_s"='shankar jaikishan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominated" (
"year" real,
"song" text,
"film" text,
"music_director_s" text,
"lyricist" text
);
Question: What song was written after 1976 and directed by Rahul Dev Burman?
<|assistant|>
SELECT "song" FROM "nominated" WHERE "year">1976 AND "music_director_s"='rahul dev burman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "settlements_with_population_between_100_" (
"rank" real,
"population" real,
"name" text,
"former_name" text,
"municipality" text
);
Question: What is the population for the place with a Former Name of bluie west-1?
<|assistant|>
SELECT MIN("population") FROM "settlements_with_population_between_100_" WHERE "former_name"='bluie west-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "part_time_teams" (
"team" text,
"car_s" text,
"driver_s" text,
"primary_sponsor_s" text,
"owner_s" text,
"crew_chief" text,
"rounds" real
);
Question: What car does Scott Deware own that has rounds under 12?
<|assistant|>
SELECT "car_s" FROM "part_time_teams" WHERE "rounds"<12 AND "owner_s"='scott deware';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clubs" (
"club" text,
"city_or_town" text,
"position_in_2012_13_season" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"top_division_titles" text,
"last_top_division_title" text
);
Question: Which City or town has a Top division titles of 17
<|assistant|>
SELECT "city_or_town" FROM "clubs" WHERE "top_division_titles"='17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "clubs" (
"club" text,
"city_or_town" text,
"position_in_2012_13_season" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"top_division_titles" text,
"last_top_division_title" text
);
Question: Which City or town has top division smaller than 40 and Gaziantepspor Club ?
<|assistant|>
SELECT "city_or_town" FROM "clubs" WHERE "number_of_seasons_in_top_division"<40 AND "club"='gaziantepspor';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles" (
"tournament" text,
"2003" text,
"2007" text,
"2008" text,
"2009" text,
"2011" text
);
Question: What is the 2003 value with 2r in 2008 and 1r in 2011?
<|assistant|>
SELECT "2003" FROM "doubles" WHERE "2008"='2r' AND "2011"='1r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles" (
"tournament" text,
"2003" text,
"2007" text,
"2008" text,
"2009" text,
"2011" text
);
Question: What is the 2007 value with 2r in 2011 and 2r in 2008?
<|assistant|>
SELECT "2007" FROM "doubles" WHERE "2011"='2r' AND "2008"='2r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles" (
"tournament" text,
"2003" text,
"2007" text,
"2008" text,
"2009" text,
"2011" text
);
Question: What is the 2007 value with 1r in 2009 and 2r in 2011 at the Tournament of Wimbledon?
<|assistant|>
SELECT "2007" FROM "doubles" WHERE "2009"='1r' AND "2011"='2r' AND "tournament"='wimbledon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles" (
"tournament" text,
"2003" text,
"2007" text,
"2008" text,
"2009" text,
"2011" text
);
Question: What is the 2003 value with 1r in 2009 at the Australian Open?
<|assistant|>
SELECT "2003" FROM "doubles" WHERE "2009"='1r' AND "tournament"='australian open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "home_grounds" (
"stadium" text,
"years" text,
"played" real,
"wins" real,
"losses" real,
"draw" text,
"win_percentage" text
);
Question: How many wins did they have at Richmond Cricket Ground Stadium?
<|assistant|>
SELECT "wins" FROM "home_grounds" WHERE "stadium"='richmond cricket ground';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "home_grounds" (
"stadium" text,
"years" text,
"played" real,
"wins" real,
"losses" real,
"draw" text,
"win_percentage" text
);
Question: How many games did they play in 1905?
<|assistant|>
SELECT AVG("played") FROM "home_grounds" WHERE "years"='1905';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
Question: Which term in office has a qld state, a Party of labor, and an Electorate of fisher?
<|assistant|>
SELECT "term_in_office" FROM "see_also" WHERE "state"='qld' AND "party"='labor' AND "electorate"='fisher';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
Question: Which member has an Electorate of kennedy?
<|assistant|>
SELECT "member" FROM "see_also" WHERE "electorate"='kennedy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
Question: Which Party has a Member of david jull?
<|assistant|>
SELECT "party" FROM "see_also" WHERE "member"='david jull';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
Question: Which term in office has an Electorate of hinkler?
<|assistant|>
SELECT "term_in_office" FROM "see_also" WHERE "electorate"='hinkler';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
Question: Which Electorate has a State of qld, a Party of national, and a Member of hon evan adermann?
<|assistant|>
SELECT "electorate" FROM "see_also" WHERE "state"='qld' AND "party"='national' AND "member"='hon evan adermann';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"term_in_office" text
);
Question: Which state has a Term in office of 1984β1996, a Party of labor, and a Member of robert tickner?
<|assistant|>
SELECT "state" FROM "see_also" WHERE "term_in_office"='1984β1996' AND "party"='labor' AND "member"='robert tickner';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "waipa_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the total amount of decile with the authority of state around the Pokuru School and a roll smaller than 109?
<|assistant|>
SELECT SUM("decile") FROM "waipa_district" WHERE "authority"='state' AND "name"='pokuru school' AND "roll"<109;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Name the most laps for corvette racing in 2004
<|assistant|>
SELECT MAX("laps") FROM "24_hours_of_le_mans_results" WHERE "team"='corvette racing' AND "year"=2004;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Name the class for 4th position with year before 2006
<|assistant|>
SELECT "class" FROM "24_hours_of_le_mans_results" WHERE "pos"='4th' AND "year"<2006;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Name the total number of laps for 23rd position
<|assistant|>
SELECT COUNT("laps") FROM "24_hours_of_le_mans_results" WHERE "pos"='23rd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Name the team with laps less than 315 and co-drivers of david brabham franck lagorce?
<|assistant|>
SELECT "team" FROM "24_hours_of_le_mans_results" WHERE "laps"<315 AND "co_drivers"='david brabham franck lagorce';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.