text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "length" text, "race_name" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: What length was won by Roger McCluskey? <|assistant|> SELECT "length" FROM "schedule_and_results" WHERE "winning_driver"='Roger McCluskey';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "length" text, "race_name" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: What rounds did Phoenix International Raceway host? <|assistant|> SELECT "rnd" FROM "schedule_and_results" WHERE "track"='Phoenix International Raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "length" text, "race_name" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: What are the lengths hosted by Pocono International Raceway? <|assistant|> SELECT "length" FROM "schedule_and_results" WHERE "track"='Pocono International Raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "length" text, "race_name" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: What lengths did Phoenix International Raceway host? <|assistant|> SELECT "length" FROM "schedule_and_results" WHERE "track"='Phoenix International Raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Question: Name the location attendance for score being l 83–118 (ot) <|assistant|> SELECT "location_attendance" FROM "game_log" WHERE "score"='L 83–118 (OT)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Question: Name the high assists for december 9 <|assistant|> SELECT "high_assists" FROM "game_log" WHERE "date"='December 9';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" real, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: What is the total number of winners when the team classification leader was Kelme-Costa Blanca and the combativity award was won by Jacky Durand? <|assistant|> SELECT COUNT("winner") FROM "classification_leadership" WHERE "team_classification"='Kelme-Costa Blanca' AND "combativity_award"='Jacky Durand';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" real, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: Who was the general classification leader when the young rider classification leader was Salvatore Commesso and the winner was Erik Dekker? <|assistant|> SELECT "general_classification" FROM "classification_leadership" WHERE "young_rider_classification"='Salvatore Commesso' AND "winner"='Erik Dekker';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" real, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: What is the total number of team classifications when the young rider classification leader was Salvatore Commesso and the combativity award winner was Jacky Durand? <|assistant|> SELECT COUNT("team_classification") FROM "classification_leadership" WHERE "young_rider_classification"='Salvatore Commesso' AND "combativity_award"='Jacky Durand';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: In what round did Al Unser win at Wisconsin State Fair Park Speedway? <|assistant|> SELECT MIN("rnd") FROM "schedule_and_results" WHERE "winning_driver"='Al Unser' AND "track"='Wisconsin State Fair Park Speedway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: How many races are in College Station, Texas and won by Johnny Rutherford? <|assistant|> SELECT COUNT("race_name") FROM "schedule_and_results" WHERE "location"='College Station, Texas' AND "winning_driver"='Johnny Rutherford';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: What was the name of the race that Al Unser had the pole position? <|assistant|> SELECT "race_name" FROM "schedule_and_results" WHERE "pole_position"='Al Unser';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: What is the name of the track for the International 500 mile Sweepstakes race? <|assistant|> SELECT "track" FROM "schedule_and_results" WHERE "race_name"='International 500 Mile Sweepstakes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "pole_position" text, "winning_driver" text ); Question: Which locations did Gordon Johncock hold the pole position? <|assistant|> SELECT "location" FROM "schedule_and_results" WHERE "pole_position"='Gordon Johncock';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "contemporary_humor_magazines" ( "title" text, "language" text, "country" text, "years_published" text, "frequency" text, "medium" text, "classification" text ); Question: What classifications does Fish Rap live! has? <|assistant|> SELECT "classification" FROM "contemporary_humor_magazines" WHERE "title"='Fish Rap Live!';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "type" text, "pole_position" text, "winning_driver" text ); Question: How many races took place on October 1? <|assistant|> SELECT COUNT("race_name") FROM "schedule_and_results" WHERE "date"='October 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "type" text, "pole_position" text, "winning_driver" text ); Question: How many types of tracks are there on the Phoenix International raceway? <|assistant|> SELECT COUNT("type") FROM "schedule_and_results" WHERE "track"='Phoenix International Raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "type" text, "pole_position" text, "winning_driver" text ); Question: Daily Empress Indy Silverstone took place on which round? <|assistant|> SELECT MAX("rnd") FROM "schedule_and_results" WHERE "race_name"='Daily Empress Indy Silverstone';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "type" text, "pole_position" text, "winning_driver" text ); Question: How many races took place on the Indianapolis Motor Speedway track? <|assistant|> SELECT COUNT("race_name") FROM "schedule_and_results" WHERE "track"='Indianapolis Motor Speedway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2267465_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: What driver achieved a 3:50:12 race time? <|assistant|> SELECT "driver" FROM "table1_2267465_1" WHERE "race_time"='3:50:12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2267465_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: Can you tell me the manufacturer behind Race Hill Farm Team? <|assistant|> SELECT "manufacturer" FROM "table1_2267465_1" WHERE "team"='Race Hill Farm Team';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2267465_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: How many laps have a 3:34:26 race time? <|assistant|> SELECT COUNT("laps") FROM "table1_2267465_1" WHERE "race_time"='3:34:26';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2267465_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: What's the average mph of 1964? <|assistant|> SELECT "average_speed_mph" FROM "table1_2267465_1" WHERE "year"='1964';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2268216_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: Whose is the manufacturer for team Ranier-Lundy? <|assistant|> SELECT "manufacturer" FROM "table1_2268216_1" WHERE "team"='Ranier-Lundy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2268216_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: In what year was the average speed 92.68? <|assistant|> SELECT "year" FROM "table1_2268216_1" WHERE "average_speed_mph"='92.68';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2268216_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: How many years was Pontiac the manufacturer for Joe Gibbs Racing? <|assistant|> SELECT COUNT("year") FROM "table1_2268216_1" WHERE "team"='Joe Gibbs Racing' AND "manufacturer"='Pontiac';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2268216_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: What is the date for the race that had the time of 2:43:19? <|assistant|> SELECT "date" FROM "table1_2268216_1" WHERE "race_time"='2:43:19';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2268216_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: How many average speeds are listed in the year 2003? <|assistant|> SELECT COUNT("average_speed_mph") FROM "table1_2268216_1" WHERE "year"='2003';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2268216_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Question: What team had a race time of 2:53:57? <|assistant|> SELECT "team" FROM "table1_2268216_1" WHERE "race_time"='2:53:57';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "riders_jersey_progress_table" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "sprint_classification" text, "team_classification" text ); Question: Name the sprint classification being alejandro valverde <|assistant|> SELECT "sprint_classification" FROM "riders_jersey_progress_table" WHERE "winner"='Alejandro Valverde';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "riders_jersey_progress_table" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "sprint_classification" text, "team_classification" text ); Question: Name the stage for no award <|assistant|> SELECT "stage" FROM "riders_jersey_progress_table" WHERE "mountains_classification"='no award';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "riders_jersey_progress_table" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "sprint_classification" text, "team_classification" text ); Question: Name the total number of stage for lloyd mondory <|assistant|> SELECT COUNT("stage") FROM "riders_jersey_progress_table" WHERE "mountains_classification"='Lloyd Mondory';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "riders_jersey_progress_table" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "sprint_classification" text, "team_classification" text ); Question: Name the most stage for alejandro valverde and astana greg henderson <|assistant|> SELECT MAX("stage") FROM "riders_jersey_progress_table" WHERE "general_classification"='Alejandro Valverde' AND "team_classification"='Astana' AND "winner"='Greg Henderson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "conference_winners_and_tournaments" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Question: When the Border Conference was held, who was the tournament winner? <|assistant|> SELECT "tournament_winner" FROM "conference_winners_and_tournaments" WHERE "conference"='Border Conference';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "conference_winners_and_tournaments" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Question: When Princeton was the regular season winner, who was the tournament winner? <|assistant|> SELECT "tournament_winner" FROM "conference_winners_and_tournaments" WHERE "regular_season_winner"='Princeton';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "conference_winners_and_tournaments" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Question: When Wyoming won the regular season, who was the conference player of the year? <|assistant|> SELECT "conference_player_of_the_year" FROM "conference_winners_and_tournaments" WHERE "regular_season_winner"='Wyoming';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "number" real, "name" text, "position" text, "height" text, "experience" text, "college" text ); Question: How long has Mel Daniels been playing? <|assistant|> SELECT "experience" FROM "roster" WHERE "name"='Mel Daniels';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "number" real, "name" text, "position" text, "height" text, "experience" text, "college" text ); Question: What position did the player from San Jose State play? <|assistant|> SELECT "position" FROM "roster" WHERE "college"='San Jose State';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "number" real, "name" text, "position" text, "height" text, "experience" text, "college" text ); Question: What was the number of the player that was 6-6? <|assistant|> SELECT "number" FROM "roster" WHERE "height"='6-6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_and_result" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: If the song choice is Coba and the order number is 10, what is the result? <|assistant|> SELECT "result" FROM "performances_and_result" WHERE "order_num"='10' AND "song_choice"='Coba';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_and_result" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: What is the result if Coba is the song choice? <|assistant|> SELECT "result" FROM "performances_and_result" WHERE "song_choice"='Coba';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_and_result" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: If Coba is the song choice, what is the order number? <|assistant|> SELECT "order_num" FROM "performances_and_result" WHERE "song_choice"='Coba';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_and_result" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: If Crazy In Love is the song choice, what is the theme? <|assistant|> SELECT "theme" FROM "performances_and_result" WHERE "song_choice"='Crazy In Love';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_and_result" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: For week number of the top 40, what was the results? <|assistant|> SELECT "result" FROM "performances_and_result" WHERE "week_num"='Top 40';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_and_result" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: For week of top 9, what were the results? <|assistant|> SELECT "result" FROM "performances_and_result" WHERE "week_num"='Top 9';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_membership" ( "city" text, "county" text, "region" text, "local_authority" text, "type" text, "population" real, "urban_area" real, "metropolitan_area" real ); Question: The city of Birmingham is what type of location? <|assistant|> SELECT "type" FROM "group_membership" WHERE "city"='Birmingham';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_membership" ( "city" text, "county" text, "region" text, "local_authority" text, "type" text, "population" real, "urban_area" real, "metropolitan_area" real ); Question: Leeds City Council is the local authority for what type of location? <|assistant|> SELECT "type" FROM "group_membership" WHERE "local_authority"='Leeds City Council';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_membership" ( "city" text, "county" text, "region" text, "local_authority" text, "type" text, "population" real, "urban_area" real, "metropolitan_area" real ); Question: Tyne and Wear County has what total membership for their metropolitan area? <|assistant|> SELECT "metropolitan_area" FROM "group_membership" WHERE "county"='Tyne and Wear';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_membership" ( "city" text, "county" text, "region" text, "local_authority" text, "type" text, "population" real, "urban_area" real, "metropolitan_area" real ); Question: What is the total membership for the metropolitan area in the city of Manchester? <|assistant|> SELECT MAX("metropolitan_area") FROM "group_membership" WHERE "city"='Manchester';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Who was the runner-up (a) if K. P. Ramalingam won the election? <|assistant|> SELECT "runner_up_a" FROM "list_of_elected_m_ps" WHERE "winner"='K. P. Ramalingam';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "year" real, "class" text, "team_name" text, "bike" text, "riders" text, "races" text, "wins" real, "podiums" real, "poles" real, "f_laps" real, "points" real, "pos" text ); Question: When 1 (5) is the races what is the team name? <|assistant|> SELECT "team_name" FROM "summary" WHERE "races"='1 (5)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "year" real, "class" text, "team_name" text, "bike" text, "riders" text, "races" text, "wins" real, "podiums" real, "poles" real, "f_laps" real, "points" real, "pos" text ); Question: When 19th is the position what is the highest amount of poles? <|assistant|> SELECT MAX("poles") FROM "summary" WHERE "pos"='19th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "year" real, "class" text, "team_name" text, "bike" text, "riders" text, "races" text, "wins" real, "podiums" real, "poles" real, "f_laps" real, "points" real, "pos" text ); Question: When 86 is the amount of points what is the position? <|assistant|> SELECT "pos" FROM "summary" WHERE "points"=86;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Name the most margin for nco party and p. ramachandran won <|assistant|> SELECT MAX("margin") FROM "list_of_elected_m_ps" WHERE "party"='NCO' AND "winner"='P. Ramachandran';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Name the party a for m. s. k. sathiyendran runner up <|assistant|> SELECT "party_a" FROM "list_of_elected_m_ps" WHERE "runner_up_a"='M. S. K. Sathiyendran';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Name the party a for sriperumbudur <|assistant|> SELECT "party_a" FROM "list_of_elected_m_ps" WHERE "constituency"='Sriperumbudur';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Name the total number of runner up a for perambalur <|assistant|> SELECT COUNT("runner_up_a") FROM "list_of_elected_m_ps" WHERE "constituency"='Perambalur';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Name the constituency for 175130 <|assistant|> SELECT "constituency" FROM "list_of_elected_m_ps" WHERE "margin"=175130;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: How many margins have a winner of S. Singaravadivel? <|assistant|> SELECT COUNT("margin") FROM "list_of_elected_m_ps" WHERE "winner"='S. Singaravadivel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: How many winners have a runner-up of A. Karthikeyan? <|assistant|> SELECT COUNT("winner") FROM "list_of_elected_m_ps" WHERE "runner_up_a"='A. Karthikeyan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: What is every party with a winner of P. Chidambaram? <|assistant|> SELECT "party_a" FROM "list_of_elected_m_ps" WHERE "winner"='P. Chidambaram';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: What is every party A with a constituency of Tiruchendur? <|assistant|> SELECT "party_a" FROM "list_of_elected_m_ps" WHERE "constituency"='Tiruchendur';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: Who is the constituency when the runner-up was d. Venugopal? <|assistant|> SELECT "constituency" FROM "list_of_elected_m_ps" WHERE "runner_up_a"='D. Venugopal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: What is the party where the constituency is 10. Tindivanam? <|assistant|> SELECT "party" FROM "list_of_elected_m_ps" WHERE "constituency"='10. Tindivanam';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: What is the party when the constituency is 1. Chennai North? <|assistant|> SELECT "party" FROM "list_of_elected_m_ps" WHERE "constituency"='1. Chennai North';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: How many margin results are listed in the election that was won by L. Adaikalaraj C and the party was the Indian national congress? <|assistant|> SELECT COUNT("margin") FROM "list_of_elected_m_ps" WHERE "party"='Indian National Congress' AND "winner"='L. Adaikalaraj c';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: What is the margin when k. balathandayutham is the winner? <|assistant|> SELECT MAX("margin") FROM "list_of_elected_m_ps" WHERE "winner"='K. Balathandayutham';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_elected_m_ps" ( "constituency" text, "winner" text, "party" text, "margin" real, "runner_up_a" text, "party_a" text ); Question: What is the margin when periyakulam is the constituency? <|assistant|> SELECT "margin" FROM "list_of_elected_m_ps" WHERE "constituency"='Periyakulam';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "type" text, "pole_position" text, "winning_driver" text ); Question: Who had the pole position in the August 15, 1981 race? <|assistant|> SELECT "pole_position" FROM "schedule_and_results" WHERE "date"='August 15, 1981';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "rnd" real, "date" text, "race_name" text, "length" text, "track" text, "location" text, "type" text, "pole_position" text, "winning_driver" text ); Question: Which track was used on September 12, 1981? <|assistant|> SELECT "track" FROM "schedule_and_results" WHERE "date"='September 12, 1981';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations_under_construction" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" real, "transit_connections" text, "park_and_ride" text ); Question: Name the park and ride for university of washington <|assistant|> SELECT "park_and_ride" FROM "stations_under_construction" WHERE "city_neighborhood"='University of Washington';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations_under_construction" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" real, "transit_connections" text, "park_and_ride" text ); Question: Name the extension for university of washington <|assistant|> SELECT "extension" FROM "stations_under_construction" WHERE "city_neighborhood"='University of Washington';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations_under_construction" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" real, "transit_connections" text, "park_and_ride" text ); Question: Name the least projected opening <|assistant|> SELECT MIN("projected_opening") FROM "stations_under_construction";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations_under_construction" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" real, "transit_connections" text, "park_and_ride" text ); Question: Name the transit connections for capitol hill u <|assistant|> SELECT "transit_connections" FROM "stations_under_construction" WHERE "station"='Capitol Hill U';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations_under_construction" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" real, "transit_connections" text, "park_and_ride" text ); Question: Name the park and ride for roosevelt u <|assistant|> SELECT "park_and_ride" FROM "stations_under_construction" WHERE "station"='Roosevelt U';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "planned_or_proposed_stations" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" text, "park_and_ride" text, "funded_by_st2" text ); Question: How many park and rides are proposed for Overlake Village? <|assistant|> SELECT COUNT("park_and_ride") FROM "planned_or_proposed_stations" WHERE "station"='Overlake Village';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "planned_or_proposed_stations" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" text, "park_and_ride" text, "funded_by_st2" text ); Question: How many neighborhoods have a station proposed at a Hospital? <|assistant|> SELECT COUNT("city_neighborhood") FROM "planned_or_proposed_stations" WHERE "station"='Hospital';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "planned_or_proposed_stations" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" text, "park_and_ride" text, "funded_by_st2" text ); Question: What are all the City/Neighborhoods whose extension is East Link and proposed parking lot status is yes and whose proposed station is Overlake transit Center? <|assistant|> SELECT "city_neighborhood" FROM "planned_or_proposed_stations" WHERE "extension"='East Link' AND "park_and_ride"='Yes' AND "station"='Overlake Transit Center';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "planned_or_proposed_stations" ( "station" text, "extension" text, "city_neighborhood" text, "projected_opening" text, "park_and_ride" text, "funded_by_st2" text ); Question: What is the funded by st2 status of the Redondo/Star Lake station? <|assistant|> SELECT "funded_by_st2" FROM "planned_or_proposed_stations" WHERE "station"='Redondo/Star Lake';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations" ( "station" text, "line_s" text, "city_neighborhood" text, "year_opened" real, "transit_connections" text, "park_and_ride" text ); Question: What are the transit connections from Pioneer Square U? <|assistant|> SELECT "transit_connections" FROM "stations" WHERE "station"='Pioneer Square U';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stations" ( "station" text, "line_s" text, "city_neighborhood" text, "year_opened" real, "transit_connections" text, "park_and_ride" text ); Question: What's the transit connection in Columbia City, Seattle? <|assistant|> SELECT "transit_connections" FROM "stations" WHERE "city_neighborhood"='Columbia City, Seattle';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "availability_and_names" ( "country" text, "type_of_protection" text, "maximum_term" text, "pct_route_available" text, "conversion_from_patent_application" text ); Question: For small patent type of protections, what type of PCT route is available? <|assistant|> SELECT "pct_route_available" FROM "availability_and_names" WHERE "type_of_protection"='small patent';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "availability_and_names" ( "country" text, "type_of_protection" text, "maximum_term" text, "pct_route_available" text, "conversion_from_patent_application" text ); Question: In Tonga, what is the conversion from patent application? <|assistant|> SELECT "conversion_from_patent_application" FROM "availability_and_names" WHERE "country"='Tonga';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "availability_and_names" ( "country" text, "type_of_protection" text, "maximum_term" text, "pct_route_available" text, "conversion_from_patent_application" text ); Question: For short patent type of protections, what type of PCT route is available? <|assistant|> SELECT "pct_route_available" FROM "availability_and_names" WHERE "type_of_protection"='short patent';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "availability_and_names" ( "country" text, "type_of_protection" text, "maximum_term" text, "pct_route_available" text, "conversion_from_patent_application" text ); Question: In Tangier Zone, what is the PCT route availibility? <|assistant|> SELECT "pct_route_available" FROM "availability_and_names" WHERE "country"='Tangier Zone';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "availability_and_names" ( "country" text, "type_of_protection" text, "maximum_term" text, "pct_route_available" text, "conversion_from_patent_application" text ); Question: When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications? <|assistant|> SELECT "conversion_from_patent_application" FROM "availability_and_names" WHERE "maximum_term"='10 years' AND "pct_route_available"='Yes';<|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, "cowboys_points" real, "opponents" real, "record" text ); Question: What was the result against the team which the Cowboys have a 6-2 record against? <|assistant|> SELECT "result" FROM "schedule" WHERE "record"='6-2';<|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, "cowboys_points" real, "opponents" real, "record" text ); Question: What is the fewest points opponents have scored when the Cowboys score 36? <|assistant|> SELECT MIN("opponents") FROM "schedule" WHERE "cowboys_points"=36;<|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, "cowboys_points" real, "opponents" real, "record" text ); Question: How many opponents have a 1-0 record against the Cowboys? <|assistant|> SELECT "opponents" FROM "schedule" WHERE "record"='1-0';<|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, "cowboys_points" real, "opponents" real, "record" text ); Question: What game was held against a team with a 6-3 record against the Cowboys? <|assistant|> SELECT "game" FROM "schedule" WHERE "record"='6-3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "n" real, "p" text, "name" text, "eu" text, "country" text, "age" real, "type" text, "moving_from" text, "transfer_window" text, "ends" text, "transfer_fee" text, "source" text ); Question: How many names have a country of civ? <|assistant|> SELECT COUNT("name") FROM "in" WHERE "country"='CIV';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "n" real, "p" text, "name" text, "eu" text, "country" text, "age" real, "type" text, "moving_from" text, "transfer_window" text, "ends" text, "transfer_fee" text, "source" text ); Question: Who moved from Northampton Town? <|assistant|> SELECT "name" FROM "in" WHERE "moving_from"='Northampton Town';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "n" real, "p" text, "name" text, "eu" text, "country" text, "age" real, "type" text, "moving_from" text, "transfer_window" text, "ends" text, "transfer_fee" text, "source" text ); Question: Where did Kisnorbo move from? <|assistant|> SELECT "moving_from" FROM "in" WHERE "name"='Kisnorbo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "n" real, "p" text, "name" text, "eu" text, "country" text, "age" real, "type" text, "moving_from" text, "transfer_window" text, "ends" text, "transfer_fee" text, "source" text ); Question: What is the name of the player when n is 28? <|assistant|> SELECT "name" FROM "in" WHERE "n"=28;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "n" real, "p" text, "name" text, "eu" text, "country" text, "age" real, "type" text, "moving_from" text, "transfer_window" text, "ends" text, "transfer_fee" text, "source" text ); Question: How much was the transfer fee when n is 2? <|assistant|> SELECT "transfer_fee" FROM "in" WHERE "n"=2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "loans_in" ( "no" real, "p" text, "name" text, "country" text, "age" real, "loan_club" text, "started" text, "ended" text, "start_source" text, "end_source" text ); Question: What player is 24 years old? <|assistant|> SELECT "name" FROM "loans_in" WHERE "age"=24;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_228149_1" ( "game" text, "date" text, "champion" text, "score" text, "runner_up" text, "stadium" text, "city" text, "ted_morris_memorial_trophy_game_mvp" text, "bruce_coulter_award" text ); Question: Name the ted morris memorial trophy for november 22, 2008 <|assistant|> SELECT "ted_morris_memorial_trophy_game_mvp" FROM "table1_228149_1" WHERE "date"='November 22, 2008';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_228149_1" ( "game" text, "date" text, "champion" text, "score" text, "runner_up" text, "stadium" text, "city" text, "ted_morris_memorial_trophy_game_mvp" text, "bruce_coulter_award" text ); Question: Name the ted morris memorial trophy 34th game <|assistant|> SELECT "ted_morris_memorial_trophy_game_mvp" FROM "table1_228149_1" WHERE "game"='34th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_228149_1" ( "game" text, "date" text, "champion" text, "score" text, "runner_up" text, "stadium" text, "city" text, "ted_morris_memorial_trophy_game_mvp" text, "bruce_coulter_award" text ); Question: Nam the total number for bruce coulter award for 9th game <|assistant|> SELECT COUNT("bruce_coulter_award") FROM "table1_228149_1" WHERE "game"='9th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_228149_1" ( "game" text, "date" text, "champion" text, "score" text, "runner_up" text, "stadium" text, "city" text, "ted_morris_memorial_trophy_game_mvp" text, "bruce_coulter_award" text ); Question: Name the bruce coulter award for forrest kennerd <|assistant|> SELECT "bruce_coulter_award" FROM "table1_228149_1" WHERE "ted_morris_memorial_trophy_game_mvp"='Forrest Kennerd';<|endoftext|>