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