text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which Points have a Grid larger than 7, and a Driver of alex tagliani, and a Lapse smaller than 85?
<|assistant|>
SELECT MAX("points") FROM "race" WHERE "grid">7 AND "driver"='alex tagliani' AND "laps"<85;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_country" (
"country" text,
"matches" real,
"wins" real,
"wins_pct" text,
"draws" real,
"draws_pct" text,
"loses" real,
"loses_pct" text,
"against" real,
"for_against_ratio" text
);
Question: What is the total number of wins for a nation that played fewer than 8 matches and a Wins percentage of 62.5%?
<|assistant|>
SELECT COUNT("wins") FROM "by_country" WHERE "wins_pct"='62.5%' AND "matches"<8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_country" (
"country" text,
"matches" real,
"wins" real,
"wins_pct" text,
"draws" real,
"draws_pct" text,
"loses" real,
"loses_pct" text,
"against" real,
"for_against_ratio" text
);
Question: What is the highest number of matches for a nation with a Loses percentage of 26.67% and fewer than 90 draws?
<|assistant|>
SELECT MAX("matches") FROM "by_country" WHERE "loses_pct"='26.67%' AND "draws"<90;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What date has uefa euro 2008 qualification as the competition?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "competition"='uefa euro 2008 qualification';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What date has friendly as the competition, with pretoria, South Africa as the venue?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "competition"='friendly' AND "venue"='pretoria, south africa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "senior_career" (
"year" real,
"competition_description" text,
"location" text,
"apparatus" text,
"rank_final" real,
"score_final" real
);
Question: What is the lowest final score of the American Cup competition before 2009?
<|assistant|>
SELECT MIN("score_final") FROM "senior_career" WHERE "competition_description"='american cup' AND "year"<2009;<|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 result for the game before week 7 against BYE?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week"<7 AND "opponent"='bye';<|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 was the date for the game after week 16?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "week">16;<|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 was the attendance for the game against tampa bay buccaneers?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "opponent"='tampa bay buccaneers';<|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 was the date of the game after week 5 with 62,262 fans attending?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "week">5 AND "attendance"='62,262';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: Which Location has a Record of 5–2–1?
<|assistant|>
SELECT "location" FROM "mixed_martial_arts_record" WHERE "record"='5–2–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" real,
"time" text,
"location" text
);
Question: Which Record has an Event of inoki bom-ba-ye 2002?
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "event"='inoki bom-ba-ye 2002';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: Which Opponent has a Record of 2–0?
<|assistant|>
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='2–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" real,
"time" text,
"location" text
);
Question: Which Record has a Round larger than 2, and an Event of bellator 38?
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "round">2 AND "event"='bellator 38';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"hometown_school" text
);
Question: What was John Jones's pick#?
<|assistant|>
SELECT SUM("pick") FROM "first_round_selections" WHERE "player"='john jones';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"hometown_school" text
);
Question: What was the pick # of the player who has a hometown/school of Atlanta, GA?
<|assistant|>
SELECT AVG("pick") FROM "first_round_selections" WHERE "hometown_school"='atlanta, ga';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "broadcasters" (
"mexico" text,
"ma_ana_es_para_siempre" text,
"el_canal_de_las_estrellas" text,
"october_20_2008" text,
"june_14_2009" text,
"monday_to_friday" text
);
Question: What is the El Canal de las Estrellas held from June 14, 2009 to February 23, 2010?
<|assistant|>
SELECT "el_canal_de_las_estrellas" FROM "broadcasters" WHERE "june_14_2009"='february 23, 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "broadcasters" (
"mexico" text,
"ma_ana_es_para_siempre" text,
"el_canal_de_las_estrellas" text,
"october_20_2008" text,
"june_14_2009" text,
"monday_to_friday" text
);
Question: What is Mañana es para siempre of impreuna pentru totdeauna from Monday to Friday?
<|assistant|>
SELECT "monday_to_friday" FROM "broadcasters" WHERE "ma_ana_es_para_siempre"='impreuna pentru totdeauna';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "broadcasters" (
"mexico" text,
"ma_ana_es_para_siempre" text,
"el_canal_de_las_estrellas" text,
"october_20_2008" text,
"june_14_2009" text,
"monday_to_friday" text
);
Question: When does the El Canal de las Estrellas of pop tv show from Monday to Friday?
<|assistant|>
SELECT "monday_to_friday" FROM "broadcasters" WHERE "el_canal_de_las_estrellas"='pop tv';<|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,
"county" text
);
Question: What is the enrollment for the AAAA class in IHSAA?
<|assistant|>
SELECT SUM("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_football_class"='aaaa';<|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,
"county" text
);
Question: What is the IHSAA Football class at Culver?
<|assistant|>
SELECT "ihsaa_football_class" FROM "indiana_high_school_athletics_conference" WHERE "location"='culver';<|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,
"county" text
);
Question: What school has the Lancers as their mascot?
<|assistant|>
SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='lancers';<|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,
"county" text
);
Question: What is the total enrollment at Laville?
<|assistant|>
SELECT COUNT("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "school"='laville';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ncaa_football_attendance_leaders" (
"rank" real,
"team" text,
"games" real,
"total" real,
"avg" real
);
Question: What is the highest average for teams ranked higher than 9?
<|assistant|>
SELECT MAX("avg") FROM "2012_ncaa_football_attendance_leaders" WHERE "rank">9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: What is the name of the 2008 club with Nadia Centoni Category:Articles with hCards?
<|assistant|>
SELECT "2008_club" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "name"='nadia centoni category:articles with hcards';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: What is the name for the 2008 club Despar Sirio Perugia?
<|assistant|>
SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='despar sirio perugia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: What is the spike for the 2008 club Despar Sirio Perugia?
<|assistant|>
SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='despar sirio perugia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: What is the spike for 2008 club Yamamay Busto Arsizio?
<|assistant|>
SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='yamamay busto arsizio';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: Which 2008 club has the name Francesca Piccinini Category:Articles with hCards?
<|assistant|>
SELECT "2008_club" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "name"='francesca piccinini category:articles with hcards';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1933_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the least amount of wins when against is 1314?
<|assistant|>
SELECT MIN("wins") FROM "1933_ladder" WHERE "against"=1314;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1933_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the number of against when the wins were 8, and a Club of South Warrnambool, with less than 0 draws?
<|assistant|>
SELECT SUM("against") FROM "1933_ladder" WHERE "wins"=8 AND "club"='south warrnambool' AND "draws"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1933_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the number of wins when the against is larger than 1155, for Warrnambool, with more than 0 draws?
<|assistant|>
SELECT AVG("wins") FROM "1933_ladder" WHERE "against">1155 AND "club"='warrnambool' AND "draws">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grade_distribution" (
"score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What score has 15.0% as the 2012?
<|assistant|>
SELECT "score" FROM "grade_distribution" WHERE "2012"='15.0%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grade_distribution" (
"score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What 2012 has 2 as the score?
<|assistant|>
SELECT "2012" FROM "grade_distribution" WHERE "score"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grade_distribution" (
"score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What 2008 has 14.2% as the 2009?
<|assistant|>
SELECT "2008" FROM "grade_distribution" WHERE "2009"='14.2%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grade_distribution" (
"score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What score has 15.0% as the 2012?
<|assistant|>
SELECT "score" FROM "grade_distribution" WHERE "2012"='15.0%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grade_distribution" (
"score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What 2009 has 18.5% as the 2007?
<|assistant|>
SELECT "2009" FROM "grade_distribution" WHERE "2007"='18.5%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grade_distribution" (
"score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What 2011 has 12.7% as the 2010?
<|assistant|>
SELECT "2011" FROM "grade_distribution" WHERE "2010"='12.7%';<|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 with a Result of L 24-0?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "result"='l 24-0';<|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 December 18, 1960?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "date"='december 18, 1960';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overall" (
"team" text,
"matches" real,
"wins" real,
"wins_pct" text,
"draws" real,
"draws_pct" text,
"loses" real,
"loses_pct" text,
"against" real
);
Question: Which Draws % has Wins larger than 1, and Loses % of 0%, and a Team of al-zawraa?
<|assistant|>
SELECT "draws_pct" FROM "overall" WHERE "wins">1 AND "loses_pct"='0%' AND "team"='al-zawraa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school" text
);
Question: Which pick played the Defensive End position?
<|assistant|>
SELECT "pick" FROM "nfl_draft" WHERE "position"='defensive end';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school" text
);
Question: How many picks were taken before round 3 and played Linebacker?
<|assistant|>
SELECT COUNT("pick") FROM "nfl_draft" WHERE "position"='linebacker' AND "round"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overall" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the average number of silver medals won among nations that won 9 medals total?
<|assistant|>
SELECT AVG("silver") FROM "overall" WHERE "total"=9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2001_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
Question: Which Round has a Pick larger than 179?
<|assistant|>
SELECT MAX("round") FROM "2001_ohio_state_buckeyes_football_team" WHERE "pick">179;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2001_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
Question: What is jamar martin's highest pick?
<|assistant|>
SELECT MAX("pick") FROM "2001_ohio_state_buckeyes_football_team" WHERE "player"='jamar martin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_6b_ultra_lightweight_manx_grand_pri" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What teams rank is higher than 4 with a speed of 104.574mph?
<|assistant|>
SELECT "team" FROM "race_6b_ultra_lightweight_manx_grand_pri" WHERE "rank">4 AND "speed"='104.574mph';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_6b_ultra_lightweight_manx_grand_pri" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What team does Anthony Redmond ride for?
<|assistant|>
SELECT "team" FROM "race_6b_ultra_lightweight_manx_grand_pri" WHERE "rider"='anthony redmond';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race_6b_ultra_lightweight_manx_grand_pri" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What was the speed with a time of 1:03.41.86 and a rank smaller than 3?
<|assistant|>
SELECT "speed" FROM "race_6b_ultra_lightweight_manx_grand_pri" WHERE "rank"<3 AND "time"='1:03.41.86';<|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,
"num_county" text
);
Question: What school in 72 Scott county has an enrollment more than 473 with an AAA IHSAA Class?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "enrollment">473 AND "ihsaa_class"='aaa' AND "num_county"='72 scott';<|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,
"num_county" text
);
Question: What's the mascot of Eastern Pekin having less than 627 enrolled and an AA for their IHSAA Class?
<|assistant|>
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "enrollment"<627 AND "ihsaa_class"='aa' AND "school"='eastern pekin';<|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,
"num_county" text
);
Question: What's the most enrolled having the dragons for a mascot and an AAA for the IHSAA Class?
<|assistant|>
SELECT MAX("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aaa' AND "mascot"='dragons';<|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,
"num_county" text
);
Question: What's the county of Eastern Pekin school with fewer than 774 enrolled?
<|assistant|>
SELECT "num_county" FROM "indiana_high_school_athletics_conference" WHERE "enrollment"<774 AND "school"='eastern pekin';<|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,
"num_county" text
);
Question: What's the location of the school having the panthers as a mascot with an AAA for the IHSAA Class?
<|assistant|>
SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aaa' AND "mascot"='panthers';<|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,
"num_county" text
);
Question: What's the IHSAA Class when the mascot was the Musketeers?
<|assistant|>
SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='musketeers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965" (
"title" text,
"series" text,
"director" text,
"characters" text,
"release_date" text
);
Question: Who was the director of Chaser on the Rocks?
<|assistant|>
SELECT "director" FROM "1965" WHERE "title"='chaser on the rocks';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1965" (
"title" text,
"series" text,
"director" text,
"characters" text,
"release_date" text
);
Question: What are the characters from the movie Suppressed Duck?
<|assistant|>
SELECT "characters" FROM "1965" WHERE "title"='suppressed duck';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
Question: How many picks on average did Jay Bruchak have before round 6?
<|assistant|>
SELECT AVG("pick") FROM "draft_picks" WHERE "player"='jay bruchak' AND "round"<6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
Question: How many rounds did Pierre Bland have a pick larger than 148?
<|assistant|>
SELECT COUNT("round") FROM "draft_picks" WHERE "pick">148 AND "player"='pierre bland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
Question: What was the earliest round that Purdue had a pick larger than 10?
<|assistant|>
SELECT MIN("round") FROM "draft_picks" WHERE "college"='purdue' AND "pick">10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
Question: How many picks did Jay Bruchak have?
<|assistant|>
SELECT COUNT("pick") FROM "draft_picks" WHERE "player"='jay bruchak';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "attendance" (
"attendance" real,
"round" text,
"date" text,
"home" text,
"score" text,
"away" text,
"venue" text,
"weekday" text,
"time_of_day" text
);
Question: In what round was the Alianza home game?
<|assistant|>
SELECT "round" FROM "attendance" WHERE "home"='alianza';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "attendance" (
"attendance" real,
"round" text,
"date" text,
"home" text,
"score" text,
"away" text,
"venue" text,
"weekday" text,
"time_of_day" text
);
Question: What was the visiting team that played a round 16 game?
<|assistant|>
SELECT "away" FROM "attendance" WHERE "round"='round 16';<|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: How many weeks have an Attendance of 62,289?
<|assistant|>
SELECT SUM("week") FROM "schedule" WHERE "attendance"='62,289';<|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: Which Week has an Attendance larger than 65,070?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "attendance">'65,070';<|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: Which Week has an Opponent of atlanta falcons, and an Attendance smaller than 63,114?
<|assistant|>
SELECT MIN("week") FROM "schedule" WHERE "opponent"='atlanta falcons' AND "attendance"<'63,114';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"season" text,
"division" text,
"tms" text,
"pos" text,
"pff_nmcc" text,
"ufl_cup" text,
"afc_pc" text
);
Question: which Tms has a Season of 2013?
<|assistant|>
SELECT "tms" FROM "records" WHERE "season"='2013';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "main_places" (
"place" text,
"code" real,
"area_km_2" real,
"population" real,
"most_spoken_language" text
);
Question: What's the population with a code more than 90902 and an area less than 1,335.47?
<|assistant|>
SELECT MIN("population") FROM "main_places" WHERE "code">90902 AND "area_km_2"<'1,335.47';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "main_places" (
"place" text,
"code" real,
"area_km_2" real,
"population" real,
"most_spoken_language" text
);
Question: What's the most area of Bochum Part 2 with a population less than 15,911?
<|assistant|>
SELECT MAX("area_km_2") FROM "main_places" WHERE "place"='bochum part 2' AND "population"<'15,911';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "main_places" (
"place" text,
"code" real,
"area_km_2" real,
"population" real,
"most_spoken_language" text
);
Question: What's the place with an area of less than 2,198.72 and a code more than 90909?
<|assistant|>
SELECT "place" FROM "main_places" WHERE "area_km_2"<'2,198.72' AND "code">90909;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
Question: What is the Original NFL team of the CB Player?
<|assistant|>
SELECT "original_nfl_team" FROM "notable_undrafted_players" WHERE "pos"='cb';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
Question: What is the College of the WR Player from SWC Conf?
<|assistant|>
SELECT "college" FROM "notable_undrafted_players" WHERE "conf"='swc' AND "pos"='wr';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
Question: What Player is from the College of memphis?
<|assistant|>
SELECT "player" FROM "notable_undrafted_players" WHERE "college"='memphis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "notable_undrafted_players" (
"original_nfl_team" text,
"player" text,
"pos" text,
"college" text,
"conf" text
);
Question: What is the College of the LB Player with Big Ten Conf.?
<|assistant|>
SELECT "college" FROM "notable_undrafted_players" WHERE "pos"='lb' AND "conf"='big ten';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: How many draws are there when there are 11 wins, and more than 7 losses?
<|assistant|>
SELECT SUM("draws") FROM "2011_ladder" WHERE "wins"=11 AND "losses">7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the draws when there are less than 3 losses and more than 16 wins?
<|assistant|>
SELECT MAX("draws") FROM "2011_ladder" WHERE "losses"<3 AND "wins">16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the wins when there are 5 losses, and against is more than 1205?
<|assistant|>
SELECT MAX("wins") FROM "2011_ladder" WHERE "losses"=5 AND "against">1205;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the losses when Sunrayia FL is Red Cliffs, and the against is more than 2294?
<|assistant|>
SELECT AVG("losses") FROM "2011_ladder" WHERE "sunrayia_fl"='red cliffs' AND "against">2294;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the number against when losses are smaller than 3, and wins arelarger than 16?
<|assistant|>
SELECT COUNT("against") FROM "2011_ladder" WHERE "losses"<3 AND "wins">16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"frequency" text,
"call_sign" text,
"format" text,
"owner" text,
"notes" text
);
Question: What is the Notes of the Frequency with Call sign CFUN-FM-1?
<|assistant|>
SELECT "notes" FROM "radio" WHERE "call_sign"='cfun-fm-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"frequency" text,
"call_sign" text,
"format" text,
"owner" text,
"notes" text
);
Question: What is the Format of FM 100.5 Licensed to Hope?
<|assistant|>
SELECT "format" FROM "radio" WHERE "notes"='licensed to hope' AND "frequency"='fm 100.5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio" (
"frequency" text,
"call_sign" text,
"format" text,
"owner" text,
"notes" text
);
Question: What is the Notes of the Frequency with a call sign of CBUE-FM?
<|assistant|>
SELECT "notes" FROM "radio" WHERE "call_sign"='cbue-fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_to_head_record" (
"competition" text,
"played" real,
"spartak" real,
"draw" real,
"dynamo" real
);
Question: what is the average dynamo when draw is more than 0, played is less than 15 and spartak is more than 1?
<|assistant|>
SELECT AVG("dynamo") FROM "head_to_head_record" WHERE "draw">0 AND "played"<15 AND "spartak">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_to_head_record" (
"competition" text,
"played" real,
"spartak" real,
"draw" real,
"dynamo" real
);
Question: what is the highest spartak when played is less than 15 and dynamo is less than 3?
<|assistant|>
SELECT MAX("spartak") FROM "head_to_head_record" WHERE "played"<15 AND "dynamo"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_to_head_record" (
"competition" text,
"played" real,
"spartak" real,
"draw" real,
"dynamo" real
);
Question: what is the most draw when the competition is soviet league and dynamo is more than 34?
<|assistant|>
SELECT MAX("draw") FROM "head_to_head_record" WHERE "competition"='soviet league' AND "dynamo">34;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_to_head_record" (
"competition" text,
"played" real,
"spartak" real,
"draw" real,
"dynamo" real
);
Question: what is the sum of spartak when played is 102 and draw is less than 19?
<|assistant|>
SELECT SUM("spartak") FROM "head_to_head_record" WHERE "played"=102 AND "draw"<19;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "head_to_head_record" (
"competition" text,
"played" real,
"spartak" real,
"draw" real,
"dynamo" real
);
Question: what is the least dynamo when spartak is more than 9, competition is totals and draw is more than 24?
<|assistant|>
SELECT MIN("dynamo") FROM "head_to_head_record" WHERE "spartak">9 AND "competition"='totals' AND "draw">24;<|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's the result when the Washington Redskins were the opponents on a week after 8?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week">8 AND "opponent"='washington redskins';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"name" text,
"nationality" text,
"4_30" text,
"4_45" text,
"4_55" text,
"result" real
);
Question: What is the 4.45 for Anna Rogowska from Poland?
<|assistant|>
SELECT "4_45" FROM "final" WHERE "nationality"='poland' AND "name"='anna rogowska';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"name" text,
"nationality" text,
"4_30" text,
"4_45" text,
"4_55" text,
"result" real
);
Question: What is the 4.45 for Yelena Isinbayeva?
<|assistant|>
SELECT "4_45" FROM "final" WHERE "name"='yelena isinbayeva';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"name" text,
"nationality" text,
"4_30" text,
"4_45" text,
"4_55" text,
"result" real
);
Question: What is Anna Rogowska's average result?
<|assistant|>
SELECT AVG("result") FROM "final" WHERE "name"='anna rogowska';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"name" text,
"nationality" text,
"4_30" text,
"4_45" text,
"4_55" text,
"result" real
);
Question: What national has 4.45 for o and 4.55 for xo?
<|assistant|>
SELECT "nationality" FROM "final" WHERE "4_45"='o' AND "4_55"='xo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_cruising_in_asia" (
"ship_name" text,
"year_built" real,
"length" text,
"crew" real,
"guests" real,
"staterooms" real,
"comments" text
);
Question: What is the sum of staterooms in with a year buit of 2008, and a crew less than 28?
<|assistant|>
SELECT SUM("staterooms") FROM "ships_cruising_in_asia" WHERE "year_built"=2008 AND "crew"<28;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_cruising_in_asia" (
"ship_name" text,
"year_built" real,
"length" text,
"crew" real,
"guests" real,
"staterooms" real,
"comments" text
);
Question: What is the total for guests with a ship name of rv indochina, and a crew smaller than 28?
<|assistant|>
SELECT COUNT("guests") FROM "ships_cruising_in_asia" WHERE "ship_name"='rv indochina' AND "crew"<28;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualification_round" (
"rank" real,
"athlete" text,
"country" text,
"day_1" real,
"total" real
);
Question: what is the country when the total is 111 and the day 1 is 69?
<|assistant|>
SELECT "country" FROM "qualification_round" WHERE "total"=111 AND "day_1"=69;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualification_round" (
"rank" real,
"athlete" text,
"country" text,
"day_1" real,
"total" real
);
Question: what is the average rank when the day 1 is less than 71 and the country is romania?
<|assistant|>
SELECT AVG("rank") FROM "qualification_round" WHERE "day_1"<71 AND "country"='romania';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualification_round" (
"rank" real,
"athlete" text,
"country" text,
"day_1" real,
"total" real
);
Question: how many times is the athlete jin di and the total less than 118?
<|assistant|>
SELECT COUNT("rank") FROM "qualification_round" WHERE "athlete"='jin di' AND "total"<118;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"goals" real,
"ends" real
);
Question: What is the highest goal for a GEO nat., that ended after 2010?
<|assistant|>
SELECT MAX("goals") FROM "squad_information" WHERE "nat"='geo' AND "ends">2010;<|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 is the venue when the year is 2006, the competition is asian games and the event is 400 m?
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "year"=2006 AND "competition"='asian games' AND "event"='400 m';<|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 is the venue when the event is 4x400 m relay and the competition is asian championships?
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "event"='4x400 m relay' AND "competition"='asian championships';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.