text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "400_w_sub_bands" (
"band" real,
"frequency_m_hz" text,
"wavelength" text,
"type" text,
"power_w" real
);
Question: What is the Wavelength of Frequency (MHz) 14.050–14.150?
<|assistant|>
SELECT "wavelength" FROM "400_w_sub_bands" WHERE "frequency_m_hz"='14.050–14.150';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "satellite_awards" (
"year" real,
"category" text,
"recipients_and_nominees" text,
"role_episode" text,
"result" text
);
Question: Who are the recipients in 1994?
<|assistant|>
SELECT "recipients_and_nominees" FROM "satellite_awards" WHERE "year"=1994;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "satellite_awards" (
"year" real,
"category" text,
"recipients_and_nominees" text,
"role_episode" text,
"result" text
);
Question: Who are the recipients that won for David Duchovny role/episode?
<|assistant|>
SELECT "recipients_and_nominees" FROM "satellite_awards" WHERE "role_episode"='david duchovny' AND "result"='won';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "satellite_awards" (
"year" real,
"category" text,
"recipients_and_nominees" text,
"role_episode" text,
"result" text
);
Question: What's the category in 1998 with the role/episode of David Duchovny?
<|assistant|>
SELECT "category" FROM "satellite_awards" WHERE "year"=1998 AND "role_episode"='david duchovny';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "digital_channels" (
"channel" real,
"video" text,
"aspect" text,
"psip_short_name" text,
"network" text
);
Question: Which network has more than 31.4 channels with a 4:3 aspect?
<|assistant|>
SELECT "network" FROM "digital_channels" WHERE "aspect"='4:3' AND "channel">31.4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "digital_channels" (
"channel" real,
"video" text,
"aspect" text,
"psip_short_name" text,
"network" text
);
Question: Which video is on channel 31.2 with a 4:3 aspect?
<|assistant|>
SELECT "video" FROM "digital_channels" WHERE "aspect"='4:3' AND "channel"=31.2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "digital_channels" (
"channel" real,
"video" text,
"aspect" text,
"psip_short_name" text,
"network" text
);
Question: Which video has a 16:9 aspect?
<|assistant|>
SELECT "video" FROM "digital_channels" WHERE "aspect"='16:9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: What's the constituency number of the Seoni district and has none reserved?
<|assistant|>
SELECT "constituency_number" FROM "assembly_segments" WHERE "reserved_for_sc_st_none"='none' AND "district"='seoni';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: What is the district of Paraswada with none reserved?
<|assistant|>
SELECT "district" FROM "assembly_segments" WHERE "reserved_for_sc_st_none"='none' AND "name"='paraswada';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: What's the reserved number for constituency number 108?
<|assistant|>
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "constituency_number"='108';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: What's the name of Constituency number 108?
<|assistant|>
SELECT "name" FROM "assembly_segments" WHERE "constituency_number"='108';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the lowest total medals when there were 0 gold medals, 0 silver medals, and more than 1 bronze medal?
<|assistant|>
SELECT MIN("total") FROM "medal_table" WHERE "bronze">1 AND "silver"=0 AND "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the sum of the bronze medals when there were less than 8 total medals, 0 silver medals and a rank of 9?
<|assistant|>
SELECT SUM("bronze") FROM "medal_table" WHERE "total"<8 AND "rank"=9 AND "silver"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What nation had a rank higher than 4, a total of 2 medals and more than 0 silver medals?
<|assistant|>
SELECT "nation" FROM "medal_table" WHERE "rank">4 AND "total"=2 AND "silver">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What was the average rank for the team that had more than 5 medals and more than 6 gold medals?
<|assistant|>
SELECT AVG("rank") FROM "medal_table" WHERE "total">5 AND "gold">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "result_of_national_final" (
"draw" real,
"song" text,
"artist" text,
"points" real,
"place" text
);
Question: Which artist has a draw higher than 4 and fewer than 5 points?
<|assistant|>
SELECT "artist" FROM "result_of_national_final" WHERE "draw">4 AND "points"<5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "result_of_national_final" (
"draw" real,
"song" text,
"artist" text,
"points" real,
"place" text
);
Question: Which artist has 13 points?
<|assistant|>
SELECT "artist" FROM "result_of_national_final" WHERE "points"=13;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "floor_event_final_qualifiers" (
"position" text,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the greatest B score when the A score was less than 6.5?
<|assistant|>
SELECT MAX("b_score") FROM "floor_event_final_qualifiers" WHERE "a_score"<6.5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the Time of the Great Britain players with Notes of SA/B?
<|assistant|>
SELECT "time" FROM "repechage_2" WHERE "notes"='sa/b' AND "country"='great britain';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the Rowers of the race with a Time of 7:41.97 and Notes of FC?
<|assistant|>
SELECT "rowers" FROM "repechage_2" WHERE "notes"='fc' AND "time"='7:41.97';<|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: What is the Week of the game against the Minnesota Vikings?
<|assistant|>
SELECT MIN("week") FROM "schedule" WHERE "opponent"='minnesota vikings';<|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: What is the Week of the game against Green Bay Packers?
<|assistant|>
SELECT AVG("week") FROM "schedule" WHERE "opponent"='green bay packers';<|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: What is the Attendance of the game with a Result of L 20-14?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "result"='l 20-14';<|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: What is the Week number on October 5, 2003?
<|assistant|>
SELECT MIN("week") FROM "schedule" WHERE "date"='october 5, 2003';<|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: What is the Week number with an Attendance of 62,123?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "attendance"='62,123';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma_counties_ranked_by_per_capita_i" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
Question: How many households are in Ottawa?
<|assistant|>
SELECT SUM("number_of_households") FROM "oklahoma_counties_ranked_by_per_capita_i" WHERE "county"='ottawa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma_counties_ranked_by_per_capita_i" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
Question: What county has a population more than 603,403 and a mediuan family income of $61,694?
<|assistant|>
SELECT "county" FROM "oklahoma_counties_ranked_by_per_capita_i" WHERE "population">'603,403' AND "median_family_income"='$61,694';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school_ihsaa_i_dnum" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text,
"year_joined" real
);
Question: What is the sum of enrollments for schools located in Culver?
<|assistant|>
SELECT SUM("enrollment") FROM "membership" WHERE "location"='culver';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school_ihsaa_i_dnum" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text,
"year_joined" real
);
Question: Which year did the school with enrollment of 413 join?
<|assistant|>
SELECT "year_joined" FROM "membership" WHERE "enrollment"=413;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "original_broadway_production" (
"year" real,
"award_ceremony" text,
"category" text,
"nominee" text,
"result" text
);
Question: How many years was Reasons to be Pretty nominated for best play?
<|assistant|>
SELECT COUNT("year") FROM "original_broadway_production" WHERE "category"='best play';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "original_broadway_production" (
"year" real,
"award_ceremony" text,
"category" text,
"nominee" text,
"result" text
);
Question: What is the first year that Reasons to be Pretty had a nominee for best performance by a leading actor in a play?
<|assistant|>
SELECT MIN("year") FROM "original_broadway_production" WHERE "category"='best performance by a leading actor in a play';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results_and_fixtures" (
"date" text,
"venue" text,
"opponents" text,
"competition" text,
"match_report" text
);
Question: What is the match report from the game played on 28 february 2009?
<|assistant|>
SELECT "match_report" FROM "results_and_fixtures" WHERE "date"='28 february 2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results_and_fixtures" (
"date" text,
"venue" text,
"opponents" text,
"competition" text,
"match_report" text
);
Question: What is the match report from the game played on 25 april 2009?
<|assistant|>
SELECT "match_report" FROM "results_and_fixtures" WHERE "date"='25 april 2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results_and_fixtures" (
"date" text,
"venue" text,
"opponents" text,
"competition" text,
"match_report" text
);
Question: Where was the game played on 3 january 2009 against east fife?
<|assistant|>
SELECT "venue" FROM "results_and_fixtures" WHERE "opponents"='east fife' AND "date"='3 january 2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results_and_fixtures" (
"date" text,
"venue" text,
"opponents" text,
"competition" text,
"match_report" text
);
Question: What is the match report for the game that was played on 23 august 2008 in stark's park during the second division competition?
<|assistant|>
SELECT "match_report" FROM "results_and_fixtures" WHERE "venue"='stark''s park' AND "competition"='second division' AND "date"='23 august 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results_and_fixtures" (
"date" text,
"venue" text,
"opponents" text,
"competition" text,
"match_report" text
);
Question: What is the match report for the game played at forthbank stadium against stirling albion?
<|assistant|>
SELECT "match_report" FROM "results_and_fixtures" WHERE "opponents"='stirling albion' AND "venue"='forthbank stadium';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "narrow_gauge_locomotives" (
"class" text,
"railway_number_s" text,
"drg_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"axle_arrangement_uic_bauart" text
);
Question: What is average quantity, when DRG number is 99 011?
<|assistant|>
SELECT AVG("quantity") FROM "narrow_gauge_locomotives" WHERE "drg_number_s"='99 011';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "narrow_gauge_locomotives" (
"class" text,
"railway_number_s" text,
"drg_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"axle_arrangement_uic_bauart" text
);
Question: Which railway number has 3 quantity?
<|assistant|>
SELECT "railway_number_s" FROM "narrow_gauge_locomotives" WHERE "quantity"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "narrow_gauge_locomotives" (
"class" text,
"railway_number_s" text,
"drg_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"axle_arrangement_uic_bauart" text
);
Question: Which DRG number has xxx railway number?
<|assistant|>
SELECT "drg_number_s" FROM "narrow_gauge_locomotives" WHERE "railway_number_s"='xxx';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "narrow_gauge_locomotives" (
"class" text,
"railway_number_s" text,
"drg_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"axle_arrangement_uic_bauart" text
);
Question: Which quantity has Axle arrangement (UIC)bauart of c n2t, and DRG number 99 093?
<|assistant|>
SELECT "quantity" FROM "narrow_gauge_locomotives" WHERE "axle_arrangement_uic_bauart"='c n2t' AND "drg_number_s"='99 093';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dsds_performances" (
"date" text,
"topic_of_the_show" text,
"song" text,
"original_artist" text,
"place_percentage" text
);
Question: What song came out on March 8, 2008?
<|assistant|>
SELECT "song" FROM "dsds_performances" WHERE "date"='march 8, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dsds_performances" (
"date" text,
"topic_of_the_show" text,
"song" text,
"original_artist" text,
"place_percentage" text
);
Question: What was the topic of the show on March 15, 2008?
<|assistant|>
SELECT "topic_of_the_show" FROM "dsds_performances" WHERE "date"='march 15, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1939_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: When against is more than 1244 with less than 8 losses, what is the average of wins?
<|assistant|>
SELECT AVG("wins") FROM "1939_ladder" WHERE "against">1244 AND "losses"<8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "existing_historic_textile_mills" (
"refnum" real,
"name" text,
"built" real,
"location" text,
"construction" text
);
Question: What is the name of the mill located on Anawan Street with a reference number larger than 8?
<|assistant|>
SELECT "name" FROM "existing_historic_textile_mills" WHERE "refnum">8 AND "location"='anawan street';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "existing_historic_textile_mills" (
"refnum" real,
"name" text,
"built" real,
"location" text,
"construction" text
);
Question: What is the name of the mill constructed of red brick in 1910 with a reference number lower than 55?
<|assistant|>
SELECT "name" FROM "existing_historic_textile_mills" WHERE "refnum"<55 AND "built"=1910 AND "construction"='red brick';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "existing_historic_textile_mills" (
"refnum" real,
"name" text,
"built" real,
"location" text,
"construction" text
);
Question: What is the location of the Durfee Mill No. 1, built before 1872 ?
<|assistant|>
SELECT "location" FROM "existing_historic_textile_mills" WHERE "built"<1872 AND "name"='durfee mill no. 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "existing_historic_textile_mills" (
"refnum" real,
"name" text,
"built" real,
"location" text,
"construction" text
);
Question: What is the location of the mill with a reference number of 44?
<|assistant|>
SELECT "location" FROM "existing_historic_textile_mills" WHERE "refnum"=44;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
Question: Which Construction is named of fu-hsing?
<|assistant|>
SELECT "construction" FROM "composition" WHERE "name_wade_giles"='fu-hsing';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
Question: which Construction is named heng-hai?
<|assistant|>
SELECT "construction" FROM "composition" WHERE "name_wade_giles"='heng-hai';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
Question: Who has a Construction of 1873, foochow navy yard?
<|assistant|>
SELECT "characters" FROM "composition" WHERE "construction"='1873, foochow navy yard';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
Question: Which Name (pinyin) is named fu-ching?
<|assistant|>
SELECT "name_pinyin" FROM "composition" WHERE "name_wade_giles"='fu-ching';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
Question: Who has a Construction of 1870, foochow navy yard, and a Name (Wade Giles) of fu-hsing?
<|assistant|>
SELECT "characters" FROM "composition" WHERE "construction"='1870, foochow navy yard' AND "name_wade_giles"='fu-hsing';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "discography" (
"release" text,
"track" text,
"format" text,
"label" text,
"year" real
);
Question: Which Label has a Release of liebesgrüsse aus ost-berlin?
<|assistant|>
SELECT "label" FROM "discography" WHERE "release"='liebesgrüsse aus ost-berlin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leading_scorers" (
"rank" real,
"player" text,
"games_played" real,
"goals" real,
"assists" real
);
Question: What is the rank of the person with more than 5 games played?
<|assistant|>
SELECT SUM("rank") FROM "leading_scorers" WHERE "games_played">5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many golds have a bronze greater than 1, a silver greater than 1, with total as the rank?
<|assistant|>
SELECT COUNT("gold") FROM "medals_table" WHERE "bronze">1 AND "silver">1 AND "rank"='total';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many golds have a bronze greater than 1, total as the nation, and a silver less than 18?
<|assistant|>
SELECT COUNT("gold") FROM "medals_table" WHERE "bronze">1 AND "nation"='total' AND "silver"<18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronzes have west germany as the nation?
<|assistant|>
SELECT SUM("bronze") FROM "medals_table" WHERE "nation"='west germany';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many golds have denmark as the nation, with a total less than 1?
<|assistant|>
SELECT COUNT("gold") FROM "medals_table" WHERE "nation"='denmark' AND "total"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many totals have 1 for the gold, 12 for the rank, and a sliver greater than 0?
<|assistant|>
SELECT COUNT("total") FROM "medals_table" WHERE "gold"=1 AND "rank"='12' AND "silver">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the lowest silver that has 1 for the bronze, 1 as the total, 17 as the rank, with a gold less than 0?
<|assistant|>
SELECT MIN("silver") FROM "medals_table" WHERE "bronze"=1 AND "total"=1 AND "rank"='17' AND "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "bibliography" (
"japanese_title" text,
"english_title" text,
"year" real,
"first_publisher" text,
"isbn" text
);
Question: What is the First Publisher prior to 1999?
<|assistant|>
SELECT "first_publisher" FROM "bibliography" WHERE "year"<1999;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "bibliography" (
"japanese_title" text,
"english_title" text,
"year" real,
"first_publisher" text,
"isbn" text
);
Question: What is the ISBN in 1999?
<|assistant|>
SELECT "isbn" FROM "bibliography" WHERE "year"=1999;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "bibliography" (
"japanese_title" text,
"english_title" text,
"year" real,
"first_publisher" text,
"isbn" text
);
Question: What is the ISBN of Japanese Title of 霧の訪問者 (kiri no hōmonsha)?
<|assistant|>
SELECT "isbn" FROM "bibliography" WHERE "japanese_title"='霧の訪問者 (kiri no hōmonsha)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "bibliography" (
"japanese_title" text,
"english_title" text,
"year" real,
"first_publisher" text,
"isbn" text
);
Question: What is the First Publisher in 2007?
<|assistant|>
SELECT "first_publisher" FROM "bibliography" WHERE "year"=2007;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "bibliography" (
"japanese_title" text,
"english_title" text,
"year" real,
"first_publisher" text,
"isbn" text
);
Question: What is the Year of Kodansha Novels' Tokyo Nightmare?
<|assistant|>
SELECT "year" FROM "bibliography" WHERE "first_publisher"='kodansha novels' AND "english_title"='tokyo nightmare';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "bibliography" (
"japanese_title" text,
"english_title" text,
"year" real,
"first_publisher" text,
"isbn" text
);
Question: What Year has an ISBN OF ISBN 4-06-182042-7?
<|assistant|>
SELECT AVG("year") FROM "bibliography" WHERE "isbn"='isbn 4-06-182042-7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the bronze number for the nation with less than 0 gold?
<|assistant|>
SELECT MIN("bronze") FROM "medal_table" WHERE "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city" text,
"region" text,
"july" text,
"january" text,
"annual_precipitation" text,
"plant_hardiness_zone" text
);
Question: What is the January climate figure for Eastman?
<|assistant|>
SELECT "january" FROM "climate" WHERE "region"='eastman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city" text,
"region" text,
"july" text,
"january" text,
"annual_precipitation" text,
"plant_hardiness_zone" text
);
Question: In what city is the July temperature 23/9°c (73/48°f)?
<|assistant|>
SELECT "city" FROM "climate" WHERE "july"='23/9°c (73/48°f)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city" text,
"region" text,
"july" text,
"january" text,
"annual_precipitation" text,
"plant_hardiness_zone" text
);
Question: What is the July temperature where the annual precipitation is 514mm (20.2in)?
<|assistant|>
SELECT "july" FROM "climate" WHERE "annual_precipitation"='514mm (20.2in)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city" text,
"region" text,
"july" text,
"january" text,
"annual_precipitation" text,
"plant_hardiness_zone" text
);
Question: What is the July temperature where plant hardiness zone is 2B and January figure is −12/−23°c (10-9°f)?
<|assistant|>
SELECT "july" FROM "climate" WHERE "plant_hardiness_zone"='2b' AND "january"='−12/−23°c (10-9°f)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city" text,
"region" text,
"july" text,
"january" text,
"annual_precipitation" text,
"plant_hardiness_zone" text
);
Question: What is the plant hardiness zone in the Northern region where the annual precipitation is 443mm (17.4in)?
<|assistant|>
SELECT "plant_hardiness_zone" FROM "climate" WHERE "region"='northern' AND "annual_precipitation"='443mm (17.4in)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "climate" (
"city" text,
"region" text,
"july" text,
"january" text,
"annual_precipitation" text,
"plant_hardiness_zone" text
);
Question: In what city is the plant hardiness zone 2B and January temp is −12/−23°c (10/-9°f)?
<|assistant|>
SELECT "city" FROM "climate" WHERE "plant_hardiness_zone"='2b' AND "january"='−12/−23°c (10/-9°f)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
Question: What is the Total Apps listing for Paul Wilson?
<|assistant|>
SELECT "total_apps" FROM "appearances_and_goals" WHERE "name"='paul wilson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "route_and_stages" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
Question: Who was the winner at Milan Circuit Race?
<|assistant|>
SELECT "winner" FROM "route_and_stages" WHERE "course"='milan circuit race';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "route_and_stages" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
Question: Who was the winner at Rest Day course?
<|assistant|>
SELECT "winner" FROM "route_and_stages" WHERE "course"='rest day';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "route_and_stages" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
Question: What's the type on Sestri Levante to Riomaggiore?
<|assistant|>
SELECT "type" FROM "route_and_stages" WHERE "course"='sestri levante to riomaggiore';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season_rankings" (
"player" text,
"country" text,
"points" real,
"events" real,
"reset_points" real
);
Question: Which player competed in 12 events?
<|assistant|>
SELECT "player" FROM "regular_season_rankings" WHERE "events"=12;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "constructors" (
"constructor" text,
"chassis" text,
"starts" real,
"finishes" real,
"wins" real,
"podiums" real,
"stage_wins" real,
"points" real
);
Question: what is the highest finishes when the points is less than 337, the stage wins is 2 and the wins is more than 0?
<|assistant|>
SELECT MAX("finishes") FROM "constructors" WHERE "points"<337 AND "stage_wins"=2 AND "wins">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "constructors" (
"constructor" text,
"chassis" text,
"starts" real,
"finishes" real,
"wins" real,
"podiums" real,
"stage_wins" real,
"points" real
);
Question: what is the average starts when the chassis is focus rs wrc 08 and finishes is more than 27?
<|assistant|>
SELECT AVG("starts") FROM "constructors" WHERE "chassis"='focus rs wrc 08' AND "finishes">27;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "constructors" (
"constructor" text,
"chassis" text,
"starts" real,
"finishes" real,
"wins" real,
"podiums" real,
"stage_wins" real,
"points" real
);
Question: what is the finishes when points is more than 337 and starts is more than 26?
<|assistant|>
SELECT SUM("finishes") FROM "constructors" WHERE "points">337 AND "starts">26;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "constructors" (
"constructor" text,
"chassis" text,
"starts" real,
"finishes" real,
"wins" real,
"podiums" real,
"stage_wins" real,
"points" real
);
Question: what is the average starts when the podiums is more than 0, stage wins is more than 39 and points is more than 456?
<|assistant|>
SELECT AVG("starts") FROM "constructors" WHERE "podiums">0 AND "stage_wins">39 AND "points">456;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
Question: Which School has a Mascot of squires?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='squires';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
Question: Which School has a #/ County of 85 wabash, and an IHSAA Football Class of A, and a Mascot of norsemen?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "num_county"='85 wabash' AND "ihsaa_football_class"='a' AND "mascot"='norsemen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
Question: Which IHSAA Football Class has a School of whitko?
<|assistant|>
SELECT "ihsaa_football_class" FROM "indiana_high_school_athletics_conference" WHERE "school"='whitko';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
Question: Which IHSAA Football Class has a Location of wabash, and a School of wabash?
<|assistant|>
SELECT "ihsaa_football_class" FROM "indiana_high_school_athletics_conference" WHERE "location"='wabash' AND "school"='wabash';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won" real,
"total" real,
"to_par" real
);
Question: With a Total of more than 149, what is Davis Love III's To par?
<|assistant|>
SELECT AVG("to_par") FROM "missed_the_cut" WHERE "player"='davis love iii' AND "total">149;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won" real,
"total" real,
"to_par" real
);
Question: What is the Total of the Player with a To par of 6 and Year won after 1993?
<|assistant|>
SELECT MIN("total") FROM "missed_the_cut" WHERE "year_won">1993 AND "to_par"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won" real,
"total" real,
"to_par" real
);
Question: What is the Year won of Davis Love III with a Total of less than 149?
<|assistant|>
SELECT COUNT("year_won") FROM "missed_the_cut" WHERE "player"='davis love iii' AND "total"<149;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" text,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the genre of the Mass Effect game?
<|assistant|>
SELECT "genre" FROM "list_of_game_of_the_year_awards" WHERE "game"='mass effect';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" text,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the genre of the game from 2006?
<|assistant|>
SELECT "genre" FROM "list_of_game_of_the_year_awards" WHERE "year"='2006';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" text,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the genre of the game developed by Nintendo EAD?
<|assistant|>
SELECT "genre" FROM "list_of_game_of_the_year_awards" WHERE "developer_s"='nintendo ead';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" text,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the platform of the game built in 2006?
<|assistant|>
SELECT "platform_s" FROM "list_of_game_of_the_year_awards" WHERE "year"='2006';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_game_of_the_year_awards" (
"year" text,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What game was developed by Ubisoft Montreal?
<|assistant|>
SELECT "game" FROM "list_of_game_of_the_year_awards" WHERE "developer_s"='ubisoft montreal';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ign" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the genre for Portal 2?
<|assistant|>
SELECT "genre" FROM "ign" WHERE "game"='portal 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ign" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: Which platforms can you play Portal 2 on?
<|assistant|>
SELECT "platform_s" FROM "ign" WHERE "game"='portal 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "men" (
"event" text,
"time" text,
"date" text,
"meet" text,
"location" text
);
Question: What event had the 1500m freestyle?
<|assistant|>
SELECT "meet" FROM "men" WHERE "event"='1500m freestyle';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individual_records" (
"rank" text,
"name" text,
"country" text,
"maglia_rosa" real,
"giro_wins" real,
"points" real,
"young_rider" real
);
Question: Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?
<|assistant|>
SELECT "name" FROM "individual_records" WHERE "country"='italy' AND "giro_wins"=0 AND "young_rider"=0 AND "maglia_rosa"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individual_records" (
"rank" text,
"name" text,
"country" text,
"maglia_rosa" real,
"giro_wins" real,
"points" real,
"young_rider" real
);
Question: what is the least maglia rosa when the rank is 108=, the country is united kingdom and young rider is less than 0?
<|assistant|>
SELECT MIN("maglia_rosa") FROM "individual_records" WHERE "rank"='108=' AND "country"='united kingdom' AND "young_rider"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronze medals for the United Kingdom when the silver was less than 0?
<|assistant|>
SELECT AVG("bronze") FROM "medals_table" WHERE "nation"='united kingdom' AND "silver"<0;<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.