text
stringlengths
411
1.74k
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "great_northern_section" ( "number" text, "previous_number_s" real, "previous_class" text, "converted" real, "withdrawn" real, "disposal" text );. Question: "With a number of 30, what would be listed for previous number(s)?". [/INST] SELECT "previous_number_s" FROM "great_northern_section" WHERE "number"='30';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "great_northern_section" ( "number" text, "previous_number_s" real, "previous_class" text, "converted" real, "withdrawn" real, "disposal" text );. Question: "With a previous number of 68165, what is the oldest converted date?". [/INST] SELECT MAX("converted") FROM "great_northern_section" WHERE "previous_number_s"=68165;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "great_northern_section" ( "number" text, "previous_number_s" real, "previous_class" text, "converted" real, "withdrawn" real, "disposal" text );. Question: "With a converted less than 1966 and a number of 32 (2nd), what is the largest number listed for withdrawn?". [/INST] SELECT MAX("withdrawn") FROM "great_northern_section" WHERE "number"='32 (2nd)' AND "converted"<1966;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "most_wickets" ( "player" text, "matches" text, "overs" text, "wickets" text, "economy_rate" text, "average" text, "strike_rate" text );. Question: "What is the average when the matches are 11?". [/INST] SELECT "average" FROM "most_wickets" WHERE "matches"='11';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "most_wickets" ( "player" text, "matches" text, "overs" text, "wickets" text, "economy_rate" text, "average" text, "strike_rate" text );. Question: "What is the overs when the matches are 10?". [/INST] SELECT "overs" FROM "most_wickets" WHERE "matches"='10';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "chevy_rock_roll_400" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text );. Question: "Which Car # has a Driver of ryan newman, and a Position larger than 10?". [/INST] SELECT MIN("car_num") FROM "chevy_rock_roll_400" WHERE "driver"='ryan newman' AND "pos">10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "chevy_rock_roll_400" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text );. Question: "Which Car # has a Team of hendrick motorsports, and a Driver of mark martin, and a Position larger than 4?". [/INST] SELECT AVG("car_num") FROM "chevy_rock_roll_400" WHERE "team"='hendrick motorsports' AND "driver"='mark martin' AND "pos">4;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "saturday_and_sundays_programming_as_of_s" ( "time" text, "show_name" text, "local_networked" text, "ad_freq" text, "news_freq" text );. Question: "Which time has a local/networked value of Local, ad frequency of every 20 minutes, and news frequency of n/a after 7PM news?". [/INST] SELECT "time" FROM "saturday_and_sundays_programming_as_of_s" WHERE "local_networked"='local' AND "ad_freq"='20 minutes' AND "news_freq"='n/a after 7pm news';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "saturday_and_sundays_programming_as_of_s" ( "time" text, "show_name" text, "local_networked" text, "ad_freq" text, "news_freq" text );. Question: "Which time has a news frequency of 1 hour and show name of Best Mix Overnight?". [/INST] SELECT "time" FROM "saturday_and_sundays_programming_as_of_s" WHERE "news_freq"='1 hour' AND "show_name"='best mix overnight';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "saturday_and_sundays_programming_as_of_s" ( "time" text, "show_name" text, "local_networked" text, "ad_freq" text, "news_freq" text );. Question: "What is the ad frequency for the show named Health Matters?". [/INST] SELECT "ad_freq" FROM "saturday_and_sundays_programming_as_of_s" WHERE "show_name"='health matters';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "saturday_and_sundays_programming_as_of_s" ( "time" text, "show_name" text, "local_networked" text, "ad_freq" text, "news_freq" text );. Question: "What is the news frequency for the show Locker Room?". [/INST] SELECT "news_freq" FROM "saturday_and_sundays_programming_as_of_s" WHERE "show_name"='locker room';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "saturday_and_sundays_programming_as_of_s" ( "time" text, "show_name" text, "local_networked" text, "ad_freq" text, "news_freq" text );. Question: "What is the local/networked value for the show with an ad frequency of N/A?". [/INST] SELECT "local_networked" FROM "saturday_and_sundays_programming_as_of_s" WHERE "ad_freq"='n/a';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text );. Question: "When france had a rank larger than 2, what was their time?". [/INST] SELECT "time" FROM "heat_2" WHERE "rank">2 AND "country"='france';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text );. Question: "What was the time for the country of kazakhstan?". [/INST] SELECT "time" FROM "heat_2" WHERE "country"='kazakhstan';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text );. Question: "What athletes represented the country of germany?". [/INST] SELECT "athletes" FROM "heat_2" WHERE "country"='germany';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text );. Question: "What was the rank for the finish time of 1:42.054?". [/INST] SELECT AVG("rank") FROM "heat_2" WHERE "time"='1:42.054';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text );. Question: "Which country had a rank smaller than 7 and a time of 1:43.189?". [/INST] SELECT "country" FROM "heat_2" WHERE "rank"<7 AND "time"='1:43.189';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "results_by_team" ( "club" text, "winners" real, "last_final_won" text, "runners_up" real, "last_final_lost" text );. Question: "what is the club when the runners-up is 1 and the last final won is 1999?". [/INST] SELECT "club" FROM "results_by_team" WHERE "runners_up"=1 AND "last_final_won"='1999';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "results_by_team" ( "club" text, "winners" real, "last_final_won" text, "runners_up" real, "last_final_lost" text );. Question: "what is the last final won when runners-up is 1 and club is rijeka?". [/INST] SELECT "last_final_won" FROM "results_by_team" WHERE "runners_up"=1 AND "club"='rijeka';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "results_by_team" ( "club" text, "winners" real, "last_final_won" text, "runners_up" real, "last_final_lost" text );. Question: "How many times is runners-up less than 0?". [/INST] SELECT COUNT("winners") FROM "results_by_team" WHERE "runners_up"<0;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "football_league_division_two" ( "game" real, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real );. Question: "How many games have a Result of 4–0, and an Attendance larger than 12,256?". [/INST] SELECT COUNT("game") FROM "football_league_division_two" WHERE "result"='4–0' AND "attendance">'12,256';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "football_league_division_two" ( "game" real, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real );. Question: "Which Result has a Game larger than 6, and an Attendance larger than 12,782, and a Date of 5 december 1987?". [/INST] SELECT "result" FROM "football_league_division_two" WHERE "game">6 AND "attendance">'12,782' AND "date"='5 december 1987';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "football_league_division_two" ( "game" real, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real );. Question: "Which Result has a Venue of away, and a Game smaller than 43, and an Opponent of bournemouth?". [/INST] SELECT "result" FROM "football_league_division_two" WHERE "venue"='away' AND "game"<43 AND "opponent"='bournemouth';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "football_league_division_two" ( "game" real, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real );. Question: "Which Result has a Venue of home, and a Date of 3 october 1987?". [/INST] SELECT "result" FROM "football_league_division_two" WHERE "venue"='home' AND "date"='3 october 1987';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "doubles" ( "location" text, "year" text, "champion" text, "runner_up" text, "score" text, "name" text );. Question: "What is the score of 1993?". [/INST] SELECT "score" FROM "doubles" WHERE "year"='1993';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "doubles" ( "location" text, "year" text, "champion" text, "runner_up" text, "score" text, "name" text );. Question: "What is the Name when the runner-up was Sania Mirza Elena Vesnina?". [/INST] SELECT "name" FROM "doubles" WHERE "runner_up"='sania mirza elena vesnina';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "doubles" ( "location" text, "year" text, "champion" text, "runner_up" text, "score" text, "name" text );. Question: "What is the name with a Score of 6–3, 6–3?". [/INST] SELECT "name" FROM "doubles" WHERE "score"='6–3, 6–3';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "doubles" ( "location" text, "year" text, "champion" text, "runner_up" text, "score" text, "name" text );. Question: "What was the location in 2009?". [/INST] SELECT "location" FROM "doubles" WHERE "year"='2009';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "first_conversion_period_1867_1887" ( "class" text, "railway_number_s" text, "quantity_rebuilt" real, "rebuild_year_s" text, "type" text );. Question: "What's the railway number of a D(rebuild) class?". [/INST] SELECT "railway_number_s" FROM "first_conversion_period_1867_1887" WHERE "class"='d(rebuild)';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "first_conversion_period_1867_1887" ( "class" text, "railway_number_s" text, "quantity_rebuilt" real, "rebuild_year_s" text, "type" text );. Question: "What the least quantity having a T2A class?". [/INST] SELECT MIN("quantity_rebuilt") FROM "first_conversion_period_1867_1887" WHERE "class"='t2a';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_3" ( "rank" real, "lane" real, "athlete" text, "nationality" text, "time" real, "react" real );. Question: "Which lane did the swimmer who had a Reaction time of 0.185 and a time of 20.9 swim in?". [/INST] SELECT SUM("lane") FROM "heat_3" WHERE "react"=0.185 AND "time"<20.9;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_3" ( "rank" real, "lane" real, "athlete" text, "nationality" text, "time" real, "react" real );. Question: "What was the 200-metre time for the swimmer from Slovenia in lane 9?". [/INST] SELECT COUNT("time") FROM "heat_3" WHERE "nationality"='slovenia' AND "lane"<9;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_3" ( "rank" real, "lane" real, "athlete" text, "nationality" text, "time" real, "react" real );. Question: "Who was the swimmer from Dominica who had a time of 21.2 and swam in lane 7?". [/INST] SELECT "athlete" FROM "heat_3" WHERE "time"<21.2 AND "lane"<7 AND "nationality"='dominica';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "seventh_round" ( "pick" real, "team" text, "player" text, "position" text, "college" text );. Question: "What player had a pick higher than 53, and a position of defensive tackle?". [/INST] SELECT "player" FROM "seventh_round" WHERE "pick">53 AND "position"='defensive tackle';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "seventh_round" ( "pick" real, "team" text, "player" text, "position" text, "college" text );. Question: "What team is Jim Garcia category:Articles with Hcards on?". [/INST] SELECT "team" FROM "seventh_round" WHERE "player"='jim garcia category:articles with hcards';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "seventh_round" ( "pick" real, "team" text, "player" text, "position" text, "college" text );. Question: "Who is the pick from the Purdue College?". [/INST] SELECT "pick" FROM "seventh_round" WHERE "college"='purdue';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "records" ( "world_record" text, "snatch" text, "marcin_do_ga_pol" text, "199kg" text, "w_adys_awowo_poland" text );. Question: "What shows for Marcin Dołęga ( POL )when the world record shows olympic record, and a Snatch of total?". [/INST] SELECT "marcin_do_ga_pol" FROM "records" WHERE "world_record"='olympic record' AND "snatch"='total';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "records" ( "world_record" text, "snatch" text, "marcin_do_ga_pol" text, "199kg" text, "w_adys_awowo_poland" text );. Question: "What is the snatch when Marcin Dołęga ( POL ) was 430kg?". [/INST] SELECT "snatch" FROM "records" WHERE "marcin_do_ga_pol"='430kg';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "records" ( "world_record" text, "snatch" text, "marcin_do_ga_pol" text, "199kg" text, "w_adys_awowo_poland" text );. Question: "What shows for Władysławowo, Poland when the world record was clean & jerk?". [/INST] SELECT "w_adys_awowo_poland" FROM "records" WHERE "world_record"='clean & jerk';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "records" ( "world_record" text, "snatch" text, "marcin_do_ga_pol" text, "199kg" text, "w_adys_awowo_poland" text );. Question: "What shows for Władysławowo, Poland when the world record shows olympic record, a Marcin Dołęga (POL) is olympic standard, and Snatch is clean & jerk?". [/INST] SELECT "w_adys_awowo_poland" FROM "records" WHERE "world_record"='olympic record' AND "marcin_do_ga_pol"='olympic standard' AND "snatch"='clean & jerk';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalog" text );. Question: "What date has 0-6700-30838-2-9 for a catalog?". [/INST] SELECT "date" FROM "release_history" WHERE "catalog"='0-6700-30838-2-9';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalog" text );. Question: "What's the date in the United Kingdom having a catalog of reveal50cd/lp?". [/INST] SELECT "date" FROM "release_history" WHERE "catalog"='reveal50cd/lp' AND "region"='united kingdom';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text );. Question: "What day was king's cup 1996?". [/INST] SELECT "date" FROM "international_goals" WHERE "competition"='king''s cup 1996';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text );. Question: "What was the score for king's cup 1996?". [/INST] SELECT "score" FROM "international_goals" WHERE "competition"='king''s cup 1996';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text );. Question: "What was the result when the score was 5-1?". [/INST] SELECT "result" FROM "international_goals" WHERE "score"='5-1';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text );. Question: "What tournament had an A in 2012 and Q2 in 2010?". [/INST] SELECT "tournament" FROM "singles_performance_timeline" WHERE "2012"='a' AND "2010"='q2';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text );. Question: "What's the 2010 when they had a Q2 in 2009?". [/INST] SELECT "2010" FROM "singles_performance_timeline" WHERE "2009"='q2';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text );. Question: "What's the 2012 during Wimbledon and had a Q3 in 2008?". [/INST] SELECT "2012" FROM "singles_performance_timeline" WHERE "2008"='q3' AND "tournament"='wimbledon';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text );. Question: "What's the tournament name when they had an A in 2011 & 2012?". [/INST] SELECT "tournament" FROM "singles_performance_timeline" WHERE "2012"='a' AND "2011"='a';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text );. Question: "What's the 2012 when 2009 was 205?". [/INST] SELECT "2012" FROM "singles_performance_timeline" WHERE "2009"='205';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "and" ( "peak" text, "country" text, "elevation_m" real, "prominence_m" real, "col_m" real );. Question: "How much Col (m) has a Prominence (m) of 2,344?". [/INST] SELECT COUNT("col_m") FROM "and" WHERE "prominence_m"='2,344';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "and" ( "peak" text, "country" text, "elevation_m" real, "prominence_m" real, "col_m" real );. Question: "Which Prominence (m) has a Col (m) of 350?". [/INST] SELECT AVG("prominence_m") FROM "and" WHERE "col_m"=350;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "and" ( "peak" text, "country" text, "elevation_m" real, "prominence_m" real, "col_m" real );. Question: "Which Elevation (m) has a Prominence (m) smaller than 2,456, and a Peak of mount kyllini, and a Col (m) smaller than 506?". [/INST] SELECT MAX("elevation_m") FROM "and" WHERE "prominence_m"<'2,456' AND "peak"='mount kyllini' AND "col_m"<506;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "heat_4" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text );. Question: "Who was the athlete from Lithuania?". [/INST] SELECT "athlete" FROM "heat_4" WHERE "country"='lithuania';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fairfax_county_board_of_supervisors_resu" ( "year" text, "subject" text, "party" text, "votes" real, "opponent" text );. Question: "How many votes did Jeannemarie Devolites Davis get in 1995-Special?". [/INST] SELECT "votes" FROM "fairfax_county_board_of_supervisors_resu" WHERE "opponent"='jeannemarie devolites davis' AND "year"='1995-special';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fairfax_county_board_of_supervisors_resu" ( "year" text, "subject" text, "party" text, "votes" real, "opponent" text );. Question: "Who was the subject for the year of 2007?". [/INST] SELECT "subject" FROM "fairfax_county_board_of_supervisors_resu" WHERE "year"='2007';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fairfax_county_board_of_supervisors_resu" ( "year" text, "subject" text, "party" text, "votes" real, "opponent" text );. Question: "Which party has a voting total greater than 4,478?". [/INST] SELECT "party" FROM "fairfax_county_board_of_supervisors_resu" WHERE "votes">'4,478';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text );. Question: "Which Type has a Nat of geo?". [/INST] SELECT "type" FROM "in" WHERE "nat"='geo';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text );. Question: "Which Moving from has a Nat of ned?". [/INST] SELECT "moving_from" FROM "in" WHERE "nat"='ned';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text );. Question: "Which Ends have a Name of zambrano?". [/INST] SELECT MAX("ends") FROM "in" WHERE "name"='zambrano';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text );. Question: "Which Transfer fee has a Moving from of youth system, and a Nat of mar?". [/INST] SELECT "transfer_fee" FROM "in" WHERE "moving_from"='youth system' AND "nat"='mar';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text );. Question: "Which Transfer fee has Ends larger than 2011, and a Moving from of psv?". [/INST] SELECT "transfer_fee" FROM "in" WHERE "ends">2011 AND "moving_from"='psv';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "equestrian" ( "athlete" text, "class" text, "horse" text, "event" text, "result" text, "rank" text );. Question: "What is the result for the Toscane Horse in the freestyle test?". [/INST] SELECT "result" FROM "equestrian" WHERE "horse"='toscane' AND "event"='freestyle test';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "equestrian" ( "athlete" text, "class" text, "horse" text, "event" text, "result" text, "rank" text );. Question: "What horse has a 66.452 result?". [/INST] SELECT "horse" FROM "equestrian" WHERE "result"='66.452';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "equestrian" ( "athlete" text, "class" text, "horse" text, "event" text, "result" text, "rank" text );. Question: "What event did Sjerstin Vermeulen receive a 66.452 result?". [/INST] SELECT "event" FROM "equestrian" WHERE "athlete"='sjerstin vermeulen' AND "result"='66.452';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "equestrian" ( "athlete" text, "class" text, "horse" text, "event" text, "result" text, "rank" text );. Question: "What class had a Championship Test event with a 62.516 result?". [/INST] SELECT "class" FROM "equestrian" WHERE "event"='championship test' AND "result"='62.516';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "equestrian" ( "athlete" text, "class" text, "horse" text, "event" text, "result" text, "rank" text );. Question: "What horse has a 65.863 result?". [/INST] SELECT "horse" FROM "equestrian" WHERE "result"='65.863';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "engines" ( "model" text, "years" text, "engine" text, "displacement" text, "power" text, "fuel_system" text );. Question: "What is the displacement for the model 1400?". [/INST] SELECT "displacement" FROM "engines" WHERE "model"='1400';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "engines" ( "model" text, "years" text, "engine" text, "displacement" text, "power" text, "fuel_system" text );. Question: "What is the displacement when the fuel system is carburettor, and a power of ps (kw; hp), and also has a model of 2000?". [/INST] SELECT "displacement" FROM "engines" WHERE "fuel_system"='carburettor' AND "power"='ps (kw; hp)' AND "model"='2000';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "engines" ( "model" text, "years" text, "engine" text, "displacement" text, "power" text, "fuel_system" text );. Question: "What engine with the years of 1975-84 has a model of 1600?". [/INST] SELECT "engine" FROM "engines" WHERE "model"='1600' AND "years"='1975-84';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "engines" ( "model" text, "years" text, "engine" text, "displacement" text, "power" text, "fuel_system" text );. Question: "What displacement has a model of 2000?". [/INST] SELECT "displacement" FROM "engines" WHERE "model"='2000';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "engines" ( "model" text, "years" text, "engine" text, "displacement" text, "power" text, "fuel_system" text );. Question: "What engine with years of 1975-84 has a displacement of 1585cc?". [/INST] SELECT "engine" FROM "engines" WHERE "years"='1975-84' AND "displacement"='1585cc';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "engines" ( "model" text, "years" text, "engine" text, "displacement" text, "power" text, "fuel_system" text );. Question: "What is the power for the years 1975-84?". [/INST] SELECT "power" FROM "engines" WHERE "years"='1975-84';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "al_ahly_results" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text );. Question: "What is the 2nd leg in match with team 2 of Teram?". [/INST] SELECT "2nd_leg" FROM "al_ahly_results" WHERE "team_2"='teram';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "tv_time" text, "attendance" text );. Question: "What was the result of the December 15, 2002 game?". [/INST] SELECT "result" FROM "schedule" WHERE "date"='december 15, 2002';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "tv_time" text, "attendance" text );. Question: "What date was the game that was attended by 69,024?". [/INST] SELECT "date" FROM "schedule" WHERE "attendance"='69,024';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "tv_time" text, "attendance" text );. Question: "On what date was the week 17 game?". [/INST] SELECT "date" FROM "schedule" WHERE "week"=17;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text );. Question: "What is the name of the 2008 club for Istres Volleyball?". [/INST] SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='istres volleyball';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "p_series_1939_1944" ( "model" text, "built" text, "quantity" real, "seats" real, "length" text, "engine" text );. Question: "What is the Model of the Engine with 29 Seats Built in 1941–1942?". [/INST] SELECT "model" FROM "p_series_1939_1944" WHERE "seats"=29 AND "built"='1941–1942';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "p_series_1939_1944" ( "model" text, "built" text, "quantity" real, "seats" real, "length" text, "engine" text );. Question: "What is the Quantity of the engine Model PG-2901?". [/INST] SELECT "quantity" FROM "p_series_1939_1944" WHERE "model"='pg-2901';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "by_clubs" ( "team" text, "matches" real, "wins" real, "wins_pct" text, "draws" real, "draws_pct" text, "losses" real, "losses_pct" text, "against" real, "for_against_ratio" text );. Question: "What is the % of draws with an against ratio of 0.67 and 1 win?". [/INST] SELECT "draws_pct" FROM "by_clubs" WHERE "for_against_ratio"='0.67' AND "wins"=1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "by_clubs" ( "team" text, "matches" real, "wins" real, "wins_pct" text, "draws" real, "draws_pct" text, "losses" real, "losses_pct" text, "against" real, "for_against_ratio" text );. Question: "What are the matches with a 50% of draws for Team Milan?". [/INST] SELECT "matches" FROM "by_clubs" WHERE "draws_pct"='50%' AND "team"='milan';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "by_clubs" ( "team" text, "matches" real, "wins" real, "wins_pct" text, "draws" real, "draws_pct" text, "losses" real, "losses_pct" text, "against" real, "for_against_ratio" text );. Question: "What are the total losses with 2 matches, 2 against, 0% of draws and less than 1 wins?". [/INST] SELECT SUM("losses") FROM "by_clubs" WHERE "matches"=2 AND "against"=2 AND "draws_pct"='0%' AND "wins"<1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "by_clubs" ( "team" text, "matches" real, "wins" real, "wins_pct" text, "draws" real, "draws_pct" text, "losses" real, "losses_pct" text, "against" real, "for_against_ratio" text );. Question: "What is the sum on wins with an against ratio of 0.83, and more than 1 loss?". [/INST] SELECT SUM("wins") FROM "by_clubs" WHERE "for_against_ratio"='0.83' AND "losses">1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "date_outgoing" text, "reason_of_departure" text, "replaced_by" text, "date_of_replacement" text );. Question: "Why did the manager who departed on August 1, 2008 leave?". [/INST] SELECT "reason_of_departure" FROM "managerial_changes" WHERE "date_outgoing"='august 1, 2008';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "date_outgoing" text, "reason_of_departure" text, "replaced_by" text, "date_of_replacement" text );. Question: "On what date did the manager for PSIS Semarang take over for the manager that was sacked?". [/INST] SELECT "date_of_replacement" FROM "managerial_changes" WHERE "reason_of_departure"='sacked' AND "team"='psis semarang';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "date_outgoing" text, "reason_of_departure" text, "replaced_by" text, "date_of_replacement" text );. Question: "Why did the manager who departed on August 1, 2008 leave?". [/INST] SELECT "reason_of_departure" FROM "managerial_changes" WHERE "date_outgoing"='august 1, 2008';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "date_outgoing" text, "reason_of_departure" text, "replaced_by" text, "date_of_replacement" text );. Question: "When did Peter Butler leave his team?". [/INST] SELECT "date_outgoing" FROM "managerial_changes" WHERE "outgoing_manager"='peter butler';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "date_outgoing" text, "reason_of_departure" text, "replaced_by" text, "date_of_replacement" text );. Question: "When did the manager take over for the manager that left on August 20, 2008?". [/INST] SELECT "date_of_replacement" FROM "managerial_changes" WHERE "date_outgoing"='august 20, 2008';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "notes" text );. Question: "In which competition(s) did Iljuštšenko jump 1.90 m?". [/INST] SELECT "competition" FROM "competition_record" WHERE "notes"='1.90 m';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "notes" text );. Question: "In which position did Iljuštšenko finish in the European Championships held prior to 2008?". [/INST] SELECT "position" FROM "competition_record" WHERE "year"<2008 AND "competition"='european championships';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "notes" text );. Question: "In what year did Iljuštšenko compete in Barcelona, Spain?". [/INST] SELECT "year" FROM "competition_record" WHERE "venue"='barcelona, spain';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real );. Question: "What's the number of electorates for constituency number 56?". [/INST] SELECT SUM("number_of_electorates_2009") FROM "assembly_segments" WHERE "constituency_number"='56';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real );. Question: "What's the constituency number for Damoh with more than 173,217 electorates?". [/INST] SELECT "constituency_number" FROM "assembly_segments" WHERE "number_of_electorates_2009">'173,217' AND "name"='damoh';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "squad" ( "name" text, "tests" real, "club" text, "career_caps" real, "tour_apps" real, "position" text );. Question: "What is the tour Apps when the career caps show 15?". [/INST] SELECT "tour_apps" FROM "squad" WHERE "career_caps"=15;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "squad" ( "name" text, "tests" real, "club" text, "career_caps" real, "tour_apps" real, "position" text );. Question: "What is the number of career caps for a full back, when tour Apps is smaller than 29?". [/INST] SELECT COUNT("career_caps") FROM "squad" WHERE "position"='full back' AND "tour_apps"<29;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "squad" ( "name" text, "tests" real, "club" text, "career_caps" real, "tour_apps" real, "position" text );. Question: "What is the career caps for half-back, when tests is more than 3?". [/INST] SELECT "career_caps" FROM "squad" WHERE "position"='half-back' AND "tests">3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "squad" ( "name" text, "tests" real, "club" text, "career_caps" real, "tour_apps" real, "position" text );. Question: "What name has tour Apps larger than 7, tests larger than 4, and a Career caps of 20?". [/INST] SELECT "name" FROM "squad" WHERE "tour_apps">7 AND "tests">4 AND "career_caps"=20;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "results" ( "driver" text, "entrant" text, "constructor" text, "time_retired" text, "grid" real );. Question: "What constructor has a grid less than 21, and time/retired of engine?". [/INST] SELECT "constructor" FROM "results" WHERE "grid"<21 AND "time_retired"='engine';</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "results" ( "driver" text, "entrant" text, "constructor" text, "time_retired" text, "grid" real );. Question: "When the entrant is fred saunders what is the driver?". [/INST] SELECT "driver" FROM "results" WHERE "entrant"='fred saunders';</s>