text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "kaikoura_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: Name the Years of schools with a Roll Larger than 23 and a Decile greater than 5. <|assistant|> SELECT "years" FROM "kaikoura_district" WHERE "roll">23 AND "decile">5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "kaikoura_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the total number of Rolls of State schools in Hapuku with a Decile greater than 4? <|assistant|> SELECT COUNT("roll") FROM "kaikoura_district" WHERE "authority"='state' AND "area"='hapuku' AND "decile">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate_composition_before_the_elections" ( "d_48" text, "d_47" text, "d_46" text, "d_45" text, "d_44" text, "d_43" text, "d_42" text, "d_41" text ); Question: What is the D45 associated with a D42 of r 22? <|assistant|> SELECT "d_45" FROM "senate_composition_before_the_elections" WHERE "d_42"='r 22';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate_composition_before_the_elections" ( "d_48" text, "d_47" text, "d_46" text, "d_45" text, "d_44" text, "d_43" text, "d_42" text, "d_41" text ); Question: What is the D43 associated with a D41 of r 21? <|assistant|> SELECT "d_43" FROM "senate_composition_before_the_elections" WHERE "d_41"='r 21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate_composition_before_the_elections" ( "d_48" text, "d_47" text, "d_46" text, "d_45" text, "d_44" text, "d_43" text, "d_42" text, "d_41" text ); Question: What is the D42 associated with a D47 of d 27? <|assistant|> SELECT "d_42" FROM "senate_composition_before_the_elections" WHERE "d_47"='d 27';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate_composition_before_the_elections" ( "d_48" text, "d_47" text, "d_46" text, "d_45" text, "d_44" text, "d_43" text, "d_42" text, "d_41" text ); Question: What is the D43 associated with a D41 of r 16? <|assistant|> SELECT "d_43" FROM "senate_composition_before_the_elections" WHERE "d_41"='r 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, "record" text ); Question: What is the record for the game when the loss was hargan (14–13)? <|assistant|> SELECT "record" FROM "game_log" WHERE "loss"='hargan (14–13)';<|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, "record" text ); Question: What is the record for the game with a score of 7–5? <|assistant|> SELECT "record" FROM "game_log" WHERE "score"='7–5';<|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, "record" text ); Question: What date was the game with loss of Aker (3–8)? <|assistant|> SELECT "date" FROM "game_log" WHERE "loss"='aker (3–8)';<|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, "record" text ); Question: What team was the opponent when the score was 7–1? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "score"='7–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, "record" text ); Question: What was the score when the opponent was the Orioles and the loss shows morehead (5–4)? <|assistant|> SELECT "score" FROM "game_log" WHERE "opponent"='orioles' AND "loss"='morehead (5–4)';<|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: Name the opponent with a record of 60-61 <|assistant|> SELECT "opponent" FROM "game_log" WHERE "record"='60-61';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_results_2007_fai_world_grand_prix" ( "rank" real, "name" text, "nationality" text, "score" text, "perfection" text ); Question: Who had a perfection percentage of 77.96%? <|assistant|> SELECT "name" FROM "final_results_2007_fai_world_grand_prix" WHERE "perfection"='77.96%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_results_2007_fai_world_grand_prix" ( "rank" real, "name" text, "nationality" text, "score" text, "perfection" text ); Question: What was the rank of Svetlana Fedorenko? <|assistant|> SELECT "rank" FROM "final_results_2007_fai_world_grand_prix" WHERE "name"='svetlana fedorenko';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_results_2007_fai_world_grand_prix" ( "rank" real, "name" text, "nationality" text, "score" text, "perfection" text ); Question: Who had a perfection percentage of 73.24%? <|assistant|> SELECT "name" FROM "final_results_2007_fai_world_grand_prix" WHERE "perfection"='73.24%';<|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, "record" text ); Question: What was the score of the game on June 1? <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='june 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "futures_and_challengers_singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: What was the score against andrei pavel? <|assistant|> SELECT "score" FROM "futures_and_challengers_singles_titles" WHERE "opponent"='andrei pavel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "futures_and_challengers_singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: When was the tournament of bologna? <|assistant|> SELECT "date" FROM "futures_and_challengers_singles_titles" WHERE "tournament"='bologna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "futures_and_challengers_singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: Who played on clay and had a score of 6–1, 7–6? <|assistant|> SELECT "opponent" FROM "futures_and_challengers_singles_titles" WHERE "surface"='clay' AND "score"='6–1, 7–6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "futures_and_challengers_singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: Who played on clay on 3 march 2012? <|assistant|> SELECT "opponent" FROM "futures_and_challengers_singles_titles" WHERE "surface"='clay' AND "date"='3 march 2012';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "futures_and_challengers_singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: What was the score against fabrice martin? <|assistant|> SELECT "score" FROM "futures_and_challengers_singles_titles" WHERE "opponent"='fabrice martin';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "futures_and_challengers_singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: What was the surface of the score of 7–5, 3–6, 7–6? <|assistant|> SELECT "surface" FROM "futures_and_challengers_singles_titles" WHERE "score"='7–5, 3–6, 7–6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "cardinal_electors" ( "elector" text, "order" text, "title" text, "elevated" text, "elevator" text ); Question: What's the Order with an Elector of Marino Bulcani? <|assistant|> SELECT "order" FROM "cardinal_electors" WHERE "elector"='marino bulcani';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "cardinal_electors" ( "elector" text, "order" text, "title" text, "elevated" text, "elevator" text ); Question: What's the Elevator that has Elevated: 1378, September 18, an Order of Cardinal-Priest, and an Elector of Poncello Orsini? <|assistant|> SELECT "elevator" FROM "cardinal_electors" WHERE "elevated"='1378, september 18' AND "order"='cardinal-priest' AND "elector"='poncello orsini';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "cardinal_electors" ( "elector" text, "order" text, "title" text, "elevated" text, "elevator" text ); Question: What is listed as the Elector with the Title of Deacon of S. Maria in Domnica? <|assistant|> SELECT "elector" FROM "cardinal_electors" WHERE "title"='deacon of s. maria in domnica';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "cardinal_electors" ( "elector" text, "order" text, "title" text, "elevated" text, "elevator" text ); Question: What's listed for the Elevated category that has an Order of Cardinal-Bishop? <|assistant|> SELECT "elevated" FROM "cardinal_electors" WHERE "order"='cardinal-bishop';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: The Milford School has what Division Record? <|assistant|> SELECT "division_record" FROM "2006_regular_season_football_standings" WHERE "school"='milford';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: What is the name of the School of the Sussex Tech's Team? <|assistant|> SELECT "team" FROM "2006_regular_season_football_standings" WHERE "school"='sussex tech';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_leaderboard" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money_us" real ); Question: What was Arnold Palmer's score in the tournamnet? <|assistant|> SELECT "score" FROM "final_leaderboard" WHERE "player"='arnold palmer';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "member" text, "party" text, "electorate" text, "state" text, "term_in_office" text ); Question: What the name of Peter White's party? <|assistant|> SELECT "party" FROM "see_also" WHERE "member"='peter white';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "member" text, "party" text, "electorate" text, "state" text, "term_in_office" text ); Question: What term did an Electorate of indi have in office? <|assistant|> SELECT "term_in_office" FROM "see_also" WHERE "electorate"='indi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "member" text, "party" text, "electorate" text, "state" text, "term_in_office" text ); Question: What term did hon ralph hunt serve in office? <|assistant|> SELECT "term_in_office" FROM "see_also" WHERE "member"='hon ralph hunt';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "member" text, "party" text, "electorate" text, "state" text, "term_in_office" text ); Question: What party is Peter Fisher from Vic serve in office? <|assistant|> SELECT "party" FROM "see_also" WHERE "state"='vic' AND "member"='peter fisher';<|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: How many laps were done in 2012? <|assistant|> SELECT SUM("laps") FROM "24_hours_of_le_mans_results" WHERE "year"=2012;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_6_6" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: On what day was the score of 1–6 6–1 3–6 achieved? <|assistant|> SELECT "date" FROM "singles_6_6" WHERE "score"='1–6 6–1 3–6';<|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: Name the average gold for czech republic and bronze less than 1 when total is less than 14 <|assistant|> SELECT AVG("gold") FROM "medal_table" WHERE "total"<14 AND "bronze"<1 AND "nation"='czech republic';<|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: Name the highest rank when silver is 4 and bronze is less than 3 <|assistant|> SELECT MAX("rank") FROM "medal_table" WHERE "silver"=4 AND "bronze"<3;<|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: Name the total number of total for bronze of 4 and silver more than 6 <|assistant|> SELECT COUNT("total") FROM "medal_table" WHERE "bronze"=4 AND "silver">6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_19_5_14" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: When the Surface was Carpet (i), what was the Outcome? <|assistant|> SELECT "outcome" FROM "doubles_19_5_14" WHERE "surface"='carpet (i)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurolaul_26_january_2002" ( "draw" real, "artist" text, "song" text, "votes" real, "place" real ); Question: What is the draw number of the song with a place lower than 6 and more than 38 votes? <|assistant|> SELECT SUM("draw") FROM "eurolaul_26_january_2002" WHERE "place">6 AND "votes">38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurolaul_26_january_2002" ( "draw" real, "artist" text, "song" text, "votes" real, "place" real ); Question: What is the total number of votes Sahlene with a place below 1 has? <|assistant|> SELECT COUNT("votes") FROM "eurolaul_26_january_2002" WHERE "artist"='sahlene' AND "place">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurolaul_26_january_2002" ( "draw" real, "artist" text, "song" text, "votes" real, "place" real ); Question: What is the highest place of the song with 38 votes and a draw great than 3? <|assistant|> SELECT MAX("place") FROM "eurolaul_26_january_2002" WHERE "votes"=38 AND "draw">3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurolaul_26_january_2002" ( "draw" real, "artist" text, "song" text, "votes" real, "place" real ); Question: How many votes did Yvetta Kadakas & Ivo Linna, who had less than 4 draws, have? <|assistant|> SELECT SUM("votes") FROM "eurolaul_26_january_2002" WHERE "draw"<4 AND "artist"='yvetta kadakas & ivo linna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); Question: What year was there a finish of 3? <|assistant|> SELECT "year" FROM "indianapolis_500" WHERE "finish"='3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); Question: What year was the start 33? <|assistant|> SELECT SUM("year") FROM "indianapolis_500" WHERE "start"='33';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); Question: When was there a team of Simon and the start was 3? <|assistant|> SELECT "year" FROM "indianapolis_500" WHERE "team"='simon' AND "start"='3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "completed" ( "rank" real, "city" text, "roof_m" real, "spire_m" text, "floors" real, "built" real ); Question: What's the name of the 1985 city with a Spire (m) of 105, and a Roof (m) smaller than 96? <|assistant|> SELECT "city" FROM "completed" WHERE "spire_m"='105' AND "roof_m"<96 AND "built"=1985;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "completed" ( "rank" real, "city" text, "roof_m" real, "spire_m" text, "floors" real, "built" real ); Question: What's the average number of floors that were built in 2004, and have a roof (m) of 106? <|assistant|> SELECT AVG("floors") FROM "completed" WHERE "built"=2004 AND "roof_m"=106;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "completed" ( "rank" real, "city" text, "roof_m" real, "spire_m" text, "floors" real, "built" real ); Question: What's the total number of floors built after 2006, and have a rank of 12? <|assistant|> SELECT SUM("floors") FROM "completed" WHERE "built">2006 AND "rank"=12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_cup" ( "date" text, "round" text, "opponents" text, "h_a" text, "result_f_a" text, "attendance" real ); Question: What is the sum of attendance for H/A values of "n"? <|assistant|> SELECT SUM("attendance") FROM "league_cup" WHERE "h_a"='n';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles" ( "outcome" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: Name the score which has opponent of stefano galvani <|assistant|> SELECT "score" FROM "singles" WHERE "opponent"='stefano galvani';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles" ( "outcome" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: Name the score with opponent of javier genaro-martinez <|assistant|> SELECT "score" FROM "singles" WHERE "opponent"='javier genaro-martinez';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles" ( "outcome" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: Name the outcome for dunlop world challenge <|assistant|> SELECT "outcome" FROM "singles" WHERE "tournament"='dunlop world challenge';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1998" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: Who was the visiting team on December 6? <|assistant|> SELECT "visiting_team" FROM "1998" WHERE "date"='december 6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1998" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: Who was the host team on October 4? <|assistant|> SELECT "host_team" FROM "1998" WHERE "date"='october 4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_subsidiaries" ( "date" text, "company" text, "business" text, "country" text, "value_usd" text ); Question: In New Zealand, what's the value that has an unknown date and is an energy business? <|assistant|> SELECT "value_usd" FROM "list_of_subsidiaries" WHERE "date"='unknown' AND "business"='energy' AND "country"='new zealand';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_subsidiaries" ( "date" text, "company" text, "business" text, "country" text, "value_usd" text ); Question: What company has an unknown date and is an energy business? <|assistant|> SELECT "company" FROM "list_of_subsidiaries" WHERE "business"='energy' AND "date"='unknown';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_subsidiaries" ( "date" text, "company" text, "business" text, "country" text, "value_usd" text ); Question: In the United Kingdom, what company has an unknown date and is an energy business? <|assistant|> SELECT "company" FROM "list_of_subsidiaries" WHERE "business"='energy' AND "date"='unknown' AND "country"='united kingdom';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_subsidiaries" ( "date" text, "company" text, "business" text, "country" text, "value_usd" text ); Question: For the United Kingdom, what's the date? <|assistant|> SELECT "date" FROM "list_of_subsidiaries" WHERE "country"='united kingdom';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_subsidiaries" ( "date" text, "company" text, "business" text, "country" text, "value_usd" text ); Question: For the Enernoc Australia Pty Ltd, what's the country with an unknown date? <|assistant|> SELECT "country" FROM "list_of_subsidiaries" WHERE "date"='unknown' AND "company"='enernoc australia pty ltd';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "goal" real, "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: Which date is associated with a venue of Luxembourg? <|assistant|> SELECT "date" FROM "international_goals" WHERE "venue"='luxembourg';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the year with a Kurtis Kraft 500a chassis, and less than 1.5 points? <|assistant|> SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 500a' AND "points"<1.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the year with a kurtis kraft 500a chassis? <|assistant|> SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 500a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_colts_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the lowest Pick # of Saint Vincent College? <|assistant|> SELECT MIN("pick_num") FROM "indianapolis_colts_draft_history" WHERE "college"='saint vincent college';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_colts_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the Overall for Pick # less than 5 Jack Harmon? <|assistant|> SELECT MIN("overall") FROM "indianapolis_colts_draft_history" WHERE "name"='jack harmon' AND "pick_num"<5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurostat_data_for_2009" ( "rank" text, "region" text, "total_gdp_bn" text, "pct_growth" text, "per_capita" text ); Question: Which rank has a Total GDP (€ bn) of €11.243?? <|assistant|> SELECT "rank" FROM "eurostat_data_for_2009" WHERE "total_gdp_bn"='€11.243';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurostat_data_for_2009" ( "rank" text, "region" text, "total_gdp_bn" text, "pct_growth" text, "per_capita" text ); Question: What is the Region that has a Total GDP (€ bn ) of €11,745.353? <|assistant|> SELECT "region" FROM "eurostat_data_for_2009" WHERE "total_gdp_bn"='€11,745.353';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurostat_data_for_2009" ( "rank" text, "region" text, "total_gdp_bn" text, "pct_growth" text, "per_capita" text ); Question: Which Region that has a growth of βˆ’3.6%? <|assistant|> SELECT "region" FROM "eurostat_data_for_2009" WHERE "pct_growth"='βˆ’3.6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "eurostat_data_for_2009" ( "rank" text, "region" text, "total_gdp_bn" text, "pct_growth" text, "per_capita" text ); Question: What is the per capita of Greece? <|assistant|> SELECT "per_capita" FROM "eurostat_data_for_2009" WHERE "region"='greece';<|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 fewest number of silver medals received by a nation who received 40 bronze medals and more than 42 gold medals? <|assistant|> SELECT MIN("silver") FROM "medal_table" WHERE "bronze"=40 AND "gold">42;<|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 number of silver medals received by Austria when they receive more than 3 total medals, more than 22 bronze medals, and fewer than 395 gold medals? <|assistant|> SELECT MIN("silver") FROM "medal_table" WHERE "total">3 AND "bronze">22 AND "gold"<395 AND "nation"='austria';<|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 is the average number of silver medals with more than 6 gold meals and less than 5 bronze medals? <|assistant|> SELECT AVG("silver") FROM "medal_table" WHERE "gold">6 AND "bronze"<5;<|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 ranks are for Switzerland with more than 2 total medals? <|assistant|> SELECT COUNT("rank") FROM "medal_table" WHERE "nation"='switzerland' AND "total">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: What is the event of the match with a round larger than 2 and ended with a method of ko (kick)? <|assistant|> SELECT "event" FROM "mixed_martial_arts_record" WHERE "round">2 AND "method"='ko (kick)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: What is the method of the match after round 1 in the k-1 andy memorial 2001 japan gp final? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "round">1 AND "event"='k-1 andy memorial 2001 japan gp final';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: What is the highest round of the match with Rene Rooze as the opponent in Saitama, Japan? <|assistant|> SELECT MAX("round") FROM "mixed_martial_arts_record" WHERE "opponent"='rene rooze' AND "location"='saitama, japan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: What is the highest round of the match with a time of 0:57? <|assistant|> SELECT MAX("round") FROM "mixed_martial_arts_record" WHERE "time"='0:57';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_2012_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: How many points did the Club score that has a try bonus of 7 and 52 tries for ? <|assistant|> SELECT "points_for" FROM "2011_2012_table" WHERE "tries_for"='52' AND "try_bonus"='7';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_2012_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: What is the Losing bonus of the club that has 80 tries against ? <|assistant|> SELECT "losing_bonus" FROM "2011_2012_table" WHERE "tries_against"='80';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_2012_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: How many tries for does waunarlwydd rfc have ? <|assistant|> SELECT "tries_for" FROM "2011_2012_table" WHERE "club"='waunarlwydd rfc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_2012_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: How many losses did the club with 47 points have ? <|assistant|> SELECT "lost" FROM "2011_2012_table" WHERE "points"='47';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_2012_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: How many points against does the club that has a try bonus of 6 and tries against of 54 have ? <|assistant|> SELECT "points_against" FROM "2011_2012_table" WHERE "try_bonus"='6' AND "tries_against"='54';<|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: Who were the co-drivers in 2008? <|assistant|> SELECT "co_drivers" FROM "24_hours_of_le_mans_results" WHERE "year"=2008;<|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 was the position in 2006? <|assistant|> SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "year"=2006;<|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 was the class when there were 325 laps? <|assistant|> SELECT "class" FROM "24_hours_of_le_mans_results" WHERE "laps"=325;<|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 was the position in a year after 2005 with a class position of 5th? <|assistant|> SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "year">2005 AND "class_pos"='5th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director_s" text ); Question: What is the English title of the film from 2001? <|assistant|> SELECT "english_title" FROM "2000s" WHERE "year"=2001;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director_s" text ); Question: What is the original title of the film from Japan/Taiwan before 2003? <|assistant|> SELECT "original_title" FROM "2000s" WHERE "year"<2003 AND "country"='japan/taiwan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director_s" text ); Question: What is the English title of the film directed by Fernando Meirelles? <|assistant|> SELECT "english_title" FROM "2000s" WHERE "director_s"='fernando meirelles';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director_s" text ); Question: What is the country of the original title Cidade de deus? <|assistant|> SELECT "country" FROM "2000s" WHERE "original_title"='cidade de deus';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director_s" text ); Question: What is the earliest year of a film from Mexico? <|assistant|> SELECT MIN("year") FROM "2000s" WHERE "country"='mexico';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director_s" text ); Question: What is the average year of the film from France/Hong Kong? <|assistant|> SELECT AVG("year") FROM "2000s" WHERE "country"='france/hong kong';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Name the country for t3 place <|assistant|> SELECT "country" FROM "second_round" WHERE "place"='t3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Name the country with +2 to par <|assistant|> SELECT "country" FROM "second_round" WHERE "to_par"='+2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Name the to par for colin montgomerie <|assistant|> SELECT "to_par" FROM "second_round" WHERE "player"='colin montgomerie';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Name the score for scotland <|assistant|> SELECT "score" FROM "second_round" WHERE "country"='scotland';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "location" text, "area_ha" real, "population" real, "height_m" real ); Question: What island has a population over 76, a height over 210, and an area larger than 12068? <|assistant|> SELECT "island" FROM "main_list" WHERE "population">76 AND "height_m">210 AND "area_ha">12068;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "main_list" ( "island" text, "location" text, "area_ha" real, "population" real, "height_m" real ); Question: What is the highest population of Trondra Island in the Scalloway Islands? <|assistant|> SELECT MAX("population") FROM "main_list" WHERE "location"='scalloway islands' AND "island"='trondra';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rugby_spain_internationals_1989" ( "first_game" real, "played" real, "drawn" real, "lost" real, "percentage" text ); Question: How many matches were drawn associated with a percentage of 7.14% and more than 12 losses? <|assistant|> SELECT COUNT("drawn") FROM "rugby_spain_internationals_1989" WHERE "percentage"='7.14%' AND "lost">12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rugby_spain_internationals_1989" ( "first_game" real, "played" real, "drawn" real, "lost" real, "percentage" text ); Question: Which percentage has a first game before 1997, fewer than 2 losses, and fewer than 5 matches played? <|assistant|> SELECT "percentage" FROM "rugby_spain_internationals_1989" WHERE "first_game"<1997 AND "lost"<2 AND "played"<5;<|endoftext|>