text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "emmy_awards" ( "year" real, "category" text, "recipients_and_nominees" text, "role_episode" text, "result" text ); Question: Which Category were Libby Goldstein and Junie Lowry-Johnson recipients and nominees for? <|assistant|> SELECT "category" FROM "emmy_awards" WHERE "recipients_and_nominees"='libby goldstein and junie lowry-johnson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "runners" real, "placing" real, "margin" real, "jockey" text, "trainer" text ); Question: what is the highest runners when the jockey is frankie dettori and the placing is higher than 1? <|assistant|> SELECT MAX("runners") FROM "race_record" WHERE "jockey"='frankie dettori' AND "placing">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "runners" real, "placing" real, "margin" real, "jockey" text, "trainer" text ); Question: what is the race when the jockey is frankie dettori, the margin is more than 3 and the course is yarmouth? <|assistant|> SELECT "race" FROM "race_record" WHERE "jockey"='frankie dettori' AND "margin">3 AND "course"='yarmouth';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_9_4_titles_5_runner_ups" ( "outcome" text, "year" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); Question: Who is the Partner in the match with a Score of 6-4, 2-6, 7-6? <|assistant|> SELECT "partnering" FROM "doubles_9_4_titles_5_runner_ups" WHERE "score"='6-4, 2-6, 7-6';<|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 is the competition when the result is won and the date is september 13, 1996? <|assistant|> SELECT "competition" FROM "international_goals" WHERE "result"='won' AND "date"='september 13, 1996';<|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 is the date when the competition is 1996 tiger cup and the result is drew? <|assistant|> SELECT "date" FROM "international_goals" WHERE "competition"='1996 tiger cup' AND "result"='drew';<|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 is the score when the competition is 1995 southeast asian games? <|assistant|> SELECT "score" FROM "international_goals" WHERE "competition"='1995 southeast asian games';<|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 is the result when the venue is singapore on september 8, 1996? <|assistant|> SELECT "result" FROM "international_goals" WHERE "venue"='singapore' AND "date"='september 8, 1996';<|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 is the competition when the result is won and the score is 8-0? <|assistant|> SELECT "competition" FROM "international_goals" WHERE "result"='won' AND "score"='8-0';<|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: Waht laps have points smaller than 1, and a team of dale coyne racing, and the grid larger than 13? <|assistant|> SELECT "laps" FROM "race" WHERE "points"<1 AND "team"='dale coyne racing' AND "grid">13;<|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: What is the total number of laps for a team of team player's, and has a grid of 9, and points larger than 10? <|assistant|> SELECT COUNT("laps") FROM "race" WHERE "team"='team player''s' AND "grid"=9 AND "points">10;<|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: What is the lowest points for a time/retired of +30.7 secs, and laps smaller than 165? <|assistant|> SELECT MIN("points") FROM "race" WHERE "time_retired"='+30.7 secs' AND "laps"<165;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_qualifying_round" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: What was the first leg score of the matchup with a 2nd leg of 80-70? <|assistant|> SELECT "1st_leg" FROM "second_qualifying_round" WHERE "2nd_leg"='80-70';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_qualifying_round" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: Who was the team 2 in the game with a team 1 of Liege Basket? <|assistant|> SELECT "team_num2" FROM "second_qualifying_round" WHERE "team_num1"='liege basket';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_qualifying_round" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: What was the 1st leg score in the matchup with a 2nd leg of 72-89? <|assistant|> SELECT "1st_leg" FROM "second_qualifying_round" WHERE "2nd_leg"='72-89';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_qualifying_round" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: What was the aggregate score of the matchup with a leg 2 of 72-64? <|assistant|> SELECT "agg" FROM "second_qualifying_round" WHERE "2nd_leg"='72-64';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_qualifying_round" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: What was the 2nd leg score in the matchup with a team 2 of KK Borac? <|assistant|> SELECT "2nd_leg" FROM "second_qualifying_round" WHERE "team_num2"='kk borac';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "4_8_4" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text, "year_s_retired" text ); Question: What are the serial numbers for the locomotives of Class 4-8-4 β€” oooooooo β€” northern? <|assistant|> SELECT "serial_numbers" FROM "4_8_4" WHERE "class"='4-8-4 β€” oooooooo β€” northern';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "4_8_4" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text, "year_s_retired" text ); Question: What is the fleet number for the model with Serial number 68056? <|assistant|> SELECT "fleet_number_s" FROM "4_8_4" WHERE "serial_numbers"='68056';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "4_8_4" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text, "year_s_retired" text ); Question: What is the serial number of the model made in 1930? <|assistant|> SELECT "serial_numbers" FROM "4_8_4" WHERE "year_made"='1930';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "4_8_4" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text, "year_s_retired" text ); Question: What is the wheel arrangement for the model that was retired in 1955? <|assistant|> SELECT "wheel_arrangement" FROM "4_8_4" WHERE "year_s_retired"='1955';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "round" text, "date" text, "matches" real, "clubs" text, "new_entries_this_round" text, "prize_money" text ); Question: What is the lowest number of matches that has a Clubs of 46 β†’ 32? <|assistant|> SELECT MIN("matches") FROM "calendar" WHERE "clubs"='46 β†’ 32';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "round" text, "date" text, "matches" real, "clubs" text, "new_entries_this_round" text, "prize_money" text ); Question: What is the highest number of matches that has a round of Third Round? <|assistant|> SELECT MAX("matches") FROM "calendar" WHERE "round"='third round';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "round" text, "date" text, "matches" real, "clubs" text, "new_entries_this_round" text, "prize_money" text ); Question: What is the prize money for the final round? <|assistant|> SELECT "prize_money" FROM "calendar" WHERE "round"='final';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "round" text, "date" text, "matches" real, "clubs" text, "new_entries_this_round" text, "prize_money" text ); Question: What is the date for the row with a new entries this round of 44? <|assistant|> SELECT "date" FROM "calendar" WHERE "new_entries_this_round"='44';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "hampden_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Against has Wins of 11, and Losses smaller than 7? <|assistant|> SELECT AVG("against") FROM "2012_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 "2012_ladder" ( "hampden_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Draws have Losses larger than 8, and a Hampden FL of terang-mortlake? <|assistant|> SELECT "draws" FROM "2012_ladder" WHERE "losses">8 AND "hampden_fl"='terang-mortlake';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2012_ladder" ( "hampden_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: Which Byes have Losses smaller than 4? <|assistant|> SELECT AVG("byes") FROM "2012_ladder" WHERE "losses"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: What's the total draws when the losses are less than 10, less than 2 byes, and 13 wins? <|assistant|> SELECT COUNT("draws") FROM "2010_ladder" WHERE "losses"<10 AND "wins"=13 AND "byes"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: What's the total draws for Ararat when the byes are less than 2? <|assistant|> SELECT SUM("draws") FROM "2010_ladder" WHERE "wimmera_fl"='ararat' AND "byes"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: What's the total losses when there are 8 wins and less than 2 byes? <|assistant|> SELECT SUM("losses") FROM "2010_ladder" WHERE "wins"=8 AND "byes"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: What's the least losses for Horsham Saints with more than 13 wins and less than 1211 against? <|assistant|> SELECT MIN("losses") FROM "2010_ladder" WHERE "against"<1211 AND "wimmera_fl"='horsham saints' AND "wins">13;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: What are the draws when the losses are less than 1? <|assistant|> SELECT SUM("draws") FROM "2010_ladder" WHERE "losses"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2010_ladder" ( "wimmera_fl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); Question: What are the amount of wins when the draws are less than 0 and the against is 1348? <|assistant|> SELECT MIN("wins") FROM "2010_ladder" WHERE "against"=1348 AND "draws"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "punjab" ( "serial_no" real, "district" text, "headquartered_city" text, "city_population_2009" real, "city_area_km_2" real ); Question: What was the total city area for vehari city with a serial number bigger than 36? <|assistant|> SELECT COUNT("city_area_km_2") FROM "punjab" WHERE "headquartered_city"='vehari city' AND "serial_no">36;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "punjab" ( "serial_no" real, "district" text, "headquartered_city" text, "city_population_2009" real, "city_area_km_2" real ); Question: What was the lowest city population for the district of rajanpur district with a area of 6 km squared and a serial number less than 29? <|assistant|> SELECT MIN("city_population_2009") FROM "punjab" WHERE "city_area_km_2"=6 AND "district"='rajanpur district' AND "serial_no"<29;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "punjab" ( "serial_no" real, "district" text, "headquartered_city" text, "city_population_2009" real, "city_area_km_2" real ); Question: What is the sum of the serial numbers for narowal city? <|assistant|> SELECT SUM("serial_no") FROM "punjab" WHERE "headquartered_city"='narowal city';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "punjab" ( "serial_no" real, "district" text, "headquartered_city" text, "city_population_2009" real, "city_area_km_2" real ); Question: What is the sum of the area for the bahawalnagar district with a population more than 134,936? <|assistant|> SELECT SUM("city_area_km_2") FROM "punjab" WHERE "district"='bahawalnagar district' AND "city_population_2009">'134,936';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "punjab" ( "serial_no" real, "district" text, "headquartered_city" text, "city_population_2009" real, "city_area_km_2" real ); Question: What district was the city with an area smaller than 12 square kilometers and a serial number of 35? <|assistant|> SELECT "district" FROM "punjab" WHERE "city_area_km_2"<12 AND "serial_no"=35;<|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: After pick number 158, what is the next round a USC player was picked? <|assistant|> SELECT MIN("round") FROM "nfl_draft" WHERE "school"='usc' AND "pick">158;<|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: Jim Obradovich, picked after round 2, but before pick 183, plays what position? <|assistant|> SELECT "position" FROM "nfl_draft" WHERE "round">2 AND "pick"<183 AND "player"='jim obradovich';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heat_5" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); Question: What time has q as the notes, and Australia as the country? <|assistant|> SELECT "time" FROM "heat_5" WHERE "notes"='q' AND "country"='australia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heat_5" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); Question: What notes have a rank greater than 2, with mexico as the country? <|assistant|> SELECT "notes" FROM "heat_5" WHERE "rank">2 AND "country"='mexico';<|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 sum of bronzes for teams with more than 0 silver and a total under 1? <|assistant|> SELECT SUM("bronze") FROM "medal_table" WHERE "silver">0 AND "total"<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 average number of golds for teams with 1 bronze, less than 3 silver, and a total over 2? <|assistant|> SELECT AVG("gold") FROM "medal_table" WHERE "bronze"=1 AND "total">2 AND "silver"<3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "handicap_results_top_10" ( "position" real, "sail_number" text, "yacht" text, "state_country" text, "yacht_type" text, "loa_metres" real, "skipper" text, "corrected_time_d_hh_mm_ss" text ); Question: What type of yacht has a LOA of 15.15 metres? <|assistant|> SELECT "yacht_type" FROM "handicap_results_top_10" WHERE "loa_metres"=15.15;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "finland" ( "actor" text, "character" text, "soap_opera" text, "years" text, "duration" text ); Question: What Soap Opera with the character Teemu Luotola? <|assistant|> SELECT "soap_opera" FROM "finland" WHERE "character"='teemu luotola';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pure_alcohol_consumption_among_adults_ag" ( "country" text, "recorded" real, "unrecorded" real, "total" real, "beer" real, "wine" real, "spirits" real, "other" real ); Question: What beer has a record of 4.08? <|assistant|> SELECT "beer" FROM "pure_alcohol_consumption_among_adults_ag" WHERE "recorded"=4.08;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fa_cup" ( "opposing_team" text, "against" real, "date" text, "venue" text, "round" text ); Question: Which round has an Opposing Team of manchester united? <|assistant|> SELECT "round" FROM "fa_cup" WHERE "opposing_team"='manchester united';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fa_cup" ( "opposing_team" text, "against" real, "date" text, "venue" text, "round" text ); Question: Which Date has an Against larger than 0? <|assistant|> SELECT "date" FROM "fa_cup" WHERE "against">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fa_cup" ( "opposing_team" text, "against" real, "date" text, "venue" text, "round" text ); Question: Which Against has a Round of fourth round? <|assistant|> SELECT MIN("against") FROM "fa_cup" WHERE "round"='fourth round';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fa_cup" ( "opposing_team" text, "against" real, "date" text, "venue" text, "round" text ); Question: What was the venue on 17/02/2008? <|assistant|> SELECT "venue" FROM "fa_cup" WHERE "date"='17/02/2008';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "iron_coaches" ( "class_to_1928" text, "class_from_1928" text, "seats" text, "quantity" real, "year_s_of_manufacture" text, "remarks" text ); Question: What is the average quantity for coaches manufactured in 1921/23, and had 40 seats? <|assistant|> SELECT AVG("quantity") FROM "iron_coaches" WHERE "year_s_of_manufacture"='1921/23' AND "seats"='40';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "iron_coaches" ( "class_to_1928" text, "class_from_1928" text, "seats" text, "quantity" real, "year_s_of_manufacture" text, "remarks" text ); Question: Which class to 1928 value had years of manufacture of 1921/23 and class from 1928 of BCi-21? <|assistant|> SELECT "class_to_1928" FROM "iron_coaches" WHERE "year_s_of_manufacture"='1921/23' AND "class_from_1928"='bci-21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "iron_coaches" ( "class_to_1928" text, "class_from_1928" text, "seats" text, "quantity" real, "year_s_of_manufacture" text, "remarks" text ); Question: What is the smallest quantity having a Class to 1928 of BDi-21? <|assistant|> SELECT MIN("quantity") FROM "iron_coaches" WHERE "class_to_1928"='bdi-21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "iron_coaches" ( "class_to_1928" text, "class_from_1928" text, "seats" text, "quantity" real, "year_s_of_manufacture" text, "remarks" text ); Question: Which class from 1928 had a class to 1928 of BDi-21? <|assistant|> SELECT "class_from_1928" FROM "iron_coaches" WHERE "class_to_1928"='bdi-21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "iron_coaches" ( "class_to_1928" text, "class_from_1928" text, "seats" text, "quantity" real, "year_s_of_manufacture" text, "remarks" text ); Question: What were the remarks for the coach having a class from 1928 of Cid-21B? <|assistant|> SELECT "remarks" FROM "iron_coaches" WHERE "class_from_1928"='cid-21b';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualified_competitors" ( "position" real, "gymnast" text, "a_score" real, "b_score" real, "total" real ); Question: Which B Score has a Total larger than 15.325, and an A Score smaller than 6.4? <|assistant|> SELECT SUM("b_score") FROM "qualified_competitors" WHERE "total">15.325 AND "a_score"<6.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualified_competitors" ( "position" real, "gymnast" text, "a_score" real, "b_score" real, "total" real ); Question: Which Total has an A Score of 6.5, and a Position larger than 5? <|assistant|> SELECT MIN("total") FROM "qualified_competitors" WHERE "a_score"=6.5 AND "position">5;<|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 date of week 11? <|assistant|> SELECT "date" FROM "schedule" WHERE "week"=11;<|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 latest week when the chicago bears are the opponent? <|assistant|> SELECT MAX("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 "results_of_heat_3" ( "draw" real, "artist" text, "song" text, "percentage" text, "place" real ); Question: What song placed higher than#4? <|assistant|> SELECT "song" FROM "results_of_heat_3" WHERE "place">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_of_heat_3" ( "draw" real, "artist" text, "song" text, "percentage" text, "place" real ); Question: Who is the artist that drew higher than 4? <|assistant|> SELECT "artist" FROM "results_of_heat_3" WHERE "draw">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "drivers" ( "driver" text, "starts" real, "finishes" real, "wins" real, "podiums" real, "stage_wins" real, "points" real ); Question: What's the total starts with more points than 1 and the driver is Nasser Al-Attiyah? <|assistant|> SELECT COUNT("starts") FROM "drivers" WHERE "driver"='nasser al-attiyah' AND "points">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "drivers" ( "driver" text, "starts" real, "finishes" real, "wins" real, "podiums" real, "stage_wins" real, "points" real ); Question: What's the smallest number of podiums having more than 6 starts and 5 finishes? <|assistant|> SELECT MIN("podiums") FROM "drivers" WHERE "finishes"=5 AND "starts">6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "drivers" ( "driver" text, "starts" real, "finishes" real, "wins" real, "podiums" real, "stage_wins" real, "points" real ); Question: What's the number of stage wins for Federico Villagra having more than 1 finish, less than 8 starts and less than 1 podium? <|assistant|> SELECT COUNT("stage_wins") FROM "drivers" WHERE "finishes">1 AND "podiums"<1 AND "driver"='federico villagra' AND "starts"<8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "drivers" ( "driver" text, "starts" real, "finishes" real, "wins" real, "podiums" real, "stage_wins" real, "points" real ); Question: What's the finishes for Lambros Athanassoulas having 0 podiums and 0 stage wins? <|assistant|> SELECT SUM("finishes") FROM "drivers" WHERE "podiums"=0 AND "stage_wins"=0 AND "driver"='lambros athanassoulas';<|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 is the average number of electorates (2003) reserved for sc with a constituency number of 50? <|assistant|> SELECT AVG("number_of_electorates_2003") FROM "assembly_segments" WHERE "reserved_for_sc_st_none"='sc' AND "constituency_number"='50';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "goal_scorers" ( "name" text, "pre_season" real, "a_league" real, "finals" real, "total" real ); Question: Which Finals have a Pre-Season larger than 0? <|assistant|> SELECT MIN("finals") FROM "goal_scorers" WHERE "pre_season">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "goal_scorers" ( "name" text, "pre_season" real, "a_league" real, "finals" real, "total" real ); Question: How much A-League has a Pre-Season larger than 0? <|assistant|> SELECT COUNT("a_league") FROM "goal_scorers" WHERE "pre_season">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "serialized_titles" ( "title" text, "author" text, "first_issue" text, "last_issue" text, "completed" text ); Question: What is the last issue entry for Aron's Absurd Armada? <|assistant|> SELECT "last_issue" FROM "serialized_titles" WHERE "title"='aron''s absurd armada';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "serialized_titles" ( "title" text, "author" text, "first_issue" text, "last_issue" text, "completed" text ); Question: What is the title that was first published in August 2010? <|assistant|> SELECT "title" FROM "serialized_titles" WHERE "first_issue"='august 2010';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "serialized_titles" ( "title" text, "author" text, "first_issue" text, "last_issue" text, "completed" text ); Question: What is the completed entry for Aron's Absurd Armada? <|assistant|> SELECT "completed" FROM "serialized_titles" WHERE "title"='aron''s absurd armada';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "serialized_titles" ( "title" text, "author" text, "first_issue" text, "last_issue" text, "completed" text ); Question: What is the title that was first published in February 2009 and is still ongoing? <|assistant|> SELECT "title" FROM "serialized_titles" WHERE "last_issue"='ongoing' AND "first_issue"='february 2009';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "serialized_titles" ( "title" text, "author" text, "first_issue" text, "last_issue" text, "completed" text ); Question: What is the last issue entry of Time and Again? <|assistant|> SELECT "last_issue" FROM "serialized_titles" WHERE "title"='time and again';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "athlete" text, "nationality" text, "time" real, "react" real ); Question: What the rank of the Virgin Islands athlete with react under 0.168? <|assistant|> SELECT "rank" FROM "semifinal_1" WHERE "react"<0.168 AND "nationality"='virgin islands';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "athlete" text, "nationality" text, "time" real, "react" real ); Question: What is the lowest rank for Chris Brown with react greater than 0.244? <|assistant|> SELECT MIN("rank") FROM "semifinal_1" WHERE "athlete"='chris brown' AND "react">0.244;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "athlete" text, "nationality" text, "time" real, "react" real ); Question: What is the highest rank of an athlete from Belgium with react greater than 0.162? <|assistant|> SELECT MAX("rank") FROM "semifinal_1" WHERE "nationality"='belgium' AND "react">0.162;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "rank" real, "largest_u_s_city" text, "total" real, "partners" real, "other" real ); Question: What is the average number of partners for the firm with a rank under 71, other over 77, and largest city of Philadelphia? <|assistant|> SELECT AVG("partners") FROM "see_also" WHERE "rank"<71 AND "largest_u_s_city"='philadelphia' AND "other">77;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "rank" real, "largest_u_s_city" text, "total" real, "partners" real, "other" real ); Question: What is the smallest rank for the city having partners of 342, other under 147, and largest city of Cleveland? <|assistant|> SELECT MIN("rank") FROM "see_also" WHERE "partners"=342 AND "largest_u_s_city"='cleveland' AND "other"<147;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "rank" real, "largest_u_s_city" text, "total" real, "partners" real, "other" real ); Question: What is the number of partners for the city ranked under 294, total over 264, largest city of Chicago, and other over 46? <|assistant|> SELECT "partners" FROM "see_also" WHERE "rank"<294 AND "total">264 AND "largest_u_s_city"='chicago' AND "other">46;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "popularity_of_terrestrial_tv_stations" ( "tv_station_operator" text, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011_1_h" real ); Question: What's the 2008 that has 3.4 in 2009 and more than 2.9 in 2005? <|assistant|> SELECT MAX("2008") FROM "popularity_of_terrestrial_tv_stations" WHERE "2009"=3.4 AND "2005">2.9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "popularity_of_terrestrial_tv_stations" ( "tv_station_operator" text, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011_1_h" real ); Question: What's the 2006 if there's less than 6.7 in 2007 and less than 3.4 in 2009? <|assistant|> SELECT SUM("2006") FROM "popularity_of_terrestrial_tv_stations" WHERE "2007"<6.7 AND "2009"<3.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "popularity_of_terrestrial_tv_stations" ( "tv_station_operator" text, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011_1_h" real ); Question: What's the total in 2005 if there's more than 10.2 in 2006, less than 29.5 in 2007, more than 4.9 in 2009 and less than 43.8 in 2010? <|assistant|> SELECT COUNT("2005") FROM "popularity_of_terrestrial_tv_stations" WHERE "2010"<43.8 AND "2007"<29.5 AND "2009">4.9 AND "2006">10.2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "popularity_of_terrestrial_tv_stations" ( "tv_station_operator" text, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011_1_h" real ); Question: What is the 2009 when there's 11.8 in 2005 and less than 12.6 in 2006? <|assistant|> SELECT MIN("2009") FROM "popularity_of_terrestrial_tv_stations" WHERE "2005"=11.8 AND "2006"<12.6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "popularity_of_terrestrial_tv_stations" ( "tv_station_operator" text, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011_1_h" real ); Question: What's the 2005 of TV3 when there is less than 42 in 2007 and less than 29.5 in 2010? <|assistant|> SELECT MAX("2005") FROM "popularity_of_terrestrial_tv_stations" WHERE "2007"<42 AND "tv_station_operator"='tv3' AND "2010"<29.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins_13" ( "date" text, "tournament" text, "surface" text, "partner" text, "opponent_in_final" text, "score" text ); Question: What date had Alexander Krasnorutskiy as a partner with a score of 6–3, 4–6, 6–2? <|assistant|> SELECT "date" FROM "wins_13" WHERE "partner"='alexander krasnorutskiy' AND "score"='6–3, 4–6, 6–2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schools" ( "school" text, "city" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "county" text ); Question: Which IHSAA Class has a Mascot of eagles, and a City of evansville? <|assistant|> SELECT "ihsaa_class" FROM "schools" WHERE "mascot"='eagles' AND "city"='evansville';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schools" ( "school" text, "city" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "county" text ); Question: Which City has a School of indianapolis brebeuf? <|assistant|> SELECT "city" FROM "schools" WHERE "school"='indianapolis brebeuf';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schools" ( "school" text, "city" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "county" text ); Question: How much Enrollment has a School of indianapolis tindley? <|assistant|> SELECT COUNT("enrollment") FROM "schools" WHERE "school"='indianapolis tindley';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schools" ( "school" text, "city" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "county" text ); Question: Which County has an IHSAA Class of aaaa, and a Mascot of cardinals? <|assistant|> SELECT "county" FROM "schools" WHERE "ihsaa_class"='aaaa' AND "mascot"='cardinals';<|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" real, "league_cup_goals" real, "total_apps" text, "total_goals" real ); Question: How many Total Goals values have 0 League Cup Goals? <|assistant|> SELECT COUNT("total_goals") 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" real, "league_cup_goals" real, "total_apps" text, "total_goals" real ); Question: What is the smallest number of FA Cup Goals for players with 4 FA Cup Appearances, 49 Total Appearances, and more than 17 total goals? <|assistant|> SELECT MIN("fa_cup_goals") FROM "appearances_and_goals" WHERE "fa_cup_apps"='4' AND "total_apps"='49' AND "total_goals">17;<|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" real, "league_cup_goals" real, "total_apps" text, "total_goals" real ); Question: What is the average number of League Goals for palyers with 0 FA Cup Goals? <|assistant|> SELECT AVG("league_goals") FROM "appearances_and_goals" WHERE "fa_cup_goals"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championships_total_medals" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" text ); Question: what is the highest silver when the total is 4 and bronze is less than 1? <|assistant|> SELECT MAX("silver") FROM "world_championships_total_medals" WHERE "total"='4' AND "bronze"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championships_total_medals" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" text ); Question: what is the gold when the bronze is 1, total is 6 and silver is less than 3? <|assistant|> SELECT SUM("gold") FROM "world_championships_total_medals" WHERE "bronze"=1 AND "total"='6' AND "silver"<3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "delegates" ( "province_community" text, "contestant" text, "height" real, "hometown" text, "geographical_regions" text ); Question: What is province of community with height larger than 1.8 and is in el cibao region? <|assistant|> SELECT "province_community" FROM "delegates" WHERE "geographical_regions"='el cibao' AND "height">1.8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "delegates" ( "province_community" text, "contestant" text, "height" real, "hometown" text, "geographical_regions" text ); Question: What contestant is from santo domingo este and has height smaller than 1.79? <|assistant|> SELECT "contestant" FROM "delegates" WHERE "height"<1.79 AND "hometown"='santo domingo este';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "delegates" ( "province_community" text, "contestant" text, "height" real, "hometown" text, "geographical_regions" text ); Question: What is total number of height of province, with community of com. dom. lto. America? <|assistant|> SELECT COUNT("height") FROM "delegates" WHERE "province_community"='com. dom. lto. america';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "location" text, "mascot" text, "county" text, "year_joined" text, "previous_conference" text, "year_left" text ); Question: what is the previous conference when the year joined is 1932 and the mascot is tigers? <|assistant|> SELECT "previous_conference" FROM "former_members" WHERE "year_joined"='1932' AND "mascot"='tigers';<|endoftext|>