text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominations_table" ( "week_1" text, "week_3" text, "week_4" text, "week_6" text, "week_7" text, "week_8" text, "week_9" text, "week_10" text, "final_week_12" text ); Question: Who did the housemate that nominated Kashmera Rakhi in week 3 and Amit Bobby in week 1 nominate in week 6? <|assistant|> SELECT "week_6" FROM "nominations_table" WHERE "week_3"='kashmera rakhi' AND "week_1"='amit bobby';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominations_table" ( "week_1" text, "week_3" text, "week_4" text, "week_6" text, "week_7" text, "week_8" text, "week_9" text, "week_10" text, "final_week_12" text ); Question: Who did the housemate that nominated Carol Roopali in week 1 nominate in week 8? <|assistant|> SELECT "week_8" FROM "nominations_table" WHERE "week_1"='carol roopali';<|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, "size" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: What is the IHSAA class of Centerville, which plays IHSAA class AA football? <|assistant|> SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_football_class"='aa' AND "school"='centerville';<|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, "size" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: Winchester Community school, which plays IHSAA class AA football, is located where? <|assistant|> SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_football_class"='aa' AND "school"='winchester community';<|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, "size" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: What is the IHSAA class of the school with less than 400 students and a mascot of the Tigers? <|assistant|> SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "size"<400 AND "mascot"='tigers';<|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, "size" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: What county has a school with less than 301 students and plays IHSAA class A football? <|assistant|> SELECT "county" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_football_class"='a' AND "size"<301;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); Question: What is the lowest game when the score is 102-104? <|assistant|> SELECT MIN("game") FROM "playoffs" WHERE "score"='102-104';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); Question: what is the score for game 4? <|assistant|> SELECT "score" FROM "playoffs" WHERE "game"=4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); Question: what is the series for game 4? <|assistant|> SELECT "series" FROM "playoffs" WHERE "game"=4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary_of_results_2009" ( "party" text, "burnley" real, "chorley" real, "fylde" real, "hyndburn" real, "lancaster" real, "pendle" real, "preston" real, "ribble_valley" real, "rossendale" real, "south_ribble" real, "west_lancashire" real, "wyre" real, "total" real ); Question: Which Pendle has a Burnley smaller than 0? <|assistant|> SELECT SUM("pendle") FROM "summary_of_results_2009" WHERE "burnley"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary_of_results_2009" ( "party" text, "burnley" real, "chorley" real, "fylde" real, "hyndburn" real, "lancaster" real, "pendle" real, "preston" real, "ribble_valley" real, "rossendale" real, "south_ribble" real, "west_lancashire" real, "wyre" real, "total" real ); Question: How much Rossendale has a Fylde smaller than 0? <|assistant|> SELECT COUNT("rossendale") FROM "summary_of_results_2009" WHERE "fylde"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary_of_results_2009" ( "party" text, "burnley" real, "chorley" real, "fylde" real, "hyndburn" real, "lancaster" real, "pendle" real, "preston" real, "ribble_valley" real, "rossendale" real, "south_ribble" real, "west_lancashire" real, "wyre" real, "total" real ); Question: How much Hyndburn has a Fylde larger than 3? <|assistant|> SELECT SUM("hyndburn") FROM "summary_of_results_2009" WHERE "fylde">3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary_of_results_2009" ( "party" text, "burnley" real, "chorley" real, "fylde" real, "hyndburn" real, "lancaster" real, "pendle" real, "preston" real, "ribble_valley" real, "rossendale" real, "south_ribble" real, "west_lancashire" real, "wyre" real, "total" real ); Question: How much Burnley has a Fylde smaller than 1, and a Rossendale larger than 0? <|assistant|> SELECT SUM("burnley") FROM "summary_of_results_2009" WHERE "fylde"<1 AND "rossendale">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "italy" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What are the years that have un posto al sole as the soap opera, with riccardo polizzy carbonelli as the actor? <|assistant|> SELECT "years" FROM "italy" WHERE "soap_opera"='un posto al sole' AND "actor"='riccardo polizzy carbonelli';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "italy" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What years have a duration of 18 years, and patrizio rispo as the actor? <|assistant|> SELECT "years" FROM "italy" WHERE "duration"='18 years' AND "actor"='patrizio rispo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "italy" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What are the years that have a duration of 15 years and giulia poggi as the character? <|assistant|> SELECT "years" FROM "italy" WHERE "duration"='15 years' AND "character"='giulia poggi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "italy" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What years have claudia ruffo as the actor? <|assistant|> SELECT "years" FROM "italy" WHERE "actor"='claudia ruffo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "italy" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What is the duration that has pietro genuardi as the actor? <|assistant|> SELECT "duration" FROM "italy" WHERE "actor"='pietro genuardi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "italy" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What is the soap opera that has a duration of 13 years, with marina giulia cavalli as the actor? <|assistant|> SELECT "soap_opera" FROM "italy" WHERE "duration"='13 years' AND "actor"='marina giulia cavalli';<|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: What is the lowest attendance for December 14, 1958 after week 12? <|assistant|> SELECT MIN("attendance") FROM "schedule" WHERE "date"='december 14, 1958' AND "week">12;<|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: What is the total for the week in the game against the Chicago Bears <|assistant|> SELECT COUNT("week") 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: What is the highest attendance for December 14, 1958 for after week 12 <|assistant|> SELECT MAX("attendance") FROM "schedule" WHERE "date"='december 14, 1958' AND "week">12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_16_10_6" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: What is the Outcome of the Match played after 2003 with a Score of 6–0, 6–3? <|assistant|> SELECT "outcome" FROM "doubles_16_10_6" WHERE "year">2003 AND "score"='6–0, 6–3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_16_10_6" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: What is the Outcome of the match with a Score of 6–1, 6–1? <|assistant|> SELECT "outcome" FROM "doubles_16_10_6" WHERE "score"='6–1, 6–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: Who has rank 5? <|assistant|> SELECT "name" FROM "semifinal_2" WHERE "rank"=5;<|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: Which nationality has rank 4? <|assistant|> SELECT "nationality" FROM "semifinal_2" WHERE "rank"=4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "category" text, "film_title_used_in_nomination" text, "original_title" text, "language" text, "result" text ); Question: What title was used in the nomination of Matrimonio All'Italiana? <|assistant|> SELECT "film_title_used_in_nomination" FROM "nominees" WHERE "original_title"='matrimonio all''italiana';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "category" text, "film_title_used_in_nomination" text, "original_title" text, "language" text, "result" text ); Question: What language was the film Pelle Erobreren, which received the best actor nomination, in? <|assistant|> SELECT "language" FROM "nominees" WHERE "category"='best actor' AND "original_title"='pelle erobreren';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "category" text, "film_title_used_in_nomination" text, "original_title" text, "language" text, "result" text ); Question: What title was used in the nomination of the Spanish language film Traffic? <|assistant|> SELECT "film_title_used_in_nomination" FROM "nominees" WHERE "language"='spanish' AND "original_title"='traffic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "category" text, "film_title_used_in_nomination" text, "original_title" text, "language" text, "result" text ); Question: What title was used in the nomination of Una Giornata Particolare? <|assistant|> SELECT "film_title_used_in_nomination" FROM "nominees" WHERE "original_title"='una giornata particolare';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "australia" ( "player" text, "test_debut" text, "year" real, "cross_code_debut" text, "date" text, "position" text ); Question: What date has a Position of back, later than 1964, and a Test debut of 1st rl test v new zealand? <|assistant|> SELECT "date" FROM "australia" WHERE "position"='back' AND "year">1964 AND "test_debut"='1st rl test v new zealand';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "australia" ( "player" text, "test_debut" text, "year" real, "cross_code_debut" text, "date" text, "position" text ); Question: What is the position earlier than 1907, with a cross-code debut of inaugural rl test v new zealand, and a test debut of inaugural ru test v new zealand? <|assistant|> SELECT "position" FROM "australia" WHERE "year"<1907 AND "cross_code_debut"='inaugural rl test v new zealand' AND "test_debut"='inaugural ru test v new zealand';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "australia" ( "player" text, "test_debut" text, "year" real, "cross_code_debut" text, "date" text, "position" text ); Question: What is the cross-code debut later than 1958 for Dick Thornett? <|assistant|> SELECT "cross_code_debut" FROM "australia" WHERE "year">1958 AND "player"='dick thornett';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "australia" ( "player" text, "test_debut" text, "year" real, "cross_code_debut" text, "date" text, "position" text ); Question: What position has a Cross-code debut of 1st ru test v ireland? <|assistant|> SELECT "position" FROM "australia" WHERE "cross_code_debut"='1st ru test v ireland';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "a_b_first_round" ( "time" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: What was the time for the match with away team Shatin? <|assistant|> SELECT "time" FROM "a_b_first_round" WHERE "away_team"='shatin';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "a_b_first_round" ( "time" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: What was the time for the match with away team Convoy Sun Hei Team A? <|assistant|> SELECT "time" FROM "a_b_first_round" WHERE "away_team"='convoy sun hei team a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "a_b_first_round" ( "time" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: What was the away team for the match that had a time of 18:30? <|assistant|> SELECT "away_team" FROM "a_b_first_round" WHERE "time"='18:30';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "a_b_first_round" ( "time" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: What was the time for the match with away team Mutual Team B? <|assistant|> SELECT "time" FROM "a_b_first_round" WHERE "away_team"='mutual team b';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "a_b_first_round" ( "time" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: What was the time for the match that had a a home team of HKSSF? <|assistant|> SELECT "time" FROM "a_b_first_round" WHERE "home_team"='hkssf';<|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 people attended on december 26, 1982? <|assistant|> SELECT "attendance" FROM "schedule" WHERE "date"='december 26, 1982';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: How many Byes have Wins smaller than 11, and a Wimmera FL of minyip murtoa, and Losses smaller than 6? <|assistant|> SELECT COUNT("byes") FROM "2012_ladder" WHERE "wins"<11 AND "wimmera_fl"='minyip murtoa' AND "losses"<6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Losses have an Against smaller than 1018, and Wins smaller than 14? <|assistant|> SELECT AVG("losses") FROM "2012_ladder" WHERE "against"<1018 AND "wins"<14;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers? <|assistant|> SELECT MIN("byes") FROM "2012_ladder" WHERE "against">1018 AND "wimmera_fl"='horsham diggers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Losses have a Wimmera FL of minyip murtoa? <|assistant|> SELECT AVG("losses") FROM "2012_ladder" WHERE "wimmera_fl"='minyip murtoa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Against has Losses smaller than 5, and a Wimmera FL of warrack eagles, and Draws smaller than 0? <|assistant|> SELECT AVG("against") FROM "2012_ladder" WHERE "losses"<5 AND "wimmera_fl"='warrack eagles' AND "draws"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "out" ( "name" text, "country" text, "status" text, "moving_to" text, "transfer_fee" text ); Question: Which country has Spence in the name section? <|assistant|> SELECT "country" FROM "out" WHERE "name"='spence';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "out" ( "name" text, "country" text, "status" text, "moving_to" text, "transfer_fee" text ); Question: Which country has the status of transferred, moving to of released, and Solano as the listed name? <|assistant|> SELECT "country" FROM "out" WHERE "status"='transferred' AND "moving_to"='released' AND "name"='solano';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "out" ( "name" text, "country" text, "status" text, "moving_to" text, "transfer_fee" text ); Question: What is the transfer fee for the country that has the name McCartney listed? <|assistant|> SELECT "transfer_fee" FROM "out" WHERE "name"='mccartney';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "out" ( "name" text, "country" text, "status" text, "moving_to" text, "transfer_fee" text ); Question: What is the name listed for the country that has a status of loaned and a moving to listed as leyton orient? <|assistant|> SELECT "name" FROM "out" WHERE "status"='loaned' AND "moving_to"='leyton orient';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "out" ( "name" text, "country" text, "status" text, "moving_to" text, "transfer_fee" text ); Question: What is the transfer fee for the country of Nir? <|assistant|> SELECT "transfer_fee" FROM "out" WHERE "country"='nir';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Question: Who had the fastest lap when adam christodoulou was the winning driver and had the pole position? <|assistant|> SELECT "fastest_lap" FROM "calendar" WHERE "winning_driver"='adam christodoulou' AND "pole_position"='adam christodoulou';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Question: What date was the circuit, snetterton, when riki christodoulou had the fastest lap? <|assistant|> SELECT "date" FROM "calendar" WHERE "circuit"='snetterton' AND "fastest_lap"='riki christodoulou';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Question: who had the pole position at rockingham circuit with adam christodoulou having the fastest lap? <|assistant|> SELECT "pole_position" FROM "calendar" WHERE "fastest_lap"='adam christodoulou' AND "circuit"='rockingham';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: What bonus points have 448 as the points against? <|assistant|> SELECT "bonus_points" FROM "season_table" WHERE "points_against"='448';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: What points for have 30 as the game, and 73 as the total points? <|assistant|> SELECT "points_for" FROM "season_table" WHERE "games"='30' AND "total_points"='73';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: What drawn has 416 as the points for and 533 as the points against? <|assistant|> SELECT "drawn" FROM "season_table" WHERE "points_for"='416' AND "points_against"='533';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: What match points have 755 as the points against? <|assistant|> SELECT "match_points" FROM "season_table" WHERE "points_against"='755';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: What games have colomiers as the club? <|assistant|> SELECT "games" FROM "season_table" WHERE "club"='colomiers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: Which lost has 84 as the match points? <|assistant|> SELECT "lost" FROM "season_table" WHERE "match_points"='84';<|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: How many constituents does udaipura have? <|assistant|> SELECT "constituency_number" FROM "assembly_segments" WHERE "name"='udaipura';<|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 lane was Henrique Barbosa in? <|assistant|> SELECT COUNT("lane") FROM "heats" WHERE "name"='henrique barbosa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_game_of_the_year_awards" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What game was before 2010 and was a role-playing game? <|assistant|> SELECT "game" FROM "list_of_game_of_the_year_awards" WHERE "year"<2010 AND "genre"='role-playing game';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_game_of_the_year_awards" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What was the platform of Red Dead Redemption? <|assistant|> SELECT "platform_s" FROM "list_of_game_of_the_year_awards" WHERE "game"='red dead redemption';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_game_of_the_year_awards" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: Who was the developer of Wii? <|assistant|> SELECT "developer_s" FROM "list_of_game_of_the_year_awards" WHERE "platform_s"='wii';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_game_of_the_year_awards" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What year was The Walking Dead? <|assistant|> SELECT COUNT("year") FROM "list_of_game_of_the_year_awards" WHERE "game"='the walking dead';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_game_of_the_year_awards" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What was the platform when the developer was Telltale Games? <|assistant|> SELECT "platform_s" FROM "list_of_game_of_the_year_awards" WHERE "developer_s"='telltale games';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_game_of_the_year_awards" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); Question: What is the game of developer Rockstar Games? <|assistant|> SELECT "game" FROM "list_of_game_of_the_year_awards" WHERE "developer_s"='rockstar games';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "and_surrounding_islands" ( "peak" text, "country" text, "elevation_m" real, "prominence_m" real, "col_m" real ); Question: Which Elevation (m) has a Prominence (m) of 2,876, and a Col (m) larger than 0? <|assistant|> SELECT SUM("elevation_m") FROM "and_surrounding_islands" WHERE "prominence_m"='2,876' AND "col_m">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "and_surrounding_islands" ( "peak" text, "country" text, "elevation_m" real, "prominence_m" real, "col_m" real ); Question: How much Elevation (m) has a Prominence (m) larger than 2,876? <|assistant|> SELECT COUNT("elevation_m") FROM "and_surrounding_islands" WHERE "prominence_m">'2,876';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); Question: When was millwall the home team? <|assistant|> SELECT "date" FROM "sixth_round_proper" WHERE "home_team"='millwall';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); Question: What was the score when Arsenal was the away team? <|assistant|> SELECT "score" FROM "sixth_round_proper" WHERE "away_team"='arsenal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); Question: Which away team had a Score of 2–0? <|assistant|> SELECT "away_team" FROM "sixth_round_proper" WHERE "score"='2–0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); Question: When was Arsenal was the away team? <|assistant|> SELECT "date" FROM "sixth_round_proper" WHERE "away_team"='arsenal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "116_seats_needed_for_a_majority" ( "date_released" text, "polling_institute" text, "social_democratic" text, "socialist" text, "green_communist" text, "democratic_and_social_centre" text, "lead" text ); Question: What's the date released when there was 9.7% of Green communist? <|assistant|> SELECT "date_released" FROM "116_seats_needed_for_a_majority" WHERE "green_communist"='9.7%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "116_seats_needed_for_a_majority" ( "date_released" text, "polling_institute" text, "social_democratic" text, "socialist" text, "green_communist" text, "democratic_and_social_centre" text, "lead" text ); Question: What's the green communist when Euroteste/JN is the polling Institute? <|assistant|> SELECT "green_communist" FROM "116_seats_needed_for_a_majority" WHERE "polling_institute"='euroteste/jn';<|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 is the most silver medals when the total is more than 2 medals, and with a rank of total, and the number of gold medals is greater than 44? <|assistant|> SELECT MAX("silver") FROM "medal_table" WHERE "total">2 AND "rank"='total' AND "gold">44;<|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 is the fewest gold medals when there is 0 bronze medals, and the rank is 19, and silver medals are less than 1? <|assistant|> SELECT MIN("gold") FROM "medal_table" WHERE "bronze"=0 AND "rank"='19' AND "silver"<1;<|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 is the largest amount of bronze medals when the silver medals are less than 1, and Belgium (BEL) is the nation, and the gold medals are less than 0? <|assistant|> SELECT MAX("bronze") FROM "medal_table" WHERE "silver"<1 AND "nation"='belgium (bel)' AND "gold"<0;<|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: With silver medals less than 1, and total medals less than 2, what is the most bronze medals? <|assistant|> SELECT MAX("bronze") FROM "medal_table" WHERE "silver"<1 AND "total"<2;<|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 weight for the 2008 club Dynamo Moscow? <|assistant|> SELECT "weight" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='dynamo moscow';<|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 spike for the 2008 club Zenit Kazan? <|assistant|> SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='zenit kazan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "millewa" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Can you tell me the total number of Byes that has the Wins of 14, and the Losses larger than 2? <|assistant|> SELECT COUNT("byes") FROM "2010_ladder" WHERE "wins"=14 AND "losses">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "millewa" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Can you tell me the average Wins that has the Against of 1132, and the Losses smaller than 7? <|assistant|> SELECT AVG("wins") FROM "2010_ladder" WHERE "against"=1132 AND "losses"<7;<|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 for the game that had a Location/Attendance of the spectrum? <|assistant|> SELECT "date" FROM "game_log" WHERE "location_attendance"='the spectrum';<|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: Who was the opponent when they played at the Skydome? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "location_attendance"='skydome';<|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 record on January 17? <|assistant|> SELECT "record" FROM "game_log" WHERE "date"='january 17';<|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 location and attendance when the record was 19-17? <|assistant|> SELECT "location_attendance" FROM "game_log" WHERE "record"='19-17';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "city" text, "mascot" text, "county" text, "year_joined" real, "previous_conference" text, "year_left" real, "conference_joined" text ); Question: What city joined the Independents conference after 1963? <|assistant|> SELECT "city" FROM "former_members" WHERE "year_joined">1963 AND "conference_joined"='independents';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "city" text, "mascot" text, "county" text, "year_joined" real, "previous_conference" text, "year_left" real, "conference_joined" text ); Question: What is the year that the Gary team with mascot of the Tornado joined? <|assistant|> SELECT MIN("year_joined") FROM "former_members" WHERE "city"='gary' AND "mascot"='tornado';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "city" text, "mascot" text, "county" text, "year_joined" real, "previous_conference" text, "year_left" real, "conference_joined" text ); Question: What was the previous conference for the team with the Governors as their mascot that joined the Indiana Lake Shore conference? <|assistant|> SELECT "previous_conference" FROM "former_members" WHERE "conference_joined"='indiana lake shore' AND "mascot"='governors';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "city" text, "mascot" text, "county" text, "year_joined" real, "previous_conference" text, "year_left" real, "conference_joined" text ); Question: What is the year that the Roughriders left the conference? <|assistant|> SELECT MAX("year_left") FROM "former_members" WHERE "mascot"='roughriders';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "city" text, "mascot" text, "county" text, "year_joined" real, "previous_conference" text, "year_left" real, "conference_joined" text ); Question: What conference did the city of Valparaiso join? <|assistant|> SELECT "conference_joined" FROM "former_members" WHERE "city"='valparaiso';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "city" text, "mascot" text, "county" text, "year_joined" real, "previous_conference" text, "year_left" real, "conference_joined" text ); Question: What is the mascot of Hammond Tech? <|assistant|> SELECT "mascot" FROM "former_members" WHERE "city"='hammond' AND "school"='hammond tech';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "hungary" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What is the duration of the character Bartha Zsolt? <|assistant|> SELECT "duration" FROM "hungary" WHERE "character"='bartha zsolt';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: How many losses have jake sharp as the name, with a long less than 30? <|assistant|> SELECT COUNT("loss") FROM "rushing" WHERE "name"='jake sharp' AND "long"<30;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: What is the average long that has 1581 as a gain, with a loss less than 308? <|assistant|> SELECT AVG("long") FROM "rushing" WHERE "gain"=1581 AND "loss"<308;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: How many gains have a long greater than 8, with avg/g of 124.9? <|assistant|> SELECT SUM("gain") FROM "rushing" WHERE "long">8 AND "avg_g"=124.9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: How many longs have a gain less than 379, and 0.8 as an avg/g? <|assistant|> SELECT SUM("long") FROM "rushing" WHERE "gain"<379 AND "avg_g"=0.8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: What is the lowest gain that has toben opurum as the name, with an avg/g less than 54.1? <|assistant|> SELECT MIN("gain") FROM "rushing" WHERE "name"='toben opurum' AND "avg_g"<54.1;<|endoftext|>
<|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 Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/Retired of 1:48:11.023? <|assistant|> SELECT "driver" FROM "race" WHERE "grid"<17 AND "points">0 AND "laps"=87 AND "time_retired"='1:48:11.023';<|endoftext|>