text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); Question: What race did Meo Constantini win at the circuit of monza ? <|assistant|> SELECT "name" FROM "other_grands_prix" WHERE "winning_driver"='meo constantini' AND "circuit"='monza';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); Question: On what date did Aymo Maggi win the Rome Grand Prix ? <|assistant|> SELECT "date" FROM "other_grands_prix" WHERE "winning_driver"='aymo maggi' AND "name"='rome grand prix';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: Name the season outcome for smyrna <|assistant|> SELECT "season_outcome" FROM "2011_regular_season_football_standings" WHERE "school"='smyrna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: Name the school for eagles <|assistant|> SELECT "school" FROM "2011_regular_season_football_standings" WHERE "team"='eagles';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: Name the school for Season Outcome of loss in first round of div. i playoffs <|assistant|> SELECT "school" FROM "2011_regular_season_football_standings" WHERE "season_outcome"='loss in first round of div. i playoffs';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: Name the division record for riders <|assistant|> SELECT "division_record" FROM "2011_regular_season_football_standings" WHERE "team"='riders';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: Name the team for school of milford <|assistant|> SELECT "team" FROM "2011_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 "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Name the average points for chassis of stevens and year less than 1950 <|assistant|> SELECT AVG("points") FROM "complete_formula_one_world_championship_" WHERE "chassis"='stevens' AND "year"<1950;<|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: Name the least points for chassis of kurtis kraft 500a <|assistant|> SELECT MIN("points") 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 "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Name the total number of year for chassis of kurtis kraft 4000 and points more than 2 <|assistant|> SELECT COUNT("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 4000' AND "points">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_season" ( "week" real, "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: Who was the visiting team on weeks under 12 and at Sports Authority Field at Mile High? <|assistant|> SELECT "visiting_team" FROM "2011_season" WHERE "week"<12 AND "stadium"='sports authority field at mile high';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_season" ( "week" real, "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: Who was the visiting team at Raymond James Stadium? <|assistant|> SELECT "visiting_team" FROM "2011_season" WHERE "stadium"='raymond james stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2011_season" ( "week" real, "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); Question: What date had the Houston Texans as visitors? <|assistant|> SELECT "date" FROM "2011_season" WHERE "visiting_team"='houston texans';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_in_minnesota_state_elections" ( "year" real, "office" text, "candidate" text, "popular_votes" real, "percentage" text ); Question: Name the year with percentage of 9.66% <|assistant|> SELECT "year" FROM "results_in_minnesota_state_elections" WHERE "percentage"='9.66%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_in_minnesota_state_elections" ( "year" real, "office" text, "candidate" text, "popular_votes" real, "percentage" text ); Question: Name the total number of popular votes for mn attorney general in 1994 <|assistant|> SELECT COUNT("popular_votes") FROM "results_in_minnesota_state_elections" WHERE "office"='mn attorney general' AND "year"=1994;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_in_minnesota_state_elections" ( "year" real, "office" text, "candidate" text, "popular_votes" real, "percentage" text ); Question: Name the average popular votes in years after 1990 with percentage of 4.94% <|assistant|> SELECT AVG("popular_votes") FROM "results_in_minnesota_state_elections" WHERE "percentage"='4.94%' AND "year">1990;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_in_minnesota_state_elections" ( "year" real, "office" text, "candidate" text, "popular_votes" real, "percentage" text ); Question: Name the least popular votes for year less than 1994 and percentage of 0.96% <|assistant|> SELECT MIN("popular_votes") FROM "results_in_minnesota_state_elections" WHERE "year"<1994 AND "percentage"='0.96%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); Question: What United States player holds the place of t8?` <|assistant|> SELECT "player" FROM "first_round" WHERE "place"='t8' AND "country"='united states';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); Question: What country of argentina has the To par of 68? <|assistant|> SELECT "to_par" FROM "first_round" WHERE "score"=68 AND "country"='argentina';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); Question: What is the To par and holds the t8 place of the United States player Tiger Woods? <|assistant|> SELECT "to_par" FROM "first_round" WHERE "country"='united states' AND "place"='t8' AND "player"='tiger woods';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); Question: What country does miguel ángel jiménez player for and has a score of 69? <|assistant|> SELECT "country" FROM "first_round" WHERE "score"=69 AND "player"='miguel ángel jiménez';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "racelines" ( "date" text, "track" text, "race" text, "purse" text, "finish" text, "time" text, "last_1_4" real, "odds" text, "driver" text, "trainer" text ); Question: What is the date of the race at Truro? <|assistant|> SELECT "date" FROM "racelines" WHERE "track"='truro';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1998_broadway_revival" ( "year" real, "award" text, "category" text, "nominee" text, "result" text ); Question: Which Year has a nominated outstanding actor in a musical? <|assistant|> SELECT "year" FROM "1998_broadway_revival" WHERE "result"='nominated' AND "category"='outstanding actor in a musical';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1998_broadway_revival" ( "year" real, "award" text, "category" text, "nominee" text, "result" text ); Question: Which Award has a nominated, and outstanding choreography? <|assistant|> SELECT "award" FROM "1998_broadway_revival" WHERE "result"='nominated' AND "category"='outstanding choreography';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1998_broadway_revival" ( "year" real, "award" text, "category" text, "nominee" text, "result" text ); Question: Which Award has best performance by a leading actor in a musical <|assistant|> SELECT "award" FROM "1998_broadway_revival" WHERE "category"='best performance by a leading actor in a musical';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "players_with_100_or_more_competitive_app" ( "name" text, "position" text, "club_career" text, "league_apps" real, "league_goals" real, "total_apps" real, "total_goals" real ); Question: What was the club career for players in positions of DF, fewer than 18 total goals, fewer than 129 league appearances, and more than 7 league goals? <|assistant|> SELECT "club_career" FROM "players_with_100_or_more_competitive_app" WHERE "position"='df' AND "total_goals"<18 AND "league_apps"<129 AND "league_goals">7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "players_with_100_or_more_competitive_app" ( "name" text, "position" text, "club_career" text, "league_apps" real, "league_goals" real, "total_apps" real, "total_goals" real ); Question: What is the fewest total goals scored for players with under 171 league appearances, 151 total appearances, and the DF position? <|assistant|> SELECT MIN("total_goals") FROM "players_with_100_or_more_competitive_app" WHERE "league_apps"<171 AND "total_apps"=151 AND "position"='df';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "group" text, "award" text, "film_show" text, "result" text ); Question: What is the total number of Years that has the Group, Method Fest Independent Film Festival? <|assistant|> SELECT COUNT("year") FROM "awards_and_nominations" WHERE "group"='method fest independent film festival';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "group" text, "award" text, "film_show" text, "result" text ); Question: What is the average Year that has the Group, Logie Award, the Award, Most Outstanding Actor, and the Result, nominated? <|assistant|> SELECT AVG("year") FROM "awards_and_nominations" WHERE "group"='logie award' AND "award"='most outstanding actor' AND "result"='nominated';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "group" text, "award" text, "film_show" text, "result" text ); Question: Before 2012, which Group has the Result, nominated, the Film/Show, East West 101, and the Award, Best Lead Actor in A Television Drama? <|assistant|> SELECT "group" FROM "awards_and_nominations" WHERE "result"='nominated' AND "year"<2012 AND "film_show"='east west 101' AND "award"='best lead actor in a television drama';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "group" text, "award" text, "film_show" text, "result" text ); Question: After 2008, which Group has the Result, nominated, and the Award, Best Lead Actor in a Television Drama? <|assistant|> SELECT "group" FROM "awards_and_nominations" WHERE "result"='nominated' AND "year">2008 AND "award"='best lead actor in a television drama';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "group" text, "award" text, "film_show" text, "result" text ); Question: What is the Award, when the Film/Show is East West 101, and when the year is before 2009, and when the Group is Logie Award? <|assistant|> SELECT "award" FROM "awards_and_nominations" WHERE "film_show"='east west 101' AND "year"<2009 AND "group"='logie award';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "group" text, "award" text, "film_show" text, "result" text ); Question: What is the Film/Show, when the Year is 2010? <|assistant|> SELECT "film_show" FROM "awards_and_nominations" WHERE "year"=2010;<|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: Which year is that has a Entrant of belond equa-flow / calif. muffler? <|assistant|> SELECT "year" FROM "complete_formula_one_world_championship_" WHERE "entrant"='belond equa-flow / calif. muffler';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members_of_parliament" ( "election" text, "1st_member" text, "1st_party" text, "2nd_member" text, "2nd_party" text ); Question: which election year has henry wyndham as the 2nd member and walter barttelot as 1st member? <|assistant|> SELECT "election" FROM "members_of_parliament" WHERE "2nd_member"='henry wyndham' AND "1st_member"='walter barttelot';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members_of_parliament" ( "election" text, "1st_member" text, "1st_party" text, "2nd_member" text, "2nd_party" text ); Question: what election year has 2nd party conservative with 2nd member henry wyndham and 1st member walter barttelot? <|assistant|> SELECT "election" FROM "members_of_parliament" WHERE "2nd_party"='conservative' AND "2nd_member"='henry wyndham' AND "1st_member"='walter barttelot';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members_of_parliament" ( "election" text, "1st_member" text, "1st_party" text, "2nd_member" text, "2nd_party" text ); Question: what is the 1st pary when the second is whig? <|assistant|> SELECT "1st_party" FROM "members_of_parliament" WHERE "2nd_party"='whig';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members_of_parliament" ( "election" text, "1st_member" text, "1st_party" text, "2nd_member" text, "2nd_party" text ); Question: what is the election year with henry wyndham as 2nd member and walter barttelot as 1st? <|assistant|> SELECT "election" FROM "members_of_parliament" WHERE "2nd_member"='henry wyndham' AND "1st_member"='walter barttelot';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "twenty20_internationals" ( "player" text, "wkts" real, "runs" real, "econ" real, "ovrs" real ); Question: If the Ovrs is less than 2, what's the average in Wkts? <|assistant|> SELECT AVG("wkts") FROM "twenty20_internationals" WHERE "ovrs"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "twenty20_internationals" ( "player" text, "wkts" real, "runs" real, "econ" real, "ovrs" real ); Question: If Adam Voges had less than 28.5 Ovrs, what are his highest Wkts? <|assistant|> SELECT MAX("wkts") FROM "twenty20_internationals" WHERE "ovrs"<28.5 AND "player"='adam voges';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_statistics" ( "year" text, "team" text, "t_tkl" real, "solo" real, "sacks" real, "pass_def" real ); Question: How many sacks have 2006 as the year, and a solo less than 62? <|assistant|> SELECT SUM("sacks") FROM "professional_statistics" WHERE "year"='2006' AND "solo"<62;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_statistics" ( "year" text, "team" text, "t_tkl" real, "solo" real, "sacks" real, "pass_def" real ); Question: What is the average pass def that has green bay packers as the team, 62 as the solo and sacks less than 2? <|assistant|> SELECT AVG("pass_def") FROM "professional_statistics" WHERE "team"='green bay packers' AND "solo"=62 AND "sacks"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_statistics" ( "year" text, "team" text, "t_tkl" real, "solo" real, "sacks" real, "pass_def" real ); Question: How many sacks have 72 as the solo and a TTkl less than 112? <|assistant|> SELECT COUNT("sacks") FROM "professional_statistics" WHERE "solo"=72 AND "t_tkl"<112;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "professional_statistics" ( "year" text, "team" text, "t_tkl" real, "solo" real, "sacks" real, "pass_def" real ); Question: How many TTkl have 2004 as the year, and a pass def greater than 5? <|assistant|> SELECT SUM("t_tkl") FROM "professional_statistics" WHERE "year"='2004' AND "pass_def">5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "central_otago_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the highest decile of Tarras school, which had a state authority? <|assistant|> SELECT MAX("decile") FROM "central_otago_district" WHERE "authority"='state' AND "name"='tarras school';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "central_otago_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the decile of the school with a roll larger than 513? <|assistant|> SELECT SUM("decile") FROM "central_otago_district" WHERE "roll">513;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "central_otago_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the area of Cromwell Primary school, which has a state authority? <|assistant|> SELECT "area" FROM "central_otago_district" WHERE "authority"='state' AND "name"='cromwell primary school';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "best_bowling_figures" ( "player" text, "overs" real, "figures" text, "opponent" text, "ground" text ); Question: Which player has figures of 4/14? <|assistant|> SELECT "player" FROM "best_bowling_figures" WHERE "figures"='4/14';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "best_bowling_figures" ( "player" text, "overs" real, "figures" text, "opponent" text, "ground" text ); Question: How many overs occurred at Waca Ground against Queensland? <|assistant|> SELECT "overs" FROM "best_bowling_figures" WHERE "ground"='waca ground' AND "opponent"='queensland';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "best_bowling_figures" ( "player" text, "overs" real, "figures" text, "opponent" text, "ground" text ); Question: At which ground did Dirk Nannes have a figure of 4/23? <|assistant|> SELECT "ground" FROM "best_bowling_figures" WHERE "figures"='4/23';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "best_bowling_figures" ( "player" text, "overs" real, "figures" text, "opponent" text, "ground" text ); Question: Who was the opponent when Steven Smith had 3.3 overs? <|assistant|> SELECT "opponent" FROM "best_bowling_figures" WHERE "overs"=3.3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "biggest_losses" ( "margin" real, "score" text, "opponent" text, "venue" text, "year" real ); Question: Name the average year for brookvale oval and margin more than 46 <|assistant|> SELECT AVG("year") FROM "biggest_losses" WHERE "venue"='brookvale oval' AND "margin">46;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "biggest_losses" ( "margin" real, "score" text, "opponent" text, "venue" text, "year" real ); Question: Name the most year for brookvale oval <|assistant|> SELECT MAX("year") FROM "biggest_losses" WHERE "venue"='brookvale oval';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "biggest_losses" ( "margin" real, "score" text, "opponent" text, "venue" text, "year" real ); Question: Name the average year for manly-warringah sea eagles <|assistant|> SELECT AVG("year") FROM "biggest_losses" WHERE "opponent"='manly-warringah sea eagles';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_19_10_9" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Who is the partner with a score of 6–1, 6–4? <|assistant|> SELECT "partner" FROM "doubles_19_10_9" WHERE "score"='6–1, 6–4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_statistics" ( "season" text, "overall_spectators" real, "per_game" real, "best_supported_club" text, "spectators_game" real, "top_goal_scorer" text, "goals" real ); Question: what is the best supported club with a 25 Goal and a per game larger than 1,156? <|assistant|> SELECT "best_supported_club" FROM "league_statistics" WHERE "goals"=25 AND "per_game">'1,156';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "men" ( "sport" text, "competition_name" text, "competing_entities" text, "age_groups" text, "held_every" text ); Question: What are the age groups for the Big League World Series? <|assistant|> SELECT "age_groups" FROM "men" WHERE "competition_name"='big league world series';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "men" ( "sport" text, "competition_name" text, "competing_entities" text, "age_groups" text, "held_every" text ); Question: How often is the table tennis competition held? <|assistant|> SELECT "held_every" FROM "men" WHERE "sport"='table tennis';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "men" ( "sport" text, "competition_name" text, "competing_entities" text, "age_groups" text, "held_every" text ); Question: How often is the cricket competition held? <|assistant|> SELECT "held_every" FROM "men" WHERE "sport"='cricket';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: What was the attendance of the Blue Jays' game when their record was 47-43? <|assistant|> SELECT SUM("attendance") FROM "game_log" WHERE "record"='47-43';<|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: Which year had a Cosworth V8 engine and 12 points? <|assistant|> SELECT "year" FROM "complete_formula_one_world_championship_" WHERE "points"=12 AND "engine"='cosworth v8';<|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: How many points did the ATS Wheels entrant with an ATS D2 chassis have? <|assistant|> SELECT "points" FROM "complete_formula_one_world_championship_" WHERE "entrant"='ats wheels' AND "chassis"='ats d2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "career_summary" ( "season" real, "series" text, "team" text, "races" real, "wins" real, "poles" real, "f_laps" real, "podiums" real, "points" text, "position" text ); Question: How many races have less than 2 podiums and 19th position before 2009? <|assistant|> SELECT AVG("races") FROM "career_summary" WHERE "podiums"<2 AND "position"='19th' AND "season"<2009;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_24_hours_of_le_mans_results" ( "year" real, "team" text, "co_drivers" text, "class" text, "laps" real, "pos" text, "class_pos" text ); Question: Which co drivers are 3rd in Joest racing? <|assistant|> SELECT "co_drivers" FROM "complete_24_hours_of_le_mans_results" WHERE "pos"='3rd' AND "team"='joest racing';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fiba_euro_basket_2007_squads" ( "player" text, "height" real, "position" text, "year_born" real, "current_club" text ); Question: When was radek necas with less than 2.04 height born? <|assistant|> SELECT AVG("year_born") FROM "fiba_euro_basket_2007_squads" WHERE "player"='radek necas' AND "height"<2.04;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fiba_euro_basket_2007_squads" ( "player" text, "height" real, "position" text, "year_born" real, "current_club" text ); Question: How tall was the member of Nymburk, who was born in 1982? <|assistant|> SELECT MAX("height") FROM "fiba_euro_basket_2007_squads" WHERE "year_born"=1982 AND "current_club"='nymburk';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_county" ( "county" text, "kerrypct" text, "kerrynum" real, "bushpct" text, "bushnum" real, "otherspct" text, "othersnum" real ); Question: What Kerry number does Taylor county have with more than 65 others#? <|assistant|> SELECT COUNT("kerrynum") FROM "by_county" WHERE "county"='taylor' AND "othersnum">65;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_county" ( "county" text, "kerrypct" text, "kerrynum" real, "bushpct" text, "bushnum" real, "otherspct" text, "othersnum" real ); Question: What is the smallest bush# with 66.0% bush and less than 65 others#? <|assistant|> SELECT MIN("bushnum") FROM "by_county" WHERE "bushpct"='66.0%' AND "othersnum"<65;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "west_indies_in_australia" ( "date" text, "home_captain" text, "away_captain" text, "venue" text, "result" text ); Question: Who was the captain of the away team at Adelaide Oval? <|assistant|> SELECT "away_captain" FROM "west_indies_in_australia" WHERE "venue"='adelaide oval';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "west_indies_in_australia" ( "date" text, "home_captain" text, "away_captain" text, "venue" text, "result" text ); Question: What is the final score at Melbourne Cricket Ground? <|assistant|> SELECT "result" FROM "west_indies_in_australia" WHERE "venue"='melbourne cricket ground';<|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 score for april 28 <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='april 28';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heats" ( "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What is the average Heat for anjelika solovieva? <|assistant|> SELECT AVG("heat") FROM "heats" WHERE "name"='anjelika solovieva';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heats" ( "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What is the average lane with Netherlands Antilles Nationality? <|assistant|> SELECT AVG("lane") FROM "heats" WHERE "nationality"='netherlands antilles';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What is the finish of the year with start 5? <|assistant|> SELECT "finish" FROM "indy_500_results" WHERE "start"='5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What is the rank in 1940? <|assistant|> SELECT "rank" FROM "indy_500_results" WHERE "year"='1940';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What is the highest laps of the year when the rank was 14? <|assistant|> SELECT MAX("laps") FROM "indy_500_results" WHERE "rank"='14';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What year had 134 laps? <|assistant|> SELECT "year" FROM "indy_500_results" WHERE "laps"=134;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What is the finish when there was more than 192 laps and a qual of 135.736? <|assistant|> SELECT "finish" FROM "indy_500_results" WHERE "laps">192 AND "qual"='135.736';<|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: Witch opponent has a loss of Glynn (0-2)? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "loss"='glynn (0-2)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_iwa_champions" ( "championship" text, "champion_s" text, "previous_champion_s" text, "date_won" text, "location" text ); Question: Who was the previous champion of the title won on July 7, 2010? <|assistant|> SELECT "previous_champion_s" FROM "current_iwa_champions" WHERE "date_won"='july 7, 2010';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_iwa_champions" ( "championship" text, "champion_s" text, "previous_champion_s" text, "date_won" text, "location" text ); Question: When did Bonecrusher win the championship at Bayamón, Puerto Rico? <|assistant|> SELECT "date_won" FROM "current_iwa_champions" WHERE "location"='bayamón, puerto rico' AND "champion_s"='bonecrusher';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_iwa_champions" ( "championship" text, "champion_s" text, "previous_champion_s" text, "date_won" text, "location" text ); Question: Who is the champion of the title previously held by Lash? <|assistant|> SELECT "champion_s" FROM "current_iwa_champions" WHERE "previous_champion_s"='lash';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_iwa_champions" ( "championship" text, "champion_s" text, "previous_champion_s" text, "date_won" text, "location" text ); Question: Which championship was won on July 7, 2010? <|assistant|> SELECT "championship" FROM "current_iwa_champions" WHERE "date_won"='july 7, 2010';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "class" text, "prize_k" real, "odds" text, "runners" real, "placing" real, "margin" real, "time" text, "jockey" text, "trainer" text ); Question: Who has 6/1 odds? <|assistant|> SELECT "trainer" FROM "race_record" WHERE "odds"='6/1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "class" text, "prize_k" real, "odds" text, "runners" real, "placing" real, "margin" real, "time" text, "jockey" text, "trainer" text ); Question: What is the total dist with Johnny Murtagh and less than 26 runners? <|assistant|> SELECT SUM("dist_f") FROM "race_record" WHERE "jockey"='johnny murtagh' AND "runners"<26;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "class" text, "prize_k" real, "odds" text, "runners" real, "placing" real, "margin" real, "time" text, "jockey" text, "trainer" text ); Question: Who has 5/1 odds? <|assistant|> SELECT "jockey" FROM "race_record" WHERE "odds"='5/1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "race" text, "dist_f" real, "course" text, "class" text, "prize_k" real, "odds" text, "runners" real, "placing" real, "margin" real, "time" text, "jockey" text, "trainer" text ); Question: What course did Fergal Lynch end up with 5/1 odds? <|assistant|> SELECT "course" FROM "race_record" WHERE "jockey"='fergal lynch' AND "odds"='5/1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "name" text, "country" text, "score" text, "to_par" text, "money" real ); Question: What place has a To par of +4 and a score of 74-70-74-74=292? <|assistant|> SELECT "place" FROM "final_round" WHERE "to_par"='+4' AND "score"='74-70-74-74=292';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "name" text, "country" text, "score" text, "to_par" text, "money" real ); Question: What place in the United States has a To par of e? <|assistant|> SELECT "place" FROM "final_round" WHERE "country"='united states' AND "to_par"='e';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "name" text, "country" text, "score" text, "to_par" text, "money" real ); Question: What is the To par for the place in the United States and a score of 74-69-71-74=288? <|assistant|> SELECT "to_par" FROM "final_round" WHERE "country"='united states' AND "score"='74-69-71-74=288';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); Question: What Venue is listed that has a Year smaller than 2005 and a Position of 10th (sf)? <|assistant|> SELECT "venue" FROM "competition_record" WHERE "year"<2005 AND "position"='10th (sf)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); Question: What's the average Year for the Position of 7th (sf)? <|assistant|> SELECT AVG("year") FROM "competition_record" WHERE "position"='7th (sf)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); Question: What's the highest Year for the Venue of Santiago De Chile and the Event of 800 m? <|assistant|> SELECT MAX("year") FROM "competition_record" WHERE "event"='800 m' AND "venue"='santiago de chile';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competition_record" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); Question: What Venue has a Position of 12th (sf)? <|assistant|> SELECT "venue" FROM "competition_record" WHERE "position"='12th (sf)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Which engine has an Entrant of team lotus, and a Year larger than 1962? <|assistant|> SELECT "engine" FROM "complete_world_championship_formula_one_" WHERE "entrant"='team lotus' AND "year">1962;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: How many points have a Year larger than 1966? <|assistant|> SELECT COUNT("points") FROM "complete_world_championship_formula_one_" WHERE "year">1966;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the smallest number of points with an Engine of climax v8, and a Year of 1966? <|assistant|> SELECT MIN("points") FROM "complete_world_championship_formula_one_" WHERE "engine"='climax v8' AND "year"=1966;<|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: How many points did Team Rothmans International have after 1975 when their Chassis was a March 771? <|assistant|> SELECT "points" FROM "complete_formula_one_world_championship_" WHERE "year">1975 AND "entrant"='team rothmans international' AND "chassis"='march 771';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" real ); Question: What Nationality of the person who has a Rank of 4 <|assistant|> SELECT "nationality" FROM "semifinal_2" WHERE "lane"<4 AND "rank"=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, "stadium" text ); Question: Name the score on october 14 <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='october 14';<|endoftext|>