text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_division_final_table" ( "position" real, "team" text, "played" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" text ); Question: How many draws did clitheroe have when their position was less than 12 and they lost less than 4 times? <|assistant|> SELECT SUM("drawn") FROM "first_division_final_table" WHERE "position"<12 AND "team"='clitheroe' AND "lost">4;<|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 reserved for (ST/ST/None) when it was Uklana? <|assistant|> SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "name"='uklana';<|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: Bhiwani district have what constituency number? <|assistant|> SELECT "constituency_number" FROM "assembly_segments" WHERE "district"='bhiwani';<|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 reserved for (SC/ST/None) when number of electorates (2009) is larger than 101,595, and constituency is 49? <|assistant|> SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "number_of_electorates_2009">'101,595' AND "constituency_number"='49';<|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 constituency number with electorates (2009) number larger than 152,958? <|assistant|> SELECT "constituency_number" FROM "assembly_segments" WHERE "number_of_electorates_2009">'152,958';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "week_4_july_30_and_31_2008" ( "main_contestant" text, "co_contestant_yaar_vs_pyaar" text, "date_performed" text, "scores_by_each_individual_judge" text, "total_score_week" text, "position" text, "status" text ); Question: What is the date of the performance by Jatin Shah and co-contestant is Shalini Chandran? <|assistant|> SELECT "date_performed" FROM "week_4_july_30_and_31_2008" WHERE "main_contestant"='jatin shah' AND "co_contestant_yaar_vs_pyaar"='shalini chandran';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "week_4_july_30_and_31_2008" ( "main_contestant" text, "co_contestant_yaar_vs_pyaar" text, "date_performed" text, "scores_by_each_individual_judge" text, "total_score_week" text, "position" text, "status" text ); Question: What are the scores when total score/week is 41/60 and co-contestant is Shalini Chandran? <|assistant|> SELECT "scores_by_each_individual_judge" FROM "week_4_july_30_and_31_2008" WHERE "total_score_week"='41/60' AND "co_contestant_yaar_vs_pyaar"='shalini chandran';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "week_4_july_30_and_31_2008" ( "main_contestant" text, "co_contestant_yaar_vs_pyaar" text, "date_performed" text, "scores_by_each_individual_judge" text, "total_score_week" text, "position" text, "status" text ); Question: What position is there when the main contestant is Vishal Singh and the scores are 1 + 7 + 5 = 13? <|assistant|> SELECT "position" FROM "week_4_july_30_and_31_2008" WHERE "main_contestant"='vishal singh' AND "scores_by_each_individual_judge"='1 + 7 + 5 = 13';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "week_4_july_30_and_31_2008" ( "main_contestant" text, "co_contestant_yaar_vs_pyaar" text, "date_performed" text, "scores_by_each_individual_judge" text, "total_score_week" text, "position" text, "status" text ); Question: Who is the main contestant when the co-contestant (yaar vs. pyaar) is Shalini Chandran? <|assistant|> SELECT "main_contestant" FROM "week_4_july_30_and_31_2008" WHERE "co_contestant_yaar_vs_pyaar"='shalini chandran';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "week_4_july_30_and_31_2008" ( "main_contestant" text, "co_contestant_yaar_vs_pyaar" text, "date_performed" text, "scores_by_each_individual_judge" text, "total_score_week" text, "position" text, "status" text ); Question: Who is the main contestant eliminated with a score of 1 + 7 + 5 = 13? <|assistant|> SELECT "main_contestant" FROM "week_4_july_30_and_31_2008" WHERE "status"='eliminated' AND "scores_by_each_individual_judge"='1 + 7 + 5 = 13';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "czech_republic" ( "seat" real, "series_1" text, "series_2" text, "series_3" text, "series_4" text ); Question: What shows for series 4 when the seat shows 1? <|assistant|> SELECT "series_4" FROM "czech_republic" WHERE "seat"=1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "czech_republic" ( "seat" real, "series_1" text, "series_2" text, "series_3" text, "series_4" text ); Question: What is the seat number when Series 3 shows Dana Bérová? <|assistant|> SELECT AVG("seat") FROM "czech_republic" WHERE "series_3"='dana bérová';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "double_titles_5" ( "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Who was the Partner in the Algiers 2, Algeria Tournament? <|assistant|> SELECT "partner" FROM "double_titles_5" WHERE "tournament"='algiers 2, algeria';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "double_titles_5" ( "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Who were the Opponents in the Match with Partner Rushmi Chakravarthi? <|assistant|> SELECT "opponents" FROM "double_titles_5" WHERE "partner"='rushmi chakravarthi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "double_titles_5" ( "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: What is the Date of the Match with a Score of 6–4, 7–5? <|assistant|> SELECT "date" FROM "double_titles_5" WHERE "score"='6–4, 7–5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1_lyga" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: What is the fewest loses for the club that is below 8 in position, and had played less than 30 games? <|assistant|> SELECT MIN("loses") FROM "1_lyga" WHERE "position"<8 AND "games_played"<30;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1_lyga" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: What is the loses total when there is less than 4 draws, less than 105 conceded goals, less than 38 goals scored, and the club is positioned greater than 2? <|assistant|> SELECT SUM("loses") FROM "1_lyga" WHERE "draws"<4 AND "goals_conceded"<105 AND "position">2 AND "goals_scored"<38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1_lyga" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many total goals conceded are there when the points are greater than 58, less than 27 wins, and less than 1 draws? <|assistant|> SELECT SUM("goals_conceded") FROM "1_lyga" WHERE "points">58 AND "wins"<27 AND "draws"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1_lyga" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many total goals scored when less than 30 games have been played? <|assistant|> SELECT COUNT("goals_scored") FROM "1_lyga" WHERE "games_played"<30;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1_lyga" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: When less than 30 games have been played what is the average goals scored? <|assistant|> SELECT AVG("goals_scored") FROM "1_lyga" WHERE "games_played"<30;<|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 league cup app with league cup goals more than 0? <|assistant|> SELECT "league_cup_apps" FROM "appearances_and_goals" WHERE "league_cup_goals">0;<|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 fa cup apps with 0 league cup goals, and a total of 43 apps? <|assistant|> SELECT "fa_cup_apps" FROM "appearances_and_goals" WHERE "league_cup_goals"=0 AND "total_apps"='43';<|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 highest FLT goals with 0 league cup goals, a GK position, and 2 league cup apps? <|assistant|> SELECT MAX("flt_goals") FROM "appearances_and_goals" WHERE "league_cup_goals"=0 AND "position"='gk' AND "league_cup_apps"='2';<|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: On what date is the venue Sam Nujoma Stadium, Windhoek, Namibia? <|assistant|> SELECT "date" FROM "international_goals" WHERE "venue"='sam nujoma stadium, windhoek, namibia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_seasons_1994_2003" ( "season" real, "winners" text, "runners_up" text, "third_place" text, "fourth_placed" text, "number_of_clubs" real ); Question: Who was in third place when the Winner was Dalian Shide, Chongqing Longxin was 4th and 14 clubs? <|assistant|> SELECT "third_place" FROM "professional_seasons_1994_2003" WHERE "number_of_clubs"=14 AND "winners"='dalian shide' AND "fourth_placed"='chongqing longxin';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_seasons_1994_2003" ( "season" real, "winners" text, "runners_up" text, "third_place" text, "fourth_placed" text, "number_of_clubs" real ); Question: What season had Dalian Wanda as the winner with Yanbian Aodong winning 4th? <|assistant|> SELECT SUM("season") FROM "professional_seasons_1994_2003" WHERE "winners"='dalian wanda' AND "fourth_placed"='yanbian aodong';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_seasons_1994_2003" ( "season" real, "winners" text, "runners_up" text, "third_place" text, "fourth_placed" text, "number_of_clubs" real ); Question: What is the number of clubs before 2003 with a 4th place winner of Shenzhen Jianlibao? <|assistant|> SELECT AVG("number_of_clubs") FROM "professional_seasons_1994_2003" WHERE "fourth_placed"='shenzhen jianlibao' AND "season"<2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_seasons_1994_2003" ( "season" real, "winners" text, "runners_up" text, "third_place" text, "fourth_placed" text, "number_of_clubs" real ); Question: What is the number of clubs when Dalian Shide won and Sichuan Quanxing won 4th? <|assistant|> SELECT AVG("number_of_clubs") FROM "professional_seasons_1994_2003" WHERE "winners"='dalian shide' AND "fourth_placed"='sichuan quanxing';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_seasons_1994_2003" ( "season" real, "winners" text, "runners_up" text, "third_place" text, "fourth_placed" text, "number_of_clubs" real ); Question: Who was the winner when the runner-up was Guangzhou Apollo? <|assistant|> SELECT "winners" FROM "professional_seasons_1994_2003" WHERE "runners_up"='guangzhou apollo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "lexton_plains" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: How many Byes have an Against of 972, and more than 11 wins? <|assistant|> SELECT SUM("byes") FROM "2010_ladder" WHERE "against"=972 AND "wins">11;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "lexton_plains" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Byes have a Lexton Plains of skipton? <|assistant|> SELECT MAX("byes") FROM "2010_ladder" WHERE "lexton_plains"='skipton';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: What is the value for Lost when Drawn is 0, and Tries against is 41? <|assistant|> SELECT "lost" FROM "league_table" WHERE "drawn"='0' AND "tries_against"='41';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: What is the drawn value for furnace united rfc? <|assistant|> SELECT "drawn" FROM "league_table" WHERE "club"='furnace united rfc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: What tries against value does burry port rfc have? <|assistant|> SELECT "tries_against" FROM "league_table" WHERE "club"='burry port rfc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ships_cruising_in_europe" ( "ship_name" text, "year_built_refurbished" text, "length" text, "crew" real, "guests" real, "staterooms" real, "comments" text ); Question: Of the ships with diesel-electric hybrid engines, length of 443 feet, and over 190 guests, what is the lowest number of staterooms? <|assistant|> SELECT MIN("staterooms") FROM "ships_cruising_in_europe" WHERE "comments"='diesel-electric hybrid engines' AND "length"='443 feet' AND "guests">190;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_career_statistics" ( "year" real, "class" text, "team" text, "machine" text, "points" real, "rank" text, "wins" real ); Question: How many wins for the year that is later than 1987 and has points less than 188? <|assistant|> SELECT "wins" FROM "grand_prix_career_statistics" WHERE "year">1987 AND "points"<188;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_career_statistics" ( "year" real, "class" text, "team" text, "machine" text, "points" real, "rank" text, "wins" real ); Question: What is the name of the machine that ranked 4th and has 2 wins? <|assistant|> SELECT "machine" FROM "grand_prix_career_statistics" WHERE "rank"='4th' AND "wins"=2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_career_statistics" ( "year" real, "class" text, "team" text, "machine" text, "points" real, "rank" text, "wins" real ); Question: How many wins were there in 1994? <|assistant|> SELECT SUM("wins") FROM "grand_prix_career_statistics" WHERE "year"=1994;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_career_statistics" ( "year" real, "class" text, "team" text, "machine" text, "points" real, "rank" text, "wins" real ); Question: What is the rank associated with the team that has more than 2 wins and has greater than 204 points? <|assistant|> SELECT "rank" FROM "grand_prix_career_statistics" WHERE "wins">2 AND "points">204;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_2" ( "pick" real, "player" text, "country_of_origin" text, "pba_team" text, "college" text ); Question: How many picks have a Player of pong escobal? <|assistant|> SELECT SUM("pick") FROM "round_2" WHERE "player"='pong escobal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_2" ( "pick" real, "player" text, "country_of_origin" text, "pba_team" text, "college" text ); Question: Which PBA team has a College of nu? <|assistant|> SELECT "pba_team" FROM "round_2" WHERE "college"='nu';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_participants" ( "elector" text, "place_of_birth" text, "cardinalatial_title" text, "elevated" text, "elevator" text ); Question: What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio in Velabro? <|assistant|> SELECT "place_of_birth" FROM "list_of_participants" WHERE "elevator"='lucius iii' AND "cardinalatial_title"='deacon of s. giorgio in velabro';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_participants" ( "elector" text, "place_of_birth" text, "cardinalatial_title" text, "elevated" text, "elevator" text ); Question: What is the place of birth for the elector Laborante de Panormo? <|assistant|> SELECT "place_of_birth" FROM "list_of_participants" WHERE "elector"='laborante de panormo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_participants" ( "elector" text, "place_of_birth" text, "cardinalatial_title" text, "elevated" text, "elevator" text ); Question: Who is the elector that has the cardinalatial title of Deacon of SS. Cosma e Damiano? <|assistant|> SELECT "elector" FROM "list_of_participants" WHERE "cardinalatial_title"='deacon of ss. cosma e damiano';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_participants" ( "elector" text, "place_of_birth" text, "cardinalatial_title" text, "elevated" text, "elevator" text ); Question: Who is the elevator with the cardinalatial title of Deacon of SS. Sergio e Bacco? <|assistant|> SELECT "elevator" FROM "list_of_participants" WHERE "cardinalatial_title"='deacon of ss. sergio e bacco';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "goalscorers" ( "name" text, "premier_league" real, "league_cup" real, "fa_cup" real, "uefa_cup" real, "total" real ); Question: How much Premier League has an FA Cup of 0, and a Total of 1, and a UEFA Cup larger than 1? <|assistant|> SELECT SUM("premier_league") FROM "goalscorers" WHERE "fa_cup"=0 AND "total"=1 AND "uefa_cup">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "goalscorers" ( "name" text, "premier_league" real, "league_cup" real, "fa_cup" real, "uefa_cup" real, "total" real ); Question: How many totals have a Premier League smaller than 6, and a League Cup larger than 0? <|assistant|> SELECT SUM("total") FROM "goalscorers" WHERE "premier_league"<6 AND "league_cup">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "goalscorers" ( "name" text, "premier_league" real, "league_cup" real, "fa_cup" real, "uefa_cup" real, "total" real ); Question: Which FA Cup has a Total smaller than 1? <|assistant|> SELECT AVG("fa_cup") FROM "goalscorers" WHERE "total"<1;<|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 week is the opponent the Indianapolis Colts with an attendance of 68,932? <|assistant|> SELECT COUNT("week") FROM "schedule" WHERE "attendance"='68,932' AND "opponent"='indianapolis colts';<|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 week before 10 with a result of L 12-15 <|assistant|> SELECT "attendance" FROM "schedule" WHERE "week"<10 AND "result"='l 12-15';<|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 week has a result of L 17-31 first? <|assistant|> SELECT MAX("week") FROM "schedule" WHERE "result"='l 17-31';<|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 score for the game that attendance was 70,721? <|assistant|> SELECT "result" FROM "schedule" WHERE "attendance"='70,721';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances" ( "week" real, "partner" text, "dance" text, "song" text, "result" text ); Question: What week was she safe for a salsa dance? <|assistant|> SELECT SUM("week") FROM "performances" WHERE "result"='safe' AND "dance"='salsa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_boxing_record" ( "result" text, "opponent" text, "type" text, "rd_time" text, "date" text, "location" text ); Question: Who was the opponent with the loss in Westbury, NY? <|assistant|> SELECT "opponent" FROM "professional_boxing_record" WHERE "result"='loss' AND "location"='westbury, ny';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_boxing_record" ( "result" text, "opponent" text, "type" text, "rd_time" text, "date" text, "location" text ); Question: What is the date where the type is type? <|assistant|> SELECT "date" FROM "professional_boxing_record" WHERE "type"='type';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the total rank for the player with less than 2 silvers, 4 golds, and more than 2 bronze? <|assistant|> SELECT COUNT("rank") FROM "performances_by_nation" WHERE "silver"<2 AND "gold"=4 AND "bronze">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the sum of rank with more than 1 silver medal, 1 gold medal, and less than 6? <|assistant|> SELECT SUM("rank") FROM "performances_by_nation" WHERE "silver">1 AND "gold"=1 AND "total"<6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text ); Question: What is the height for the 2008 club Arona? <|assistant|> SELECT "height" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='arona';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text ); Question: Who was the 2008 club Apure? <|assistant|> SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='apure';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text ); Question: Which spike has a 2008 club Karava? <|assistant|> SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='karava';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text ); Question: What's the date of the circuit Winton Motor Raceway? <|assistant|> SELECT "date" FROM "race_calendar" WHERE "circuit"='winton motor raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text ); Question: What's the city/state of Hidden Valley Raceway? <|assistant|> SELECT "city_state" FROM "race_calendar" WHERE "circuit"='hidden valley raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text ); Question: What's the date of Bahrain International Circuit? <|assistant|> SELECT "date" FROM "race_calendar" WHERE "circuit"='bahrain international circuit';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text ); Question: What's the circuit that had an event cancelled? <|assistant|> SELECT "circuit" FROM "race_calendar" WHERE "winner"='event cancelled';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nearby_terrain_features" ( "name" text, "feature" text, "latitude" text, "longitude" text, "distance" text, "bearing" text ); Question: what is the distance for ridge? <|assistant|> SELECT "distance" FROM "nearby_terrain_features" WHERE "feature"='ridge';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nearby_terrain_features" ( "name" text, "feature" text, "latitude" text, "longitude" text, "distance" text, "bearing" text ); Question: what is the latitude when the distance is 42.5km? <|assistant|> SELECT "latitude" FROM "nearby_terrain_features" WHERE "distance"='42.5km';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nearby_terrain_features" ( "name" text, "feature" text, "latitude" text, "longitude" text, "distance" text, "bearing" text ); Question: what is the feature named bird ridge? <|assistant|> SELECT "feature" FROM "nearby_terrain_features" WHERE "name"='bird ridge';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nearby_terrain_features" ( "name" text, "feature" text, "latitude" text, "longitude" text, "distance" text, "bearing" text ); Question: what is the distance for mjåkollen? <|assistant|> SELECT "distance" FROM "nearby_terrain_features" WHERE "name"='mjåkollen';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nearby_terrain_features" ( "name" text, "feature" text, "latitude" text, "longitude" text, "distance" text, "bearing" text ); Question: what is the distance for bearing 297°? <|assistant|> SELECT "distance" FROM "nearby_terrain_features" WHERE "bearing"='297°';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "gamasutra" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What platform has a year of 2007? <|assistant|> SELECT "platform_s" FROM "gamasutra" WHERE "year"=2007;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "gamasutra" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: Which game was released in 2011? <|assistant|> SELECT "game" FROM "gamasutra" WHERE "year"=2011;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "gamasutra" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What platform came out before 2009 with the game wii sports? <|assistant|> SELECT "platform_s" FROM "gamasutra" WHERE "year"<2009 AND "game"='wii sports';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What nationality has a lane less than 6, with 1 as the rank? <|assistant|> SELECT "nationality" FROM "semifinal_2" WHERE "lane"<6 AND "rank"=1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What time has a lane less than 5, with Poland as the nationality? <|assistant|> SELECT "time" FROM "semifinal_2" WHERE "lane"<5 AND "nationality"='poland';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: How many lanes have 1:53.70 as the time? <|assistant|> SELECT COUNT("lane") FROM "semifinal_2" WHERE "time"='1:53.70';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: How many ranks have chen yin as the name, with a lane greater than 8? <|assistant|> SELECT SUM("rank") FROM "semifinal_2" WHERE "name"='chen yin' AND "lane">8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What nationality has 1:55.35 as the time? <|assistant|> SELECT "nationality" FROM "semifinal_2" WHERE "time"='1:55.35';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: How many lanes have a rank greater than 8? <|assistant|> SELECT SUM("lane") FROM "semifinal_2" WHERE "rank">8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "country" text, "home" text, "skip" text, "third" text, "second" text, "lead" text ); Question: Where in Sweden is the home of the Swedish team? <|assistant|> SELECT "home" FROM "teams" WHERE "country"='sweden';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "country" text, "home" text, "skip" text, "third" text, "second" text, "lead" text ); Question: Who is third to Xu Xiaoming at second? <|assistant|> SELECT "third" FROM "teams" WHERE "second"='xu xiaoming';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "country" text, "home" text, "skip" text, "third" text, "second" text, "lead" text ); Question: Who is the lead for the team from Saskatoon, Saskatchewan? <|assistant|> SELECT "lead" FROM "teams" WHERE "home"='saskatoon, saskatchewan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "country" text, "home" text, "skip" text, "third" text, "second" text, "lead" text ); Question: Who is second on the team with Euan Byers at lead? <|assistant|> SELECT "second" FROM "teams" WHERE "lead"='euan byers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "country" text, "home" text, "skip" text, "third" text, "second" text, "lead" text ); Question: Who is the third on the team from Madison, Wisconsin that has Craig Brown as skip? <|assistant|> SELECT "third" FROM "teams" WHERE "home"='madison, wisconsin' AND "skip"='craig brown';<|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: On which date was the opponent the Chicago Bears? <|assistant|> SELECT "date" FROM "schedule" WHERE "opponent"='chicago bears';<|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 was on october 30, 1983? <|assistant|> SELECT SUM("week") FROM "schedule" WHERE "date"='october 30, 1983';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_members" ( "school" text, "location" text, "mascot" text, "enrollment_08_09" real, "ihsaa_class_football_class" text, "county" text, "year_joined" real, "previous_conference" text ); Question: What is the Mascot for the team from leo that had a Previous Conference value of independent? <|assistant|> SELECT "mascot" FROM "current_members" WHERE "previous_conference"='independent' AND "location"='leo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_members" ( "school" text, "location" text, "mascot" text, "enrollment_08_09" real, "ihsaa_class_football_class" text, "county" text, "year_joined" real, "previous_conference" text ); Question: What School had 3a/2a as the value for IHSAA Class/ Football Class? <|assistant|> SELECT "school" FROM "current_members" WHERE "ihsaa_class_football_class"='3a/2a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table" ( "rank" text, "country_or_dependent_territory" text, "july_1_2013_projection" real, "pct_of_pop" real, "average_relative_annual_growth_pct" real, "average_absolute_annual_growth" real ); Question: How many July 1, 2013 projections have a Rank of 27? <|assistant|> SELECT COUNT("july_1_2013_projection") FROM "table" WHERE "rank"='27';<|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 for the one which has a call sign of cite-fm-1? <|assistant|> SELECT "format" FROM "radio" WHERE "call_sign"='cite-fm-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "dolphins_points" real, "opponents" real, "record" text, "attendance" real ); Question: What'd the total Dolphin points when there was an attendance of 52,860? <|assistant|> SELECT COUNT("dolphins_points") FROM "schedule" WHERE "attendance"='52,860';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "dolphins_points" real, "opponents" real, "record" text, "attendance" real ); Question: What's the most in attendance when the Dolphins points were less than 24 and, they played the New England Patriots? <|assistant|> SELECT MAX("attendance") FROM "schedule" WHERE "dolphins_points"<24 AND "opponent"='new england patriots';<|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_2003" real ); Question: Which district had SC reserved and 169 Constituents? <|assistant|> SELECT "district" FROM "assembly_segments" WHERE "reserved_for_sc_st_none"='sc' AND "constituency_number"='169';<|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_2003" real ); Question: What was reserved in the district that has 169 constituents? <|assistant|> SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "constituency_number"='169';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ); Question: What is 1995 Grand Slam Tournament if 1997 is LQ and 1989 is 1R? <|assistant|> SELECT "1995" FROM "singles_performance_timeline" WHERE "1997"='lq' AND "1989"='1r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ); Question: What is 1996 Grand Slam Tournament if 1994 is LQ and 1992 is 3R? <|assistant|> SELECT "1996" FROM "singles_performance_timeline" WHERE "1994"='lq' AND "1992"='3r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ); Question: What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments? <|assistant|> SELECT "1994" FROM "singles_performance_timeline" WHERE "1993"='grand slam tournaments';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ); Question: What is 1995 Grand Slam Tournament if 1990 is LQ? <|assistant|> SELECT "1995" FROM "singles_performance_timeline" WHERE "1990"='lq';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ); Question: What is 1995 Grand Slam Tournament if 1996 is also grand slam tournaments? <|assistant|> SELECT "1990" FROM "singles_performance_timeline" WHERE "1996"='grand slam tournaments';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ); Question: What is 1987 Grand Slam Tournament if 1989 is also grand slam tournaments? <|assistant|> SELECT "1987" FROM "singles_performance_timeline" WHERE "1989"='grand slam tournaments';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); Question: How many people attended the home game against the New York Jets? <|assistant|> SELECT SUM("attendance") FROM "season_schedule" WHERE "opponent"='new york jets';<|endoftext|>