text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "writers_guild_of_america" (
"year" real,
"category" text,
"recipients_and_nominees" text,
"role_episode" text,
"result" text
);
Question: Which result has a recipients and nominees of outstanding achievement in drama with 1995 as the year?
<|assistant|>
SELECT "result" FROM "writers_guild_of_america" WHERE "recipients_and_nominees"='outstanding achievement in drama' AND "year"=1995;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "writers_guild_of_america" (
"year" real,
"category" text,
"recipients_and_nominees" text,
"role_episode" text,
"result" text
);
Question: What recipients and nominees have outstanding achievement in drama as the category with 1994 as the year?
<|assistant|>
SELECT "recipients_and_nominees" FROM "writers_guild_of_america" WHERE "category"='outstanding achievement in drama' AND "year"=1994;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "writers_guild_of_america" (
"year" real,
"category" text,
"recipients_and_nominees" text,
"role_episode" text,
"result" text
);
Question: What result has outstanding achievement in drama, as the role/episode with a year prior to 1995?
<|assistant|>
SELECT "result" FROM "writers_guild_of_america" WHERE "role_episode"='outstanding achievement in drama' AND "year"<1995;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the total for Danny Pinheiro Rodrigues ( fra ), in a Position smaller than 7?
<|assistant|>
SELECT AVG("total") FROM "qualified_competitors" WHERE "gymnast"='danny pinheiro rodrigues ( fra )' AND "position"<7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the total for Chen Yibing ( chn ), when his B Score was smaller than 9.225?
<|assistant|>
SELECT COUNT("total") FROM "qualified_competitors" WHERE "gymnast"='chen yibing ( chn )' AND "b_score"<9.225;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the A Score when the B Score is more than 9.05, and the total is less than 16.525?
<|assistant|>
SELECT COUNT("a_score") FROM "qualified_competitors" WHERE "b_score">9.05 AND "total"<16.525;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the position for Oleksandr Vorobiov ( ukr ), when the total was larger than 16.25?
<|assistant|>
SELECT COUNT("position") FROM "qualified_competitors" WHERE "gymnast"='oleksandr vorobiov ( ukr )' AND "total">16.25;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the total for Robert Stanescu ( rou ), when the B Score is larger than 8.75?
<|assistant|>
SELECT SUM("total") FROM "qualified_competitors" WHERE "gymnast"='robert stanescu ( rou )' AND "b_score">8.75;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Poland has what notes?
<|assistant|>
SELECT "notes" FROM "repechage" WHERE "country"='poland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is Croatia's rank?
<|assistant|>
SELECT "rank" FROM "repechage" WHERE "country"='croatia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: When rank is 5, what is the rowers?
<|assistant|>
SELECT "rowers" FROM "repechage" WHERE "rank"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "repechage" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the average rank for Denmark?
<|assistant|>
SELECT AVG("rank") FROM "repechage" WHERE "country"='denmark';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_housing_and_construction_ministe" (
"minister" text,
"party" text,
"governments" text,
"term_start" text,
"term_end" text
);
Question: What is the end of the term for Kadima that started on 18 January 2006?
<|assistant|>
SELECT "term_end" FROM "list_of_housing_and_construction_ministe" WHERE "party"='kadima' AND "term_start"='18 january 2006';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_housing_and_construction_ministe" (
"minister" text,
"party" text,
"governments" text,
"term_start" text,
"term_end" text
);
Question: Whose term started on 4 May 2006?
<|assistant|>
SELECT "minister" FROM "list_of_housing_and_construction_ministe" WHERE "term_start"='4 may 2006';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performance_and_rankings_timeline" (
"2005_06" text,
"2006_07" text,
"2007_08" text,
"2009_10" text,
"2010_11" text,
"2011_12" text,
"2012_13" text
);
Question: Which 2005/ 06 has a 2006/ 07 of ur?
<|assistant|>
SELECT "2005_06" FROM "performance_and_rankings_timeline" WHERE "2006_07"='ur';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performance_and_rankings_timeline" (
"2005_06" text,
"2006_07" text,
"2007_08" text,
"2009_10" text,
"2010_11" text,
"2011_12" text,
"2012_13" text
);
Question: Which 2005/ 06 has a 2011/ 12 of ranking tournaments
<|assistant|>
SELECT "2005_06" FROM "performance_and_rankings_timeline" WHERE "2011_12"='ranking tournaments';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performance_and_rankings_timeline" (
"2005_06" text,
"2006_07" text,
"2007_08" text,
"2009_10" text,
"2010_11" text,
"2011_12" text,
"2012_13" text
);
Question: Which the 2007/ 08 has a 2006/ 07 of 1r?
<|assistant|>
SELECT "2007_08" FROM "performance_and_rankings_timeline" WHERE "2006_07"='1r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performance_and_rankings_timeline" (
"2005_06" text,
"2006_07" text,
"2007_08" text,
"2009_10" text,
"2010_11" text,
"2011_12" text,
"2012_13" text
);
Question: Which 2010/ 11 has a 2011/ 12 of wr?
<|assistant|>
SELECT "2010_11" FROM "performance_and_rankings_timeline" WHERE "2011_12"='wr';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performance_and_rankings_timeline" (
"2005_06" text,
"2006_07" text,
"2007_08" text,
"2009_10" text,
"2010_11" text,
"2011_12" text,
"2012_13" text
);
Question: Which in 2007/ 08 has a 2009/ 10 of non-ranking?
<|assistant|>
SELECT "2007_08" FROM "performance_and_rankings_timeline" WHERE "2009_10"='non-ranking';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performance_and_rankings_timeline" (
"2005_06" text,
"2006_07" text,
"2007_08" text,
"2009_10" text,
"2010_11" text,
"2011_12" text,
"2012_13" text
);
Question: Name the 2010/ 11 which has a 2006/ 07 of not held, and a 2011/ 12 of a, and a 2012/ 13 of a?
<|assistant|>
SELECT "2010_11" FROM "performance_and_rankings_timeline" WHERE "2006_07"='not held' AND "2011_12"='a' AND "2012_13"='a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What's the number of bronze when they are ranked 29, had a total more than 3 and less than 2 golds?
<|assistant|>
SELECT MIN("bronze") FROM "medal_table" WHERE "gold"<2 AND "rank"='29' AND "total">3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What's the bronze medal count for Rank 33 when the silver count was less than 2 and the total was more than 4?
<|assistant|>
SELECT MAX("bronze") FROM "medal_table" WHERE "silver"<2 AND "total">4 AND "rank"='33';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many silver for rank 22 when gold count was more than 0 and Bronze count was less than 5?
<|assistant|>
SELECT SUM("silver") FROM "medal_table" WHERE "bronze"<5 AND "gold">0 AND "rank"='22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What's the bronze count for South Africa (RSA) with a total more than 16?
<|assistant|>
SELECT MAX("bronze") FROM "medal_table" WHERE "nation"='south africa (rsa)' AND "total">16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces" (
"province" text,
"inhabitants" real,
"established" real,
"president" text,
"party" text,
"election" real
);
Question: What was the lowest election result for President Leonardo Marras with an area smaller than 227,063 people?
<|assistant|>
SELECT MIN("election") FROM "provinces" WHERE "president"='leonardo marras' AND "inhabitants"<'227,063';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces" (
"province" text,
"inhabitants" real,
"established" real,
"president" text,
"party" text,
"election" real
);
Question: What is the party affiliation for President Stefano Baccelli?
<|assistant|>
SELECT "party" FROM "provinces" WHERE "president"='stefano baccelli';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces" (
"province" text,
"inhabitants" real,
"established" real,
"president" text,
"party" text,
"election" real
);
Question: What is the average election result for the province of Grosseto from 1766 and prior?
<|assistant|>
SELECT AVG("election") FROM "provinces" WHERE "province"='grosseto' AND "established"<1766;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislation_sponsored_by_john_mc_cain" (
"years_covered" text,
"all_bills_sponsored" real,
"all_amendments_sponsored" real,
"all_bills_cosponsored" real,
"all_amendments_cosponsored" real,
"bills_originally_cosponsored" real,
"amendments_originally_cosponsored" real
);
Question: What is the total number of all bills co-sponsored associated with all amendments sponsored under 15, all bills sponsored of 6, and 0 amendments cosponsored?
<|assistant|>
SELECT COUNT("all_bills_cosponsored") FROM "legislation_sponsored_by_john_mc_cain" WHERE "all_amendments_sponsored"<15 AND "all_bills_sponsored"=6 AND "all_amendments_cosponsored"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislation_sponsored_by_john_mc_cain" (
"years_covered" text,
"all_bills_sponsored" real,
"all_amendments_sponsored" real,
"all_bills_cosponsored" real,
"all_amendments_cosponsored" real,
"bills_originally_cosponsored" real,
"amendments_originally_cosponsored" real
);
Question: What is the fewest amendments sponsored associated with 150 bills originally cosponsored and over 247 bills cosponsored?
<|assistant|>
SELECT MIN("all_amendments_sponsored") FROM "legislation_sponsored_by_john_mc_cain" WHERE "bills_originally_cosponsored"=150 AND "all_bills_cosponsored">247;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislation_sponsored_by_john_mc_cain" (
"years_covered" text,
"all_bills_sponsored" real,
"all_amendments_sponsored" real,
"all_bills_cosponsored" real,
"all_amendments_cosponsored" real,
"bills_originally_cosponsored" real,
"amendments_originally_cosponsored" real
);
Question: What is the highest number of bills cosponsored associated with under 24 bills sponsored and under 16 amendments sponsored?
<|assistant|>
SELECT MAX("all_bills_cosponsored") FROM "legislation_sponsored_by_john_mc_cain" WHERE "all_bills_sponsored"<24 AND "all_amendments_sponsored"<16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislation_sponsored_by_john_mc_cain" (
"years_covered" text,
"all_bills_sponsored" real,
"all_amendments_sponsored" real,
"all_bills_cosponsored" real,
"all_amendments_cosponsored" real,
"bills_originally_cosponsored" real,
"amendments_originally_cosponsored" real
);
Question: What is the highest number of amendments cosponsored associated with 53 amendments originally cosponsored and over 54 bills sponsored?
<|assistant|>
SELECT MAX("all_amendments_cosponsored") FROM "legislation_sponsored_by_john_mc_cain" WHERE "amendments_originally_cosponsored"=53 AND "all_bills_sponsored">54;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislation_sponsored_by_john_mc_cain" (
"years_covered" text,
"all_bills_sponsored" real,
"all_amendments_sponsored" real,
"all_bills_cosponsored" real,
"all_amendments_cosponsored" real,
"bills_originally_cosponsored" real,
"amendments_originally_cosponsored" real
);
Question: What is the number of bills sponsored associated with over 113 bills originally cosponsored and under 47 amendments cosponsored?
<|assistant|>
SELECT "all_bills_sponsored" FROM "legislation_sponsored_by_john_mc_cain" WHERE "bills_originally_cosponsored">113 AND "all_amendments_cosponsored"<47;<|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: What is the Lane of the swimmer from Uzbekistan in Heat 1?
<|assistant|>
SELECT COUNT("lane") FROM "heats" WHERE "heat"=1 AND "nationality"='uzbekistan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_radio_stations_in_malaysia" (
"frequency" text,
"station" text,
"operator" text,
"country_of_origin" text,
"transmitter_location" text,
"format" text
);
Question: Which station has a frequency of 873khz?
<|assistant|>
SELECT "station" FROM "list_of_radio_stations_in_malaysia" WHERE "frequency"='873khz';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_radio_stations_in_malaysia" (
"frequency" text,
"station" text,
"operator" text,
"country_of_origin" text,
"transmitter_location" text,
"format" text
);
Question: Where is the transmitter located for the station voice of vietnam
<|assistant|>
SELECT "transmitter_location" FROM "list_of_radio_stations_in_malaysia" WHERE "station"='voice of vietnam';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_radio_stations_in_malaysia" (
"frequency" text,
"station" text,
"operator" text,
"country_of_origin" text,
"transmitter_location" text,
"format" text
);
Question: Which station is from China and has a frequency of 684khz?
<|assistant|>
SELECT "station" FROM "list_of_radio_stations_in_malaysia" WHERE "country_of_origin"='china' AND "frequency"='684khz';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
Question: Name the Tally of an Opposition of westmeath?
<|assistant|>
SELECT "tally" FROM "single_game" WHERE "opposition"='westmeath';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individuals" (
"position" real,
"gymnast" text,
"floor" text,
"pommel_horse" text,
"rings" text,
"vault" text,
"parallel_bars" text,
"horizontal_bar" text,
"total" real
);
Question: What is the horizontal bar score with a pommel horse of n/a, and the position is less than 27, and the parallel bars score is 15.800?
<|assistant|>
SELECT "horizontal_bar" FROM "individuals" WHERE "pommel_horse"='n/a' AND "position"<27 AND "parallel_bars"='15.800';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individuals" (
"position" real,
"gymnast" text,
"floor" text,
"pommel_horse" text,
"rings" text,
"vault" text,
"parallel_bars" text,
"horizontal_bar" text,
"total" real
);
Question: What is the score of the floor when the position is less than 21, and less than 81.2 total, and the pommel horse score is 13.925?
<|assistant|>
SELECT "floor" FROM "individuals" WHERE "position"<21 AND "total"<81.2 AND "pommel_horse"='13.925';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individuals" (
"position" real,
"gymnast" text,
"floor" text,
"pommel_horse" text,
"rings" text,
"vault" text,
"parallel_bars" text,
"horizontal_bar" text,
"total" real
);
Question: Who is the gymnast with a floor score of 14.800?
<|assistant|>
SELECT "gymnast" FROM "individuals" WHERE "floor"='14.800';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individuals" (
"position" real,
"gymnast" text,
"floor" text,
"pommel_horse" text,
"rings" text,
"vault" text,
"parallel_bars" text,
"horizontal_bar" text,
"total" real
);
Question: What horizontal bar score also has a pommel horse score of 15.250?
<|assistant|>
SELECT "horizontal_bar" FROM "individuals" WHERE "pommel_horse"='15.250';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "individuals" (
"position" real,
"gymnast" text,
"floor" text,
"pommel_horse" text,
"rings" text,
"vault" text,
"parallel_bars" text,
"horizontal_bar" text,
"total" real
);
Question: With a parallel bars score of 14.625 what is the average total?
<|assistant|>
SELECT AVG("total") FROM "individuals" WHERE "parallel_bars"='14.625';<|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 of the Athletes with a Time of 3:43.491?
<|assistant|>
SELECT COUNT("rank") FROM "heat_1" WHERE "time"='3:43.491';<|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 are the Notes of the Athletes from Germany?
<|assistant|>
SELECT "notes" FROM "heat_1" WHERE "country"='germany';<|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 of the Athletes from Ukraine?
<|assistant|>
SELECT COUNT("rank") FROM "heat_1" WHERE "country"='ukraine';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What location did Sherry Middaugh win in?
<|assistant|>
SELECT "location" FROM "winners" WHERE "winning_skip"='sherry middaugh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What event did Patti Lank have the winning skip?
<|assistant|>
SELECT "event" FROM "winners" WHERE "winning_skip"='patti lank';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What date shows Binia Feltscher-Beeli as the runner-up skip?
<|assistant|>
SELECT "date" FROM "winners" WHERE "runner_up_skip"='binia feltscher-beeli';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"event" text,
"date" text,
"location" text,
"winning_skip" text,
"runner_up_skip" text
);
Question: What person was the runner-up skip when Julie Reddick was the winning skip?
<|assistant|>
SELECT "runner_up_skip" FROM "winners" WHERE "winning_skip"='julie reddick';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "total_fertility_rate" (
"brazil_100pct" text,
"white_47_73pct" text,
"black_7_61pct" text,
"yellow_1_09pct" text,
"brown_multiracial_43_13pct" text,
"indians_0_43pct" text
);
Question: What's the Yellow fertility rate when Brazil is 0,43407?
<|assistant|>
SELECT "yellow_1_09pct" FROM "total_fertility_rate" WHERE "brazil_100pct"='0,43407';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"name" text,
"type" text,
"population_2011" real,
"population_2006" real,
"area_km_2" real
);
Question: What is the sum of the area in km with a population of 110 in 2011?
<|assistant|>
SELECT SUM("area_km_2") FROM "list" WHERE "population_2011"=110;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list" (
"name" text,
"type" text,
"population_2011" real,
"population_2006" real,
"area_km_2" real
);
Question: What is the average population in 2006 that has more than 5 people in 2011 and an area 5.84km?
<|assistant|>
SELECT AVG("population_2006") FROM "list" WHERE "population_2011">5 AND "area_km_2"=5.84;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What is the lowest lane with a 0.216 react?
<|assistant|>
SELECT MIN("lane") FROM "semifinal_2" WHERE "react"=0.216;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What is the total rank for the lane before 2?
<|assistant|>
SELECT SUM("rank") FROM "semifinal_2" WHERE "lane"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What genre is the game from the year 2007?
<|assistant|>
SELECT "genre" FROM "readers_choice" WHERE "year"=2007;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the Game that came out before the year 2009 for the Playstation 3?
<|assistant|>
SELECT "game" FROM "readers_choice" WHERE "platform_s"='playstation 3' AND "year"<2009;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the earliest year that had the Legend of Zelda: Twilight Princess game?
<|assistant|>
SELECT MIN("year") FROM "readers_choice" WHERE "game"='the legend of zelda: twilight princess';<|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: Who was the opponent on November 15, 1981?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "date"='november 15, 1981';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1950s" (
"debut_year" real,
"player" text,
"games" real,
"goals" real,
"years_at_club" text
);
Question: Which Debut year has a Player of noel carroll, and Games smaller than 12?
<|assistant|>
SELECT MAX("debut_year") FROM "1950s" WHERE "player"='noel carroll' AND "games"<12;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1950s" (
"debut_year" real,
"player" text,
"games" real,
"goals" real,
"years_at_club" text
);
Question: Which Goals have a Player of noel carroll?
<|assistant|>
SELECT MIN("goals") FROM "1950s" WHERE "player"='noel carroll';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1950s" (
"debut_year" real,
"player" text,
"games" real,
"goals" real,
"years_at_club" text
);
Question: How many debut years have Years at club of 1950–1951, and Games larger than 14?
<|assistant|>
SELECT SUM("debut_year") FROM "1950s" WHERE "years_at_club"='1950–1951' AND "games">14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "greatest_hits_best_of_compilations" (
"title" text,
"label" text,
"year_of_release" real,
"country_of_release" text,
"peaches" text
);
Question: Which title has origianal sound entertainment as its label?
<|assistant|>
SELECT "title" FROM "greatest_hits_best_of_compilations" WHERE "label"='origianal sound entertainment';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "greatest_hits_best_of_compilations" (
"title" text,
"label" text,
"year_of_release" real,
"country_of_release" text,
"peaches" text
);
Question: What was the earliest year of release for Peaches: Francine Barker with the wounded bird label?
<|assistant|>
SELECT MIN("year_of_release") FROM "greatest_hits_best_of_compilations" WHERE "peaches"='francine barker' AND "label"='wounded bird';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "greatest_hits_best_of_compilations" (
"title" text,
"label" text,
"year_of_release" real,
"country_of_release" text,
"peaches" text
);
Question: What was the latest year of release for the greatest hits title?
<|assistant|>
SELECT MAX("year_of_release") FROM "greatest_hits_best_of_compilations" WHERE "title"='greatest hits';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "greatest_hits_best_of_compilations" (
"title" text,
"label" text,
"year_of_release" real,
"country_of_release" text,
"peaches" text
);
Question: When the country of release is EU, what is the label name?
<|assistant|>
SELECT "label" FROM "greatest_hits_best_of_compilations" WHERE "country_of_release"='eu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "k" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: what is the highest latitude when the township is kingsley and the geo id is higher than 3803942820?
<|assistant|>
SELECT MAX("latitude") FROM "k" WHERE "township"='kingsley' AND "geo_id">3803942820;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "k" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: what is the latitude when water (sqmi) is 0.058 and the ansi code is less than 1759683?
<|assistant|>
SELECT AVG("latitude") FROM "k" WHERE "water_sqmi"=0.058 AND "ansi_code"<1759683;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "k" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: what is the geo id when the longitude is -98.435797 and the land (sqmi) is less than 36.039?
<|assistant|>
SELECT MAX("geo_id") FROM "k" WHERE "longitude"=-98.435797 AND "land_sqmi"<36.039;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
Question: Name the lowest Year Joined which has a Mascot of pioneers?
<|assistant|>
SELECT MIN("year_joined") FROM "membership" WHERE "mascot"='pioneers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
Question: Name the IHSAA Class of Mascot of pioneers?
<|assistant|>
SELECT "ihsaa_class" FROM "membership" WHERE "mascot"='pioneers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
Question: Name the IHSAA Class of 55 morgan and a School of mooresville?
<|assistant|>
SELECT "ihsaa_class" FROM "membership" WHERE "county"='55 morgan' AND "school"='mooresville';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
Question: where is Mascot of quakers?
<|assistant|>
SELECT "location" FROM "membership" WHERE "mascot"='quakers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"county" text,
"year_joined" real,
"previous_conference" text
);
Question: What kind of IHSAA Class has a School of decatur central?
<|assistant|>
SELECT "ihsaa_class" FROM "membership" WHERE "school"='decatur central';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"title" text,
"director" text,
"studio_s" text,
"notes" text
);
Question: What studio had the director Peter Lord Nick Park before 2004?
<|assistant|>
SELECT "studio_s" FROM "2000s" WHERE "year"<2004 AND "director"='peter lord nick park';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"title" text,
"director" text,
"studio_s" text,
"notes" text
);
Question: What studio did Paul Greengrass direct in 2007?
<|assistant|>
SELECT "studio_s" FROM "2000s" WHERE "year"=2007 AND "director"='paul greengrass';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "parallel_bars_event_final_qualifiers" (
"position" text,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
Question: What is the A score when the B score is more than 9.15 and the gymnast was in the 2nd position?
<|assistant|>
SELECT SUM("a_score") FROM "parallel_bars_event_final_qualifiers" WHERE "b_score">9.15 AND "position"='2nd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "railbuses" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"axle_arrangement_uic" text
);
Question: what is the quantity when the year of manufacture is 1900 and the class is mc?
<|assistant|>
SELECT "quantity" FROM "railbuses" WHERE "year_s_of_manufacture"='1900' AND "class"='mc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "railbuses" (
"class" text,
"railway_number_s" text,
"quantity" real,
"year_s_of_manufacture" text,
"axle_arrangement_uic" text
);
Question: what is the class when the quantity is 4?
<|assistant|>
SELECT "class" FROM "railbuses" WHERE "quantity"=4;<|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: Who were the opponents on Week 8?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_statistics_at_least_1_000_000_passe" (
"country" text,
"airport" text,
"city" text,
"2012" real,
"change_12_11" text
);
Question: When the city is agadir what is the change (12/11)?
<|assistant|>
SELECT "change_12_11" FROM "2012_statistics_at_least_1_000_000_passe" WHERE "city"='agadir';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"a_side" text,
"b_side" text,
"catalog_number" text,
"label" text
);
Question: What is the catalog number of Venus Demilo's A-side?
<|assistant|>
SELECT "catalog_number" FROM "singles" WHERE "a_side"='venus demilo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"a_side" text,
"b_side" text,
"catalog_number" text,
"label" text
);
Question: What year did the B-Side of Just Squeeze Me come out?
<|assistant|>
SELECT "year" FROM "singles" WHERE "b_side"='just squeeze me';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"a_side" text,
"b_side" text,
"catalog_number" text,
"label" text
);
Question: What label has the 817 catalog?
<|assistant|>
SELECT "label" FROM "singles" WHERE "catalog_number"='817';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"a_side" text,
"b_side" text,
"catalog_number" text,
"label" text
);
Question: What is the A-side for it Never Entered My Mind, Part 2?
<|assistant|>
SELECT "a_side" FROM "singles" WHERE "b_side"='it never entered my mind, part 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"a_side" text,
"b_side" text,
"catalog_number" text,
"label" text
);
Question: What is the A-side for catalog 902?
<|assistant|>
SELECT "a_side" FROM "singles" WHERE "catalog_number"='902';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "railbuses" (
"class" text,
"railway_number_s" text,
"quantity" text,
"year_s_of_manufacture" text,
"type" text
);
Question: What is the class of the a1 bm type?
<|assistant|>
SELECT "class" FROM "railbuses" WHERE "type"='a1 bm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "railbuses" (
"class" text,
"railway_number_s" text,
"quantity" text,
"year_s_of_manufacture" text,
"type" text
);
Question: What is the quantity of the aw class?
<|assistant|>
SELECT "quantity" FROM "railbuses" WHERE "class"='aw';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "railbuses" (
"class" text,
"railway_number_s" text,
"quantity" text,
"year_s_of_manufacture" text,
"type" text
);
Question: What is the class with 1 quantity?
<|assistant|>
SELECT "class" FROM "railbuses" WHERE "quantity"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "railbuses" (
"class" text,
"railway_number_s" text,
"quantity" text,
"year_s_of_manufacture" text,
"type" text
);
Question: What is the railway number of the aw class?
<|assistant|>
SELECT "railway_number_s" FROM "railbuses" WHERE "class"='aw';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What was the game when the record was 31-15?
<|assistant|>
SELECT "game" FROM "game_log" WHERE "record"='31-15';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What was the date of the game with a score of W 106-100?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "score"='w 106-100';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "twin_cylinder_race" (
"rank" text,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What is the speed for rank 1?
<|assistant|>
SELECT "speed" FROM "twin_cylinder_race" WHERE "rank"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "twin_cylinder_race" (
"rank" text,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What team has a Rank Ret, and rider Frank A Applebee?
<|assistant|>
SELECT "team" FROM "twin_cylinder_race" WHERE "rank"='ret' AND "rider"='frank a applebee';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "global_usage_share_data_from_get_clicky_" (
"period" text,
"internet_explorer" text,
"chrome" text,
"firefox" text,
"safari" text,
"opera" text,
"other_mozilla" text
);
Question: What internet explorer has 29.07% for the chrome?
<|assistant|>
SELECT "internet_explorer" FROM "global_usage_share_data_from_get_clicky_" WHERE "chrome"='29.07%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "global_usage_share_data_from_get_clicky_" (
"period" text,
"internet_explorer" text,
"chrome" text,
"firefox" text,
"safari" text,
"opera" text,
"other_mozilla" text
);
Question: What is the other mozilla that has 9.41% for the safari?
<|assistant|>
SELECT "other_mozilla" FROM "global_usage_share_data_from_get_clicky_" WHERE "safari"='9.41%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "global_usage_share_data_from_get_clicky_" (
"period" text,
"internet_explorer" text,
"chrome" text,
"firefox" text,
"safari" text,
"opera" text,
"other_mozilla" text
);
Question: What other mozilla has January 2010 as the period?
<|assistant|>
SELECT "other_mozilla" FROM "global_usage_share_data_from_get_clicky_" WHERE "period"='january 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "global_usage_share_data_from_get_clicky_" (
"period" text,
"internet_explorer" text,
"chrome" text,
"firefox" text,
"safari" text,
"opera" text,
"other_mozilla" text
);
Question: What internet explorer has 7.89% as the safari, and 8.22% as the chrome?
<|assistant|>
SELECT "internet_explorer" FROM "global_usage_share_data_from_get_clicky_" WHERE "safari"='7.89%' AND "chrome"='8.22%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "global_usage_share_data_from_get_clicky_" (
"period" text,
"internet_explorer" text,
"chrome" text,
"firefox" text,
"safari" text,
"opera" text,
"other_mozilla" text
);
Question: What period has 0.25% as the other mozilla?
<|assistant|>
SELECT "period" FROM "global_usage_share_data_from_get_clicky_" WHERE "other_mozilla"='0.25%';<|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: Which socket goes with the item with release price of $378 and turbo of 6/6/8/9?
<|assistant|>
SELECT "socket" FROM "sandy_bridge_quad_core_32_nm" WHERE "release_price_usd"='$378' AND "turbo"='6/6/8/9';<|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 L2 cache for the core i7-2635QM?
<|assistant|>
SELECT "l2_cache" FROM "sandy_bridge_quad_core_32_nm" WHERE "model_number"='core i7-2635qm';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.