text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "p" (
"player" text,
"nationality" text,
"position" text,
"from" text,
"school_country" text
);
Question: What position does the player from arkansas play?
<|assistant|>
SELECT "position" FROM "p" WHERE "school_country"='arkansas';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: Who is the away side at glenferrie oval?
<|assistant|>
SELECT "away_team" FROM "round_11" WHERE "venue"='glenferrie oval';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What is the away side's score when richmond is at home?
<|assistant|>
SELECT "away_team_score" FROM "round_11" WHERE "home_team"='richmond';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: WHAT WAS THE HOME TEAM'S SCORE WHEN THEY HAD A CROWD GREATER THAN 20,000 AND PLAYED AGAINST COLLINGWOOD?
<|assistant|>
SELECT "home_team_score" FROM "round_7" WHERE "crowd">'20,000' AND "away_team"='collingwood';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: AT WHAT VENUE DID THE HOME TEAM SCORE 10.11 (71)?
<|assistant|>
SELECT "venue" FROM "round_7" WHERE "home_team_score"='10.11 (71)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: AT WHAT VENUE DID THE HOME TEAM SCORE 10.9 (69)?
<|assistant|>
SELECT "venue" FROM "round_7" WHERE "home_team_score"='10.9 (69)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: WHAT HOME TEAM SCORED 9.11 (65)?
<|assistant|>
SELECT "home_team" FROM "round_7" WHERE "home_team_score"='9.11 (65)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the crowd size at Collingwood's match?
<|assistant|>
SELECT "crowd" FROM "round_6" WHERE "home_team"='collingwood';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the crowd size at Arden Street Oval?
<|assistant|>
SELECT "crowd" FROM "round_6" WHERE "venue"='arden street oval';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_matches_between_the_home_n" (
"date" text,
"stadium" text,
"fixture" text,
"status_of_match" text,
"score" text
);
Question: What is the status of the match between Scotland v Northern Ireland?
<|assistant|>
SELECT "status_of_match" FROM "international_matches_between_the_home_n" WHERE "fixture"='scotland v northern ireland';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: In what week was the game on August 10, 1956 played?
<|assistant|>
SELECT AVG("week") FROM "exhibition_schedule" WHERE "date"='august 10, 1956';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What was the attendance of the game in week 6?
<|assistant|>
SELECT "attendance" FROM "exhibition_schedule" WHERE "week"=6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: In what week was the game on August 24, 1956 played in front of 40,175 fans?
<|assistant|>
SELECT MAX("week") FROM "exhibition_schedule" WHERE "date"='august 24, 1956' AND "attendance">'40,175';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "media" (
"translator_call_letters" text,
"b_mountain_channel" text,
"laurel_mountain_channel" text,
"psip" text,
"station_call_letters" text,
"network_affiliation_id" text,
"original_channel" text,
"signal_quality" text
);
Question: What signal quality does the KCAL-DT channel have?
<|assistant|>
SELECT "signal_quality" FROM "media" WHERE "station_call_letters"='kcal-dt';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "media" (
"translator_call_letters" text,
"b_mountain_channel" text,
"laurel_mountain_channel" text,
"psip" text,
"station_call_letters" text,
"network_affiliation_id" text,
"original_channel" text,
"signal_quality" text
);
Question: What original channel is associated with B Mountain Channel 9?
<|assistant|>
SELECT "original_channel" FROM "media" WHERE "b_mountain_channel"='9';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "media" (
"translator_call_letters" text,
"b_mountain_channel" text,
"laurel_mountain_channel" text,
"psip" text,
"station_call_letters" text,
"network_affiliation_id" text,
"original_channel" text,
"signal_quality" text
);
Question: What B Mountain Channel has station call letters of k41go?
<|assistant|>
SELECT "b_mountain_channel" FROM "media" WHERE "station_call_letters"='k41go';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "media" (
"translator_call_letters" text,
"b_mountain_channel" text,
"laurel_mountain_channel" text,
"psip" text,
"station_call_letters" text,
"network_affiliation_id" text,
"original_channel" text,
"signal_quality" text
);
Question: What Laurel Mountain Channel is associated with B Mountain Channel of 7?
<|assistant|>
SELECT "laurel_mountain_channel" FROM "media" WHERE "b_mountain_channel"='7';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "media" (
"translator_call_letters" text,
"b_mountain_channel" text,
"laurel_mountain_channel" text,
"psip" text,
"station_call_letters" text,
"network_affiliation_id" text,
"original_channel" text,
"signal_quality" text
);
Question: What are the translator call letters for station call letters of KCOP-DT?
<|assistant|>
SELECT "translator_call_letters" FROM "media" WHERE "station_call_letters"='kcop-dt';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_12" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What team was the away team with a score of 9.11 (65)?
<|assistant|>
SELECT "away_team" FROM "round_12" WHERE "away_team_score"='9.11 (65)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_12" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What date was fitzroy the home team?
<|assistant|>
SELECT "date" FROM "round_12" WHERE "home_team"='fitzroy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_12" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the score for the away team when the home team was richmond?
<|assistant|>
SELECT "away_team_score" FROM "round_12" WHERE "home_team"='richmond';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: Who is the away team at the game at Arden Street Oval?
<|assistant|>
SELECT "away_team" FROM "round_6" WHERE "venue"='arden street oval';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What is the venue where the home team is Footscray?
<|assistant|>
SELECT "venue" FROM "round_6" WHERE "home_team"='footscray';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What is the venue for the game on 1 June 1929 where Richmond was the away team?
<|assistant|>
SELECT "venue" FROM "round_6" WHERE "date"='1 june 1929' AND "away_team"='richmond';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1971_isle_of_man_senior_tt_500cc_final_s" (
"place" real,
"rider" text,
"country" text,
"machine" text,
"speed" text,
"time" text,
"points" real
);
Question: What was the speed of the rider that earned 1 point?
<|assistant|>
SELECT "speed" FROM "1971_isle_of_man_senior_tt_500cc_final_s" WHERE "points"=1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "blue_team" (
"learner_driver" text,
"partner" text,
"driver_s_age" real,
"years_on_learners" real,
"licence_test_attempts" real,
"passed_yet" text
);
Question: Which partner has fewer than 17 years on learners and a driver's age over 32?
<|assistant|>
SELECT "partner" FROM "blue_team" WHERE "years_on_learners"<17 AND "driver_s_age">32;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_16" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What away team is playing at the Brunswick Street Oval Venue?
<|assistant|>
SELECT "away_team" FROM "round_16" WHERE "venue"='brunswick street oval';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_16" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What date does the Home team of Richmond have?
<|assistant|>
SELECT "date" FROM "round_16" WHERE "home_team"='richmond';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: Who is the home team at Victoria Park on 20 April 1957?
<|assistant|>
SELECT "home_team" FROM "round_1" WHERE "date"='20 april 1957' AND "venue"='victoria park';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: Who is the home team at the game where the away team scored 6.14 (50)?
<|assistant|>
SELECT "home_team_score" FROM "round_1" WHERE "away_team_score"='6.14 (50)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_stations" (
"station" text,
"municipality" text,
"county" text,
"former_railroad" text,
"closed" real
);
Question: What municipality is the Harmon Cove station located in?
<|assistant|>
SELECT "municipality" FROM "former_stations" WHERE "station"='harmon cove';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_stations" (
"station" text,
"municipality" text,
"county" text,
"former_railroad" text,
"closed" real
);
Question: What municipality is the Benson Street station located in?
<|assistant|>
SELECT "municipality" FROM "former_stations" WHERE "station"='benson street';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_30_12_18" (
"outcome" text,
"date" text,
"tournament" text,
"partner" text,
"opponents_in_the_final" text
);
Question: What date shows corrado barazzutti's partner?
<|assistant|>
SELECT "date" FROM "doubles_30_12_18" WHERE "partner"='corrado barazzutti';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_30_12_18" (
"outcome" text,
"date" text,
"tournament" text,
"partner" text,
"opponents_in_the_final" text
);
Question: Which date has the tom gullikson butch walts final, and who was the runner-up?
<|assistant|>
SELECT "date" FROM "doubles_30_12_18" WHERE "outcome"='runner-up' AND "opponents_in_the_final"='tom gullikson butch walts';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: Who is the home team of the game against Essendon?
<|assistant|>
SELECT "home_team" FROM "round_6" WHERE "away_team"='essendon';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"sideline_reporter_s" text
);
Question: Who is the color commentator for ESPN from 1990 to 1992?
<|assistant|>
SELECT "color_commentator_s" FROM "1990s" WHERE "network"='espn';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"sideline_reporter_s" text
);
Question: Who was the sideline reporter prior to 1993?
<|assistant|>
SELECT "sideline_reporter_s" FROM "1990s" WHERE "year"<1993;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"sideline_reporter_s" text
);
Question: Who was the play by play commentator for ABC after 1998?
<|assistant|>
SELECT "play_by_play" FROM "1990s" WHERE "network"='abc' AND "year">1998;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"sideline_reporter_s" text
);
Question: What's the earliest year that Al Michaels was the play-by-play commentator, in which Lesley Visser and Dan Fouts were also sideline reporters?
<|assistant|>
SELECT MIN("year") FROM "1990s" WHERE "play_by_play"='al michaels' AND "sideline_reporter_s"='lesley visser and dan fouts';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"sideline_reporter_s" text
);
Question: For how many years combined were Frank Gifford and Dan Dierdorf color commentators?
<|assistant|>
SELECT COUNT("year") FROM "1990s" WHERE "color_commentator_s"='frank gifford and dan dierdorf';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"sideline_reporter_s" text
);
Question: Which sideline reporters worked alongside Frank Gifford and Dan Dierdorf?
<|assistant|>
SELECT "sideline_reporter_s" FROM "1990s" WHERE "color_commentator_s"='frank gifford and dan dierdorf';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_railway_batch" (
"br_no" real,
"sr_no" text,
"name" text,
"builder" text,
"whenbuilt" text,
"withdrawn" text
);
Question: When was the Lundy withdrawn?
<|assistant|>
SELECT "withdrawn" FROM "southern_railway_batch" WHERE "name"='lundy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "southern_railway_batch" (
"br_no" real,
"sr_no" text,
"name" text,
"builder" text,
"whenbuilt" text,
"withdrawn" text
);
Question: When was the locomotive named fighter command built?
<|assistant|>
SELECT "whenbuilt" FROM "southern_railway_batch" WHERE "name"='fighter command';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which country has a rand of 2 and a silver less than 6?
<|assistant|>
SELECT MAX("total") FROM "medal_table" WHERE "rank"='2' AND "silver"<6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the lowest total of medals that has a gold of 3 and a silver less than 3?
<|assistant|>
SELECT MIN("total") FROM "medal_table" WHERE "gold"=3 AND "silver"<3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the average size of the crowd for games where the home team had a score of 10.10 (70)?
<|assistant|>
SELECT AVG("crowd") FROM "round_17" WHERE "home_team_score"='10.10 (70)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the home team score for the game played at MCG?
<|assistant|>
SELECT "home_team_score" FROM "round_17" WHERE "venue"='mcg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: For the game played at Windy Hill, who was the away team?
<|assistant|>
SELECT "away_team" FROM "round_17" WHERE "venue"='windy hill';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: For the game where the away team was North Melbourne, what was the venue?
<|assistant|>
SELECT "venue" FROM "round_17" WHERE "away_team"='north melbourne';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
Question: What is the Weight for the 2012 club, Victorian Tigers?
<|assistant|>
SELECT "weight" FROM "current_squad" WHERE "2012_club"='victorian tigers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
Question: What is the Weight for the Name Billy Miller Category:Articles with hcards?
<|assistant|>
SELECT "weight" FROM "current_squad" WHERE "name"='billy miller category:articles with hcards';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
Question: What is the 2012 club for the Billy Miller Category:Articles with hcards (Name)?
<|assistant|>
SELECT "2012_club" FROM "current_squad" WHERE "name"='billy miller category:articles with hcards';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many medals did China receive?
<|assistant|>
SELECT MIN("total") FROM "medals_table" WHERE "nation"='china';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election_results" (
"general_election" real,
"num_of_candidates" real,
"num_of_seats_won" real,
"pct_of_popular_vote" text,
"result" text
);
Question: What is the # of candidates that have a popular vote of 41.37%?
<|assistant|>
SELECT AVG("num_of_candidates") FROM "general_election_results" WHERE "pct_of_popular_vote"='41.37%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election_results" (
"general_election" real,
"num_of_candidates" real,
"num_of_seats_won" real,
"pct_of_popular_vote" text,
"result" text
);
Question: What is the # of candidates of liberal majority with 51 wins and larger number of 2008 in general elections?
<|assistant|>
SELECT AVG("num_of_candidates") FROM "general_election_results" WHERE "result"='liberal majority' AND "num_of_seats_won"=51 AND "general_election">2008;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "general_election_results" (
"general_election" real,
"num_of_candidates" real,
"num_of_seats_won" real,
"pct_of_popular_vote" text,
"result" text
);
Question: How many general elections that have won smaller than 23 with candidates larger than 108?
<|assistant|>
SELECT COUNT("general_election") FROM "general_election_results" WHERE "num_of_seats_won"<23 AND "num_of_candidates">108;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What venue did melbourne play at as the away team?
<|assistant|>
SELECT "venue" FROM "round_17" WHERE "away_team"='melbourne';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the essendon score when they were at home?
<|assistant|>
SELECT "home_team_score" FROM "round_17" WHERE "home_team"='essendon';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What is the date of the game where the home team score was 7.11 (53)?
<|assistant|>
SELECT "date" FROM "round_17" WHERE "home_team_score"='7.11 (53)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What venue did melbourne play at as the away team?
<|assistant|>
SELECT "venue" FROM "round_17" WHERE "away_team"='melbourne';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"nationality" text,
"position" text,
"apps" real,
"goals" real,
"years" text
);
Question: What Years have a Goal of 82?
<|assistant|>
SELECT "years" FROM "references" WHERE "goals"=82;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1998_new_england_patriots_draft_selectio" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
Question: What is the total of overall values with a safety position in a round greater than 1?
<|assistant|>
SELECT COUNT("overall") FROM "1998_new_england_patriots_draft_selectio" WHERE "position"='safety' AND "round">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1998_new_england_patriots_draft_selectio" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
Question: What is the average overall value for a round less than 4 associated with the College of Georgia?
<|assistant|>
SELECT AVG("overall") FROM "1998_new_england_patriots_draft_selectio" WHERE "round"<4 AND "college"='georgia';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What was the average attendance in weeks after 16?
<|assistant|>
SELECT AVG("attendance") FROM "schedule" WHERE "week">16;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011" (
"incident_no" text,
"date" text,
"place" text,
"killed" real,
"injured" real
);
Question: What is the highest number killed in incident #14?
<|assistant|>
SELECT MAX("killed") FROM "2011" WHERE "incident_no"='14';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the crowd size when the away team scored 7.19 (61)?
<|assistant|>
SELECT COUNT("crowd") FROM "round_10" WHERE "away_team_score"='7.19 (61)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the largest crowd at Arden Street Oval?
<|assistant|>
SELECT MAX("crowd") FROM "round_10" WHERE "venue"='arden street oval';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the home teams score at Arden Street Oval?
<|assistant|>
SELECT "home_team_score" FROM "round_10" WHERE "venue"='arden street oval';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the lowest crowd size when the away team scored 7.19 (61)?
<|assistant|>
SELECT MIN("crowd") FROM "round_10" WHERE "away_team_score"='7.19 (61)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: What was the venue where the home team scored 11.12 (78)?
<|assistant|>
SELECT "venue" FROM "round_10" WHERE "home_team_score"='11.12 (78)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What was the gold medal total for a total of 44 medals?
<|assistant|>
SELECT MIN("gold") FROM "medal_table" WHERE "total">44;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many silver medals were won with a total medal of 3 and a rank above 9?
<|assistant|>
SELECT AVG("silver") FROM "medal_table" WHERE "total"<3 AND "rank">9;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: How many weeks had an attendance of over 68,000?
<|assistant|>
SELECT COUNT("week") FROM "exhibition_schedule" WHERE "attendance">'68,000';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
Question: What engine was used by the team the finished 2nd?
<|assistant|>
SELECT "engine" FROM "indy_500_results" WHERE "finish"='2nd';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
Question: What chassis was used with the Chevrolet engine in 1991?
<|assistant|>
SELECT "chassis" FROM "indy_500_results" WHERE "engine"='chevrolet' AND "year"=1991;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
Question: What was the most recent year when a g-force chassis started in 1st?
<|assistant|>
SELECT MAX("year") FROM "indy_500_results" WHERE "start"='1st' AND "chassis"='g-force';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text,
"team" text
);
Question: What was the starting position in the year before 1986?
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "year"<1986;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fleet" (
"vessel_name" text,
"type" text,
"built" real,
"class" text,
"flag" text
);
Question: What is the name of the Malta vessel built after 2010 that is a GL class Panamax vessel?
<|assistant|>
SELECT "vessel_name" FROM "fleet" WHERE "flag"='malta' AND "type"='panamax' AND "class"='gl' AND "built">2010;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fleet" (
"vessel_name" text,
"type" text,
"built" real,
"class" text,
"flag" text
);
Question: Which year was the vessel Deva built as a Panamax DNV class ship?
<|assistant|>
SELECT SUM("built") FROM "fleet" WHERE "class"='dnv' AND "type"='panamax' AND "vessel_name"='deva';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fleet" (
"vessel_name" text,
"type" text,
"built" real,
"class" text,
"flag" text
);
Question: What is the class of vessel of the ship Hyundai Smart?
<|assistant|>
SELECT "class" FROM "fleet" WHERE "vessel_name"='hyundai smart';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fleet" (
"vessel_name" text,
"type" text,
"built" real,
"class" text,
"flag" text
);
Question: In which class would the vessel Hyundai Tenacity be placed?
<|assistant|>
SELECT "class" FROM "fleet" WHERE "vessel_name"='hyundai tenacity';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What was the result for week 14?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week"=14;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_9" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
Question: Who was the home team when the away team scored 5.9 (39)?
<|assistant|>
SELECT "home_team_score" FROM "round_9" WHERE "away_team_score"='5.9 (39)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rebounds" (
"rank" real,
"player" text,
"years" text,
"games" real,
"reb_avg" real,
"total_rebounds" real
);
Question: Which lowest rank(player) has a rebound average larger than 9, out of 920 rebounds, and who played more than 79 games?
<|assistant|>
SELECT MIN("rank") FROM "rebounds" WHERE "reb_avg">9 AND "total_rebounds"=920 AND "games">79;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rebounds" (
"rank" real,
"player" text,
"years" text,
"games" real,
"reb_avg" real,
"total_rebounds" real
);
Question: How many ranks have a rebound average smaller than 6.1?
<|assistant|>
SELECT COUNT("rank") FROM "rebounds" WHERE "reb_avg"<6.1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"overall" real,
"player" text,
"position" text,
"school_club_team" text
);
Question: Which player was drafted higher than 374 and went to the school Stephen F. Austin?
<|assistant|>
SELECT "player" FROM "nfl_draft" WHERE "overall"<374 AND "school_club_team"='stephen f. austin';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"overall" real,
"player" text,
"position" text,
"school_club_team" text
);
Question: What is the lowest round Trinity school was drafted with an overall higher than 21?
<|assistant|>
SELECT MIN("round") FROM "nfl_draft" WHERE "school_club_team"='trinity' AND "overall"<21;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"lane" real,
"swimmer" text,
"nationality" text,
"100m" real,
"200m" text,
"300m" text,
"400m" text,
"500m" text,
"600m" text,
"700m" text,
"time" text
);
Question: Who got the time of 7:52.04?
<|assistant|>
SELECT "swimmer" FROM "final" WHERE "time"='7:52.04';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"lane" real,
"swimmer" text,
"nationality" text,
"100m" real,
"200m" text,
"300m" text,
"400m" text,
"500m" text,
"600m" text,
"700m" text,
"time" text
);
Question: Which swimmer completed the 700m within 6:57.69?
<|assistant|>
SELECT "swimmer" FROM "final" WHERE "700m"='6:57.69';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"lane" real,
"swimmer" text,
"nationality" text,
"100m" real,
"200m" text,
"300m" text,
"400m" text,
"500m" text,
"600m" text,
"700m" text,
"time" text
);
Question: Which swimmer has a 100m time longer than 57.34 and a 600m of 5:54.45?
<|assistant|>
SELECT "200m" FROM "final" WHERE "100m">57.34 AND "600m"='5:54.45';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"stadium" text,
"record" text,
"box_scores" text,
"attendance" text
);
Question: Which of the opponents has bye as their box score?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "box_scores"='bye';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"stadium" text,
"record" text,
"box_scores" text,
"attendance" text
);
Question: How many people attended the game against the pittsburgh steelers?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "opponent"='pittsburgh steelers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"stadium" text,
"record" text,
"box_scores" text,
"attendance" text
);
Question: What was the result of the game on September 25 with a box score of box?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "box_scores"='box' AND "date"='september 25';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"stadium" text,
"record" text,
"box_scores" text,
"attendance" text
);
Question: What is the date of the game later than week 13 and 41,862 people attended?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "week">13 AND "attendance"='41,862';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_caps" (
"rank" real,
"player" text,
"nation" text,
"caps" real,
"goals" real,
"years" text
);
Question: What is the sum of caps for players with less than 9 goals ranked below 8?
<|assistant|>
SELECT SUM("caps") FROM "most_caps" WHERE "goals"<9 AND "rank">8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_judges" (
"state" text,
"born_died" text,
"active_service" text,
"chief_judge" text,
"senior_status" text,
"appointed_by" text,
"reason_for_termination" text
);
Question: What were the years of senior status for active service in 1972–1995?
<|assistant|>
SELECT "senior_status" FROM "former_judges" WHERE "active_service"='1972–1995';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_judges" (
"state" text,
"born_died" text,
"active_service" text,
"chief_judge" text,
"senior_status" text,
"appointed_by" text,
"reason_for_termination" text
);
Question: What were the birth and death years when active service was 1972–1995?
<|assistant|>
SELECT "born_died" FROM "former_judges" WHERE "active_service"='1972–1995';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_judges" (
"state" text,
"born_died" text,
"active_service" text,
"chief_judge" text,
"senior_status" text,
"appointed_by" text,
"reason_for_termination" text
);
Question: Which active services years ended in death and had senior status in 1972–2005?
<|assistant|>
SELECT "active_service" FROM "former_judges" WHERE "reason_for_termination"='death' AND "senior_status"='1972–2005';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"attendance" text
);
Question: Which date featured the Boston Patriots as the opponent?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "opponent"='boston patriots';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"attendance" text
);
Question: Who was the opponent during week 8?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week"=8;<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.