text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: Name the score for 10 april 2007 and opponent of selima sfar <|assistant|> SELECT "score" FROM "singles_titles" WHERE "date"='10 april 2007' AND "opponent"='selima sfar';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "prize_k" real, "runners" real, "placing" real, "margin" text, "jockey" text, "trainer" text ); Question: How many runners had placings over 8? <|assistant|> SELECT COUNT("runners") FROM "race_record" WHERE "placing">8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "prize_k" real, "runners" real, "placing" real, "margin" text, "jockey" text, "trainer" text ); Question: Which course had a jockey of Royston FFrench? <|assistant|> SELECT "course" FROM "race_record" WHERE "jockey"='royston ffrench';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "prize_k" real, "runners" real, "placing" real, "margin" text, "jockey" text, "trainer" text ); Question: What is the average prize for the Buttercross Limited Stakes? <|assistant|> SELECT AVG("prize_k") FROM "race_record" WHERE "race"='buttercross limited stakes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "prize_k" real, "runners" real, "placing" real, "margin" text, "jockey" text, "trainer" text ); Question: How many total runners had jockeys of Olivier Peslier with placings under 2? <|assistant|> SELECT SUM("runners") FROM "race_record" WHERE "jockey"='olivier peslier' AND "placing"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rookie_list" ( "player" text, "afl_debut" text, "games" text, "goals" text, "kicks" text, "handballs" text, "disposals" text, "marks" text, "tackles" text ); Question: Name the games with marks of 21 <|assistant|> SELECT "games" FROM "rookie_list" WHERE "marks"='21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rookie_list" ( "player" text, "afl_debut" text, "games" text, "goals" text, "kicks" text, "handballs" text, "disposals" text, "marks" text, "tackles" text ); Question: Name the kicks with goals of 1 <|assistant|> SELECT "kicks" FROM "rookie_list" WHERE "goals"='1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rookie_list" ( "player" text, "afl_debut" text, "games" text, "goals" text, "kicks" text, "handballs" text, "disposals" text, "marks" text, "tackles" text ); Question: Name the goals with games of 6 <|assistant|> SELECT "goals" FROM "rookie_list" WHERE "games"='6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1990" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What game had the date was it with the final score of 7-23 <|assistant|> SELECT "date" FROM "1990" WHERE "final_score"='7-23';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1990" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What was the final score of the game at the astrodome? <|assistant|> SELECT "final_score" FROM "1990" WHERE "stadium"='astrodome';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1990" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What was the final score for the date of December 30? <|assistant|> SELECT "final_score" FROM "1990" WHERE "date"='december 30';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1990" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What was the name of the Visiting team at Jack Murphy Stadium? <|assistant|> SELECT "visiting_team" FROM "1990" WHERE "stadium"='jack murphy stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1990" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What was the name of the host team at Texas stadium? <|assistant|> SELECT "host_team" FROM "1990" WHERE "stadium"='texas stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1990" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What was the name of the host team dated December 16? <|assistant|> SELECT "host_team" FROM "1990" WHERE "date"='december 16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_24_hours_of_le_mans_results" ( "year" real, "class" text, "tyres" text, "team" text, "co_drivers" text, "laps" real, "pos" text ); Question: Are there any Teams after 1997? <|assistant|> SELECT "team" FROM "complete_24_hours_of_le_mans_results" WHERE "year">1997;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_24_hours_of_le_mans_results" ( "year" real, "class" text, "tyres" text, "team" text, "co_drivers" text, "laps" real, "pos" text ); Question: Which class has laps under 77? <|assistant|> SELECT "class" FROM "complete_24_hours_of_le_mans_results" WHERE "laps"<77;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "guarantee_group" ( "name" text, "class" text, "hometown" text, "boarded" text, "position" text ); Question: Who boarded first class? <|assistant|> SELECT "boarded" FROM "guarantee_group" WHERE "class"='first';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2007_08_lincoln_city_f_c_season" ( "date" text, "opponent" text, "venue" text, "result" text, "attendance" real, "away_fans" real ); Question: What was the lowest attendance at a game when there were fewer than 151 away fans and an opponent of Bury? <|assistant|> SELECT MIN("attendance") FROM "2007_08_lincoln_city_f_c_season" WHERE "away_fans"<151 AND "opponent"='bury';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What are the lowest number of points with a Year of 1978, and a Chassis of ensign n177? <|assistant|> SELECT MIN("points") FROM "complete_world_championship_formula_one_" WHERE "year"=1978 AND "chassis"='ensign n177';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What are the highest number of points with an Entrant of warsteiner brewery? <|assistant|> SELECT MAX("points") FROM "complete_world_championship_formula_one_" WHERE "entrant"='warsteiner brewery';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "before_the_elections" ( "d_41" text, "d_42" text, "d_43" text, "d_44" text, "d_45" text, "d_46" text, "d_47" text, "d_48" text ); Question: What is the D 43 when D 46 is R 6? <|assistant|> SELECT "d_43" FROM "before_the_elections" WHERE "d_46"='r 6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "before_the_elections" ( "d_41" text, "d_42" text, "d_43" text, "d_44" text, "d_45" text, "d_46" text, "d_47" text, "d_48" text ); Question: What is the D44 when D43 is R 14? <|assistant|> SELECT "d_44" FROM "before_the_elections" WHERE "d_43"='r 14';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "before_the_elections" ( "d_41" text, "d_42" text, "d_43" text, "d_44" text, "d_45" text, "d_46" text, "d_47" text, "d_48" text ); Question: What is the D48 when D 43 is plurality ↑?? <|assistant|> SELECT "d_48" FROM "before_the_elections" WHERE "d_43"='plurality ↑';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "before_the_elections" ( "d_41" text, "d_42" text, "d_43" text, "d_44" text, "d_45" text, "d_46" text, "d_47" text, "d_48" text ); Question: What is the D44 when D41 is D 16? <|assistant|> SELECT "d_44" FROM "before_the_elections" WHERE "d_41"='d 16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "carterton_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What gender is the team that has a decile of 5 and in the Dalefield area? <|assistant|> SELECT "gender" FROM "carterton_district" WHERE "decile"=5 AND "area"='dalefield';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "carterton_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What school in Dalefield has a roll less than 81? <|assistant|> SELECT "name" FROM "carterton_district" WHERE "roll"<81 AND "area"='dalefield';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "group" text, "area_ha" text, "population" text, "height_m" real ); Question: What is the lowest Height (m) on the island of Burray? <|assistant|> SELECT MIN("height_m") FROM "main_list" WHERE "island"='burray';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "group" text, "area_ha" text, "population" text, "height_m" real ); Question: What group on the island of Faray has a Height (m) of 32 and a Population of 0? <|assistant|> SELECT "group" FROM "main_list" WHERE "height_m"=32 AND "population"='0' AND "island"='faray';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "group" text, "area_ha" text, "population" text, "height_m" real ); Question: What group has a Population of see hoy? <|assistant|> SELECT "group" FROM "main_list" WHERE "population"='see hoy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "group" text, "area_ha" text, "population" text, "height_m" real ); Question: What group on the island of Muckle Green Holm has a population of 0? <|assistant|> SELECT "group" FROM "main_list" WHERE "population"='0' AND "island"='muckle green holm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "group" text, "area_ha" text, "population" text, "height_m" real ); Question: What is the area (ha) of the group on the island of Linga Holm that has a Height (m) larger than 7? <|assistant|> SELECT "area_ha" FROM "main_list" WHERE "height_m">7 AND "island"='linga holm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "group" text, "area_ha" text, "population" text, "height_m" real ); Question: What is the Population of the group that has a Height (m) of 15 and an Area (ha) of 00017 17? <|assistant|> SELECT "population" FROM "main_list" WHERE "height_m"=15 AND "area_ha"='00017 17';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wanganui_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the roll number of the school in Aramoho with a decile of 1? <|assistant|> SELECT "roll" FROM "wanganui_district" WHERE "area"='aramoho' AND "decile"=1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wanganui_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the area of Mangamahu primary school? <|assistant|> SELECT "area" FROM "wanganui_district" WHERE "name"='mangamahu primary school';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wanganui_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the area of the coed school with a state authority and a roll number of 122? <|assistant|> SELECT "area" FROM "wanganui_district" WHERE "authority"='state' AND "gender"='coed' AND "roll"=122;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominations_awards" ( "year" real, "artist" text, "album_song" text, "award" text, "result_category" text ); Question: Which result is older than 2007? <|assistant|> SELECT "result_category" FROM "nominations_awards" WHERE "year"<2007;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominations_awards" ( "year" real, "artist" text, "album_song" text, "award" text, "result_category" text ); Question: What year was the Album/Song Speaking louder than before? <|assistant|> SELECT SUM("year") FROM "nominations_awards" WHERE "album_song"='speaking louder than before';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominations_awards" ( "year" real, "artist" text, "album_song" text, "award" text, "result_category" text ); Question: What is the most recent year with the Album/Song "the best worst-case scenario"? <|assistant|> SELECT MAX("year") FROM "nominations_awards" WHERE "album_song"='the best worst-case scenario';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_24_21" ( "outcome" text, "tournament" text, "surface" text, "partner" text, "opponent_in_the_final" text, "score" text ); Question: What was the score of the final in which Melanie South played with partner Remi Tezuka on a clay surface? <|assistant|> SELECT "score" FROM "doubles_24_21" WHERE "surface"='clay' AND "partner"='remi tezuka';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_24_21" ( "outcome" text, "tournament" text, "surface" text, "partner" text, "opponent_in_the_final" text, "score" text ); Question: What was the score of the final in which Melanie South played with partner Ksenia Lykina during the Kurume Cup tournament? <|assistant|> SELECT "score" FROM "doubles_24_21" WHERE "partner"='ksenia lykina' AND "tournament"='kurume';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_24_21" ( "outcome" text, "tournament" text, "surface" text, "partner" text, "opponent_in_the_final" text, "score" text ); Question: What was the score of the final in which Melanie South played with partner Katie O'Brien? <|assistant|> SELECT "score" FROM "doubles_24_21" WHERE "partner"='katie o''brien';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_24_21" ( "outcome" text, "tournament" text, "surface" text, "partner" text, "opponent_in_the_final" text, "score" text ); Question: What was the outcome of the tournament in Edinburgh? <|assistant|> SELECT "outcome" FROM "doubles_24_21" WHERE "tournament"='edinburgh';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "invercargill_city" ( "name" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the total decile with an Authority of state, and a Name of newfield park school? <|assistant|> SELECT SUM("decile") FROM "invercargill_city" WHERE "authority"='state' AND "name"='newfield park school';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "invercargill_city" ( "name" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the largest decile with a Roll larger than 34, a Gender of coed, and an Authority of state integrated, and an Area of georgetown? <|assistant|> SELECT MAX("decile") FROM "invercargill_city" WHERE "roll">34 AND "gender"='coed' AND "authority"='state integrated' AND "area"='georgetown';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "invercargill_city" ( "name" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the smallest roll with an Authority of state, a Name of newfield park school, and a Decile smaller than 2? <|assistant|> SELECT MIN("roll") FROM "invercargill_city" WHERE "authority"='state' AND "name"='newfield park school' AND "decile"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "invercargill_city" ( "name" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: Which name has an Area of makarewa? <|assistant|> SELECT "name" FROM "invercargill_city" WHERE "area"='makarewa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "invercargill_city" ( "name" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: Which name has a Gender of coed, and a Decile larger than 5, and a Roll of 131? <|assistant|> SELECT "name" FROM "invercargill_city" WHERE "gender"='coed' AND "decile">5 AND "roll"=131;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "squad_information" ( "nat" text, "name" text, "since" text, "goals" real, "ends" real, "transfer_fee" text ); Question: Add up all the Ends columns that have goals smaller than 0. <|assistant|> SELECT SUM("ends") FROM "squad_information" WHERE "goals"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "notes" text ); Question: What was the competition in 2003? <|assistant|> SELECT "competition" FROM "achievements" WHERE "year"=2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "notes" text ); Question: What was the competition in 2003? <|assistant|> SELECT "competition" FROM "achievements" WHERE "year"=2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: Which position has 50+12 points and fewer than 10 draws? <|assistant|> SELECT MAX("position") FROM "final_table" WHERE "points"='50+12' AND "draws"<10;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many positions have goals of fewer than 40 and more than 38 played? <|assistant|> SELECT COUNT("position") FROM "final_table" WHERE "goals_for"<40 AND "played">38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many losses are there in the CD Sabadell club with a goal difference less than -2, and more than 38 played? <|assistant|> SELECT SUM("losses") FROM "final_table" WHERE "goal_difference"<-2 AND "club"='cd sabadell' AND "played">38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: What are the average number of played with goals of less than 43, more than 9 draws, a higher position than 17 and 30-8 points? <|assistant|> SELECT AVG("played") FROM "final_table" WHERE "goals_for"<43 AND "draws">9 AND "position">17 AND "points"='30-8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: What is the total number of losses of the player with an avg/g smaller than -3.3 and a gain larger than 126? <|assistant|> SELECT COUNT("loss") FROM "rushing" WHERE "avg_g"<-3.3 AND "gain">126;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: What is the total number of losses Jackson, T., who had more than 27 gain, an avg/g smaller than 55.9, and a long less than 34, had? <|assistant|> SELECT COUNT("loss") FROM "rushing" WHERE "gain">27 AND "avg_g"<55.9 AND "name"='jackson, t.' AND "long"<34;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rushing" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" real ); Question: What is the total number of long Dubose, E., who had 0 losses, a gain less than 17, and an avg/g bigger than 0, had? <|assistant|> SELECT COUNT("long") FROM "rushing" WHERE "loss"=0 AND "gain"<17 AND "avg_g">0 AND "name"='dubose, e.';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: What date was the record 20–16? <|assistant|> SELECT "date" FROM "game_log" WHERE "record"='20–16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: What was the attendance in the gave versus the Brewers with a score of 9–6? <|assistant|> SELECT "attendance" FROM "game_log" WHERE "opponent"='brewers' AND "score"='9–6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: What was the attendance on May 26? <|assistant|> SELECT "attendance" FROM "game_log" WHERE "date"='may 26';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_class_records" ( "name" text, "seasons" text, "matches" real, "inns" real, "runs" real ); Question: Matches of 127 has how many total number of inns? <|assistant|> SELECT COUNT("inns") FROM "first_class_records" WHERE "matches"=127;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_class_records" ( "name" text, "seasons" text, "matches" real, "inns" real, "runs" real ); Question: Name of clem hill, and Inns larger than 126 has the lowest runs? <|assistant|> SELECT MIN("runs") FROM "first_class_records" WHERE "name"='clem hill' AND "inns">126;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_class_records" ( "name" text, "seasons" text, "matches" real, "inns" real, "runs" real ); Question: Runs smaller than 6106, and Inns smaller than 146 has what total number of matches? <|assistant|> SELECT COUNT("matches") FROM "first_class_records" WHERE "runs"<6106 AND "inns"<146;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_class_records" ( "name" text, "seasons" text, "matches" real, "inns" real, "runs" real ); Question: Seasons of 1987–2007, and a Runs larger than 11622 is the highest inns? <|assistant|> SELECT MAX("inns") FROM "first_class_records" WHERE "seasons"='1987–2007' AND "runs">11622;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_29_16_titles_13_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: Name the partner for opponents of františek čermák michal mertiňák <|assistant|> SELECT "partner" FROM "doubles_29_16_titles_13_runners_up" WHERE "opponents_in_the_final"='františek čermák michal mertiňák';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_29_16_titles_13_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: Name the score in the final for january 12, 2013 <|assistant|> SELECT "score_in_the_final" FROM "doubles_29_16_titles_13_runners_up" WHERE "date"='january 12, 2013';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_29_16_titles_13_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: Name the opponents for outcome of runner-up and date of august 7, 2011 <|assistant|> SELECT "opponents_in_the_final" FROM "doubles_29_16_titles_13_runners_up" WHERE "outcome"='runner-up' AND "date"='august 7, 2011';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_29_16_titles_13_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: Name the partner for surface of grass and opponents of jürgen melzer philipp petzschner <|assistant|> SELECT "partner" FROM "doubles_29_16_titles_13_runners_up" WHERE "surface"='grass' AND "opponents_in_the_final"='jürgen melzer philipp petzschner';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_29_16_titles_13_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: Name the score in the final for runner-up and hard surface with opponents being michaël llodra nenad zimonjić <|assistant|> SELECT "score_in_the_final" FROM "doubles_29_16_titles_13_runners_up" WHERE "outcome"='runner-up' AND "surface"='hard' AND "opponents_in_the_final"='michaël llodra nenad zimonjić';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ships" ( "ship" text, "builder" text, "namesake" text, "renamed" text, "laid_down" text, "launched" text, "commissioned_or_completed" text ); Question: What date was the ship 'Wyandotte' launched? <|assistant|> SELECT "launched" FROM "ships" WHERE "ship"='wyandotte';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ships" ( "ship" text, "builder" text, "namesake" text, "renamed" text, "laid_down" text, "launched" text, "commissioned_or_completed" text ); Question: What was the original name of the ship 'Ajax'? <|assistant|> SELECT "renamed" FROM "ships" WHERE "ship"='ajax';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ships" ( "ship" text, "builder" text, "namesake" text, "renamed" text, "laid_down" text, "launched" text, "commissioned_or_completed" text ); Question: What date was the ship named Manhattan completed? <|assistant|> SELECT "commissioned_or_completed" FROM "ships" WHERE "ship"='manhattan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "24_hours_of_le_mans_results" ( "year" real, "team" text, "co_drivers" text, "class" text, "laps" real, "pos" text, "class_pos" text ); Question: What position had fewer than 373 laps and a class position of 1st? <|assistant|> SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "laps"<373 AND "class_pos"='1st';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "24_hours_of_le_mans_results" ( "year" real, "team" text, "co_drivers" text, "class" text, "laps" real, "pos" text, "class_pos" text ); Question: What class had fewer than 336 laps in 2004? <|assistant|> SELECT "class" FROM "24_hours_of_le_mans_results" WHERE "laps"<336 AND "year"=2004;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "game" real, "date" text, "location" text, "time" text, "attendance" real ); Question: What is the average attendance of game 1? <|assistant|> SELECT AVG("attendance") FROM "summary" WHERE "game"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "game" real, "date" text, "location" text, "time" text, "attendance" real ); Question: What is the attendance amount of the race with a time of 2:07? <|assistant|> SELECT MAX("attendance") FROM "summary" WHERE "time"='2:07';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: What club has less than 61 goals for and 55 goals against? <|assistant|> SELECT "club" FROM "final_table" WHERE "goals_for"<61 AND "goals_against"=55;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: What is the amount of Draws for the game that had a score of 45+7 and a position below 3? <|assistant|> SELECT COUNT("draws") FROM "final_table" WHERE "points"='45+7' AND "position"<3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: What was the number of draws when the Elche CF club played 38 and had a goal difference of -16? <|assistant|> SELECT MIN("draws") FROM "final_table" WHERE "goal_difference">-16 AND "club"='elche cf' AND "played">38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "alma_awards" ( "year" real, "recipient" text, "role" text, "category" text, "result" text ); Question: Who was the recipient for Outstanding actress television series prior to 2008? <|assistant|> SELECT "recipient" FROM "alma_awards" WHERE "year"<2008;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: Who was the opponent at the game when the record was 71-78? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "record"='71-78';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: What was the date of the game that had a loss of Risley (0-1)? <|assistant|> SELECT "date" FROM "game_log" WHERE "loss"='risley (0-1)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: What was the date of the game when the record was 70-74? <|assistant|> SELECT "date" FROM "game_log" WHERE "record"='70-74';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "name" text, "country" text, "type" text, "moving_from" text, "transfer_window" text, "ends" real, "transfer_fee" text ); Question: What player was moving from manchester united? <|assistant|> SELECT "name" FROM "in" WHERE "moving_from"='manchester united';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "name" text, "country" text, "type" text, "moving_from" text, "transfer_window" text, "ends" real, "transfer_fee" text ); Question: What player costs £210k to transfer? <|assistant|> SELECT "name" FROM "in" WHERE "transfer_fee"='£210k';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "in" ( "name" text, "country" text, "type" text, "moving_from" text, "transfer_window" text, "ends" real, "transfer_fee" text ); Question: Who is moving during winter from wal? <|assistant|> SELECT "moving_from" FROM "in" WHERE "transfer_window"='winter' AND "country"='wal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_results" ( "episode" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: Which original artist has a Episode of workshop #1? <|assistant|> SELECT "original_artist" FROM "performances_results" WHERE "episode"='workshop #1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_results" ( "episode" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: Which theme has a Episode of top 6? <|assistant|> SELECT "theme" FROM "performances_results" WHERE "episode"='top 6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_results" ( "episode" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); Question: Which Theme has a Order # of 9? <|assistant|> SELECT "theme" FROM "performances_results" WHERE "order_num"='9';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "time" text, "record" text ); Question: What was the score on August 19? <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='august 19';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "time" text, "record" text ); Question: Where the time is 2:46, what is the record? <|assistant|> SELECT "record" FROM "game_log" WHERE "time"='2:46';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "october" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); Question: What is the Date, when the home team is the NY Rangers? <|assistant|> SELECT "date" FROM "october" WHERE "home"='ny rangers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "variants" ( "engine" text, "displacement" text, "power" text, "torque" text, "redline" real, "year" real ); Question: Power of 220kw (299hp) @ 4000 has what torque? <|assistant|> SELECT "torque" FROM "variants" WHERE "power"='220kw (299hp) @ 4000';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "variants" ( "engine" text, "displacement" text, "power" text, "torque" text, "redline" real, "year" real ); Question: What is the Displacement that has Power of 220kw (299hp) @ 4000, and a year larger than 2002? <|assistant|> SELECT "displacement" FROM "variants" WHERE "year">2002 AND "power"='220kw (299hp) @ 4000';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "variants" ( "engine" text, "displacement" text, "power" text, "torque" text, "redline" real, "year" real ); Question: Displacement of 4.4l (4423cc/269in³) and a Power of 220kw (299hp) @ 4000 belongs to what engine? <|assistant|> SELECT "engine" FROM "variants" WHERE "displacement"='4.4l (4423cc/269in³)' AND "power"='220kw (299hp) @ 4000';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_results" ( "week" text, "theme" text, "song_choice" text, "original_artist" text, "result" text ); Question: What week was the Original artist, the police ? <|assistant|> SELECT "week" FROM "performances_results" WHERE "original_artist"='the police';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "performances_results" ( "week" text, "theme" text, "song_choice" text, "original_artist" text, "result" text ); Question: Which song garnered an advanced result during top 20 week ? <|assistant|> SELECT "song_choice" FROM "performances_results" WHERE "result"='advanced' AND "week"='top 20';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "finals_14_9_titles_5_runners_up" ( "outcome" text, "year" real, "tournament" text, "opponent" text, "score" text ); Question: Which Malaysia Satellite tournaments were played after 1998? <|assistant|> SELECT "outcome" FROM "finals_14_9_titles_5_runners_up" WHERE "year">1998 AND "tournament"='malaysia satellite';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "finals_14_9_titles_5_runners_up" ( "outcome" text, "year" real, "tournament" text, "opponent" text, "score" text ); Question: Who was the runner-up for the Bulgaria Open, before 2007? <|assistant|> SELECT "score" FROM "finals_14_9_titles_5_runners_up" WHERE "year"<2007 AND "outcome"='runner-up' AND "tournament"='bulgaria open';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "finals_14_9_titles_5_runners_up" ( "outcome" text, "year" real, "tournament" text, "opponent" text, "score" text ); Question: What was the score of the player who played against Wong Choong Hann in the Dutch Open? <|assistant|> SELECT "score" FROM "finals_14_9_titles_5_runners_up" WHERE "tournament"='dutch open' AND "opponent"='wong choong hann';<|endoftext|>