output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT AVG("league_cup") FROM "goalscorers" WHERE "fa_cup">0 AND "league"=5;
## Task Generate a SQL query to answer the following question: `How many league cup goals on average for players with over 0 FA cup and 5 league goals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "goalscorers" ( "name" text, "league" real, "fa_cup" real, "league_cup" real, "europe" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many league cup goals on average for players with over 0 FA cup and 5 league goals?`: ```sql
SELECT MIN("fa_cup") FROM "goalscorers" WHERE "name"='viduka' AND "europe"<2;
## Task Generate a SQL query to answer the following question: `What is the low FA cup goals for viduka with under 2 europe goals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "goalscorers" ( "name" text, "league" real, "fa_cup" real, "league_cup" real, "europe" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the low FA cup goals for viduka with under 2 europe goals?`: ```sql
SELECT MAX("year") FROM "awards_and_nominations" WHERE "association"='american music awards' AND "category"='favorite rap/hip-hop new artist';
## Task Generate a SQL query to answer the following question: `Who won the most recent favorite rap/hip-hop new artist at the American music awards?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards_and_nominations" ( "year" real, "association" text, "category" text, "nominated_work" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the most recent favorite rap/hip-hop new artist at the American music awards?`: ```sql
SELECT "date" FROM "january" WHERE "leading_scorer"='maurice williams (25)' AND "score"='102–105';
## Task Generate a SQL query to answer the following question: `What is the Date with a Leading scorer with maurice williams (25), and a Score with 102–105?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Date with a Leading scorer with maurice williams (25), and a Score with 102–105?`: ```sql
SELECT "score" FROM "january" WHERE "home"='hornets';
## Task Generate a SQL query to answer the following question: `What is the Score with a Home with hornets?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Score with a Home with hornets?`: ```sql
SELECT "score" FROM "january" WHERE "visitor"='bucks' AND "leading_scorer"='maurice williams (25)';
## Task Generate a SQL query to answer the following question: `What is the Score with a Visitor of bucks, and a Leading scorer with maurice williams (25)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Score with a Visitor of bucks, and a Leading scorer with maurice williams (25)?`: ```sql
SELECT "record" FROM "january" WHERE "leading_scorer"='andrew bogut (29)';
## Task Generate a SQL query to answer the following question: `What is the Record with a Leading scorer with andrew bogut (29)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Record with a Leading scorer with andrew bogut (29)?`: ```sql
SELECT "record" FROM "january" WHERE "leading_scorer"='maurice williams (25)' AND "date"='27 january 2008';
## Task Generate a SQL query to answer the following question: `What is the Record with a Leading scorer with maurice williams (25), and a Date with 27 january 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Record with a Leading scorer with maurice williams (25), and a Date with 27 january 2008?`: ```sql
SELECT "record" FROM "january" WHERE "score"='80–87' AND "visitor"='bucks';
## Task Generate a SQL query to answer the following question: `What is the Record with a Score with 80–87, and a Visitor with bucks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Record with a Score with 80–87, and a Visitor with bucks?`: ```sql
SELECT "nationality" FROM "b" WHERE "player"='tom boswell';
## Task Generate a SQL query to answer the following question: `What is the nationality of the player Tom Boswell?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "b" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the player Tom Boswell?`: ```sql
SELECT "nationality" FROM "b" WHERE "school_club_team"='duke';
## Task Generate a SQL query to answer the following question: `What is the nationality of the player from Duke?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "b" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the player from Duke?`: ```sql
SELECT "position" FROM "b" WHERE "school_club_team"='florida international';
## Task Generate a SQL query to answer the following question: `What position did the player from Florida International play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "b" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position did the player from Florida International play?`: ```sql
SELECT "nationality" FROM "b" WHERE "school_club_team"='ucla';
## Task Generate a SQL query to answer the following question: `What is the nationality of the player from UCLA?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "b" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the player from UCLA?`: ```sql
SELECT AVG("attendance_g") FROM "record_as_j_league_member" WHERE "tms">18;
## Task Generate a SQL query to answer the following question: `What was Attendance/G with Tms more than 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "record_as_j_league_member" ( "season" real, "div" text, "tms" real, "pos" real, "attendance_g" real, "emperor_s_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Attendance/G with Tms more than 18?`: ```sql
SELECT COUNT("season") FROM "record_as_j_league_member" WHERE "emperor_s_cup"='3rd round' AND "div"='j1' AND "tms">18;
## Task Generate a SQL query to answer the following question: `How many seasons did the Div J1 have the Emperor's cup in the 3rd round with Tms of more than 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "record_as_j_league_member" ( "season" real, "div" text, "tms" real, "pos" real, "attendance_g" real, "emperor_s_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `How many seasons did the Div J1 have the Emperor's cup in the 3rd round with Tms of more than 18?`: ```sql
SELECT "chassis" FROM "teams_and_drivers" WHERE "entrant"='john mecom';
## Task Generate a SQL query to answer the following question: `Which chassis had an entrant of John Mecom?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Which chassis had an entrant of John Mecom?`: ```sql
SELECT "tyre" FROM "teams_and_drivers" WHERE "entrant"='ecurie nationale suisse';
## Task Generate a SQL query to answer the following question: `What tyre was used for an entrant of Ecurie Nationale Suisse?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `What tyre was used for an entrant of Ecurie Nationale Suisse?`: ```sql
SELECT "rounds" FROM "teams_and_drivers" WHERE "driver"='hap sharp';
## Task Generate a SQL query to answer the following question: `Which rounds was Hap Sharp a driver in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Which rounds was Hap Sharp a driver in?`: ```sql
SELECT SUM("year") FROM "drama" WHERE "title"='jotei';
## Task Generate a SQL query to answer the following question: `what is the year when the title is jotei?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drama" ( "year" real, "title" text, "original_channel" text, "role" text, "note" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the year when the title is jotei?`: ```sql
SELECT "original_channel" FROM "drama" WHERE "year"<2006 AND "note"='supporting';
## Task Generate a SQL query to answer the following question: `what is the original channel when the year is before 2006 and the note is supporting?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drama" ( "year" real, "title" text, "original_channel" text, "role" text, "note" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the original channel when the year is before 2006 and the note is supporting?`: ```sql
SELECT "original_channel" FROM "drama" WHERE "note"='co-star' AND "year"=2012;
## Task Generate a SQL query to answer the following question: `what is the original channel when the note is co-star in year 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drama" ( "year" real, "title" text, "original_channel" text, "role" text, "note" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the original channel when the note is co-star in year 2012?`: ```sql
SELECT "original_channel" FROM "drama" WHERE "year">2012;
## Task Generate a SQL query to answer the following question: `what is the original channel when the year is after 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drama" ( "year" real, "title" text, "original_channel" text, "role" text, "note" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the original channel when the year is after 2012?`: ```sql
SELECT "year" FROM "drama" WHERE "note"='supporting' AND "title"='rokumeikan';
## Task Generate a SQL query to answer the following question: `what is the year when the note is supporting and the title is rokumeikan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drama" ( "year" real, "title" text, "original_channel" text, "role" text, "note" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the year when the note is supporting and the title is rokumeikan?`: ```sql
SELECT "title" FROM "drama" WHERE "year">2011 AND "original_channel"='nhk';
## Task Generate a SQL query to answer the following question: `what is the title when the year is after 2011 and the original channel is nhk?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drama" ( "year" real, "title" text, "original_channel" text, "role" text, "note" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the title when the year is after 2011 and the original channel is nhk?`: ```sql
SELECT "circuit" FROM "season_review" WHERE "fastest_lap"='lorenzo bandini' AND "pole_position"='lorenzo bandini';
## Task Generate a SQL query to answer the following question: `On which circuit does lorenzo bandini have the fastest lap as well as the pole position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `On which circuit does lorenzo bandini have the fastest lap as well as the pole position?`: ```sql
SELECT "race" FROM "season_review" WHERE "pole_position"='jim clark' AND "circuit"='monaco';
## Task Generate a SQL query to answer the following question: `At what race does jim clark has a Pole position on the Circuit of monaco?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `At what race does jim clark has a Pole position on the Circuit of monaco?`: ```sql
SELECT "report" FROM "season_review" WHERE "circuit"='reims';
## Task Generate a SQL query to answer the following question: `Which Report is on the Circuit of reims?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Report is on the Circuit of reims?`: ```sql
SELECT "date" FROM "season_review" WHERE "circuit"='brands hatch';
## Task Generate a SQL query to answer the following question: `On what Date is there a race on the Circuit of brands hatch?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `On what Date is there a race on the Circuit of brands hatch?`: ```sql
SELECT "winning_driver" FROM "season_review" WHERE "fastest_lap"='lorenzo bandini' AND "pole_position"='lorenzo bandini';
## Task Generate a SQL query to answer the following question: `Who is the Winnning driver in which lorenzo bandini has the fastest lap as well as the Pole position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the Winnning driver in which lorenzo bandini has the fastest lap as well as the Pole position?`: ```sql
SELECT "date" FROM "season_review" WHERE "tyre"='d' AND "circuit"='monaco';
## Task Generate a SQL query to answer the following question: `On what date is there a Tryre of d at the Circuit of monaco?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date is there a Tryre of d at the Circuit of monaco?`: ```sql
SELECT "date" FROM "singles_17" WHERE "against"='morocco' AND "surface"='hard';
## Task Generate a SQL query to answer the following question: `What's the date that Morocco has an Against along with a surface of hard?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_17" ( "edition" text, "round" text, "date" text, "against" text, "surface" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the date that Morocco has an Against along with a surface of hard?`: ```sql
SELECT "round" FROM "singles_17" WHERE "surface"='hard' AND "opponent"='jelena simic';
## Task Generate a SQL query to answer the following question: `What's Round has a Surface of hard and Opponent of Jelena Simic?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_17" ( "edition" text, "round" text, "date" text, "against" text, "surface" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What's Round has a Surface of hard and Opponent of Jelena Simic?`: ```sql
SELECT "winning_driver" FROM "non_championship_race_results" WHERE "constructor"='ferrari' AND "race_name"='xv grand prix de l''albigeois';
## Task Generate a SQL query to answer the following question: `What driver won in the xv grand prix de l'albigeois in a vehicle by ferrari?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_race_results" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What driver won in the xv grand prix de l'albigeois in a vehicle by ferrari?`: ```sql
SELECT MAX("date") FROM "lms_coaches" WHERE "description"='br-built inspection saloon';
## Task Generate a SQL query to answer the following question: `What is the latest death with a description of BR-Built inspection saloon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lms_coaches" ( "number_name" text, "description" text, "current_status" text, "livery" text, "date" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the latest death with a description of BR-Built inspection saloon?`: ```sql
SELECT "number_name" FROM "lms_coaches" WHERE "description"='stanier (period iii) full brake';
## Task Generate a SQL query to answer the following question: `What is the identifying number for a description of Stanier (Period III) full brake?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lms_coaches" ( "number_name" text, "description" text, "current_status" text, "livery" text, "date" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the identifying number for a description of Stanier (Period III) full brake?`: ```sql
SELECT "date" FROM "lms_coaches" WHERE "number_name"='no. 37817';
## Task Generate a SQL query to answer the following question: `What is the date with identifying number of No. 37817?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lms_coaches" ( "number_name" text, "description" text, "current_status" text, "livery" text, "date" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the date with identifying number of No. 37817?`: ```sql
SELECT "release_date" FROM "formats" WHERE "release_format"='standard cd' AND "country"='north america';
## Task Generate a SQL query to answer the following question: `What is the release date for the standard cd release format in north america?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "formats" ( "release_format" text, "country" text, "label_s" text, "cat_no" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the release date for the standard cd release format in north america?`: ```sql
SELECT "cat_no" FROM "formats" WHERE "label_s"='mute' AND "release_format"='standard cd';
## Task Generate a SQL query to answer the following question: `What is the cat no for the label mute and the standard cd format?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "formats" ( "release_format" text, "country" text, "label_s" text, "cat_no" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the cat no for the label mute and the standard cd format?`: ```sql
SELECT COUNT("overall_rank") FROM "weekly_ratings" WHERE "rating_share_18_49"='4.5/11' AND "rating"<8.2;
## Task Generate a SQL query to answer the following question: `What is the overall rank with rating smaller than 8.2 and rating share of 4.5/11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekly_ratings" ( "episode" text, "air_date" text, "rating" real, "share" real, "rating_share_18_49" text, "viewers_m" real, "timeslot_rank" real, "night_rank" text, "overall_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the overall rank with rating smaller than 8.2 and rating share of 4.5/11?`: ```sql
SELECT AVG("rating") FROM "weekly_ratings" WHERE "night_rank"='11' AND "timeslot_rank">4;
## Task Generate a SQL query to answer the following question: `What is the rating for the episode with the night rank of 11 and timeslot rank is larger than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekly_ratings" ( "episode" text, "air_date" text, "rating" real, "share" real, "rating_share_18_49" text, "viewers_m" real, "timeslot_rank" real, "night_rank" text, "overall_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the rating for the episode with the night rank of 11 and timeslot rank is larger than 4?`: ```sql
SELECT MIN("share") FROM "weekly_ratings" WHERE "viewers_m"<8.78 AND "timeslot_rank"<4;
## Task Generate a SQL query to answer the following question: `What is the smallest share for a timeslot ranking less than 4 and fewer viewers than 8.78 million?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekly_ratings" ( "episode" text, "air_date" text, "rating" real, "share" real, "rating_share_18_49" text, "viewers_m" real, "timeslot_rank" real, "night_rank" text, "overall_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest share for a timeslot ranking less than 4 and fewer viewers than 8.78 million?`: ```sql
SELECT SUM("rating") FROM "weekly_ratings" WHERE "viewers_m"=13.47 AND "overall_rank">6;
## Task Generate a SQL query to answer the following question: `What is the rating of the episode with 13.47 million viewers and overall rank larger than 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekly_ratings" ( "episode" text, "air_date" text, "rating" real, "share" real, "rating_share_18_49" text, "viewers_m" real, "timeslot_rank" real, "night_rank" text, "overall_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the rating of the episode with 13.47 million viewers and overall rank larger than 6?`: ```sql
SELECT AVG("overall_rank") FROM "weekly_ratings" WHERE "share"=6 AND "timeslot_rank"<4;
## Task Generate a SQL query to answer the following question: `What is the rank of the episode with a share of 6 and timeslot rank smaller than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekly_ratings" ( "episode" text, "air_date" text, "rating" real, "share" real, "rating_share_18_49" text, "viewers_m" real, "timeslot_rank" real, "night_rank" text, "overall_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the rank of the episode with a share of 6 and timeslot rank smaller than 4?`: ```sql
SELECT "premierships" FROM "brisbane_based" WHERE "venue"='queensland raceway';
## Task Generate a SQL query to answer the following question: `How many premierships for the queensland raceway?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "brisbane_based" ( "club_team" text, "league" text, "venue" text, "established" real, "premierships" text ); ### SQL Given the database schema, here is the SQL query that answers `How many premierships for the queensland raceway?`: ```sql
SELECT "premierships" FROM "brisbane_based" WHERE "league"='commonwealth bank trophy';
## Task Generate a SQL query to answer the following question: `How many premierships for the commonwealth bank trophy league?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "brisbane_based" ( "club_team" text, "league" text, "venue" text, "established" real, "premierships" text ); ### SQL Given the database schema, here is the SQL query that answers `How many premierships for the commonwealth bank trophy league?`: ```sql
SELECT MAX("round") FROM "nfl_draft" WHERE "pick"=4;
## Task Generate a SQL query to answer the following question: `In which round was there a pick of 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "pick" real, "round" real, "player" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `In which round was there a pick of 4?`: ```sql
SELECT COUNT("round") FROM "nfl_draft" WHERE "position"='offensive tackle';
## Task Generate a SQL query to answer the following question: `How many rounds were there an offensive tackle position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "pick" real, "round" real, "player" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `How many rounds were there an offensive tackle position?`: ```sql
SELECT MAX("pick") FROM "nfl_draft" WHERE "player"='mike ford' AND "round">228;
## Task Generate a SQL query to answer the following question: `What was the pick number in round 228 for Mike Ford?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "pick" real, "round" real, "player" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the pick number in round 228 for Mike Ford?`: ```sql
SELECT "year" FROM "winners_of_the_moroccan_grand_prix" WHERE "driver"='e. meyer';
## Task Generate a SQL query to answer the following question: `What year was E. Meyer the driver?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_of_the_moroccan_grand_prix" ( "year" text, "driver" text, "constructor" text, "category" text, "location" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was E. Meyer the driver?`: ```sql
SELECT "driver" FROM "winners_of_the_moroccan_grand_prix" WHERE "constructor"='bugatti' AND "location"='anfa';
## Task Generate a SQL query to answer the following question: `What is the name of the driver of the vehicle constructed by Bugatti in Anfa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_of_the_moroccan_grand_prix" ( "year" text, "driver" text, "constructor" text, "category" text, "location" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the driver of the vehicle constructed by Bugatti in Anfa?`: ```sql
SELECT "constructor" FROM "winners_of_the_moroccan_grand_prix" WHERE "location"='not held' AND "year"='1933';
## Task Generate a SQL query to answer the following question: `What company constructed the vehicle in the location not held in 1933?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_of_the_moroccan_grand_prix" ( "year" text, "driver" text, "constructor" text, "category" text, "location" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What company constructed the vehicle in the location not held in 1933?`: ```sql
SELECT "constructor" FROM "winners_of_the_moroccan_grand_prix" WHERE "driver"='not held';
## Task Generate a SQL query to answer the following question: `What company constructed the vehicle when the driver shows as not held?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_of_the_moroccan_grand_prix" ( "year" text, "driver" text, "constructor" text, "category" text, "location" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What company constructed the vehicle when the driver shows as not held?`: ```sql
SELECT "driver" FROM "winners_of_the_moroccan_grand_prix" WHERE "year"='1955';
## Task Generate a SQL query to answer the following question: `What is the name of the driver in 1955?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_of_the_moroccan_grand_prix" ( "year" text, "driver" text, "constructor" text, "category" text, "location" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the driver in 1955?`: ```sql
SELECT "constructor" FROM "winners_of_the_moroccan_grand_prix" WHERE "report"='report' AND "year"='1955';
## Task Generate a SQL query to answer the following question: `What is the name of the constructor when report shows report in 1955?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_of_the_moroccan_grand_prix" ( "year" text, "driver" text, "constructor" text, "category" text, "location" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the constructor when report shows report in 1955?`: ```sql
SELECT "induction" FROM "engines_for_united_states_models" WHERE "years"='1975–1976';
## Task Generate a SQL query to answer the following question: `What is the inductioin for 1975–1976?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "engines_for_united_states_models" ( "generation" text, "years" text, "engine" text, "power" text, "torque" text, "induction" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the inductioin for 1975–1976?`: ```sql
SELECT "power" FROM "engines_for_united_states_models" WHERE "years"='1972';
## Task Generate a SQL query to answer the following question: `What is the power of an engine of 1972?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "engines_for_united_states_models" ( "generation" text, "years" text, "engine" text, "power" text, "torque" text, "induction" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the power of an engine of 1972?`: ```sql
SELECT "venue" FROM "round_3" WHERE "away_team"='richmond';
## Task Generate a SQL query to answer the following question: `In the game where richmond was the away team, what venue was it played at?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_3" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `In the game where richmond was the away team, what venue was it played at?`: ```sql
SELECT "date" FROM "round_3" WHERE "home_team"='fitzroy';
## Task Generate a SQL query to answer the following question: `On what date did the match where fitzroy was the home team occur?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_3" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date did the match where fitzroy was the home team occur?`: ```sql
SELECT "home_team_score" FROM "round_3" WHERE "away_team_score"='12.16 (88)';
## Task Generate a SQL query to answer the following question: `In the match where the away team scored 12.16 (88), who was the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_3" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `In the match where the away team scored 12.16 (88), who was the home team?`: ```sql
SELECT "away_team" FROM "round_3" WHERE "away_team_score"='17.15 (117)';
## Task Generate a SQL query to answer the following question: `What was the name of the away team had a score of 17.15 (117)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_3" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the name of the away team had a score of 17.15 (117)`: ```sql
SELECT AVG("crowd") FROM "round_3" WHERE "away_team_score"='16.16 (112)';
## Task Generate a SQL query to answer the following question: `On the match where the away team scored 16.16 (112) what was the crowd attendance?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_3" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On the match where the away team scored 16.16 (112) what was the crowd attendance?`: ```sql
SELECT MIN("apps") FROM "club_career_stats" WHERE "country"='honduras' AND "goals"<2 AND "team"='club deportivo victoria' AND "division">1;
## Task Generate a SQL query to answer the following question: `What is the smallest apps in Honduras with less than 2 goals for Club Deportivo Victoria in a division over 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "club_career_stats" ( "season" text, "team" text, "country" text, "division" real, "apps" real, "goals" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest apps in Honduras with less than 2 goals for Club Deportivo Victoria in a division over 1?`: ```sql
SELECT MAX("grid") FROM "race" WHERE "driver"='jacques villeneuve' AND "laps">36;
## Task Generate a SQL query to answer the following question: `What grid for jacques villeneuve with over 36 laps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What grid for jacques villeneuve with over 36 laps?`: ```sql
SELECT MIN("laps") FROM "race" WHERE "driver"='tarso marques';
## Task Generate a SQL query to answer the following question: `What were the lowest laps of Tarso Marques?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What were the lowest laps of Tarso Marques?`: ```sql
SELECT AVG("grid") FROM "race" WHERE "time_retired"='spun off' AND "laps">64;
## Task Generate a SQL query to answer the following question: `What's the average Grid for those who spun off after Lap 64?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the average Grid for those who spun off after Lap 64?`: ```sql
SELECT SUM("grid") FROM "race" WHERE "time_retired"='+ 1:33.141' AND "laps"<70;
## Task Generate a SQL query to answer the following question: `What is the grid total that has a Time/Retired of + 1:33.141, and under 70 laps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the grid total that has a Time/Retired of + 1:33.141, and under 70 laps?`: ```sql
SELECT MAX("laps") FROM "race" WHERE "constructor"='tyrrell - yamaha' AND "time_retired"='+ 1 lap';
## Task Generate a SQL query to answer the following question: `What is the high lap total for tyrrell - yamaha, and a Time/Retired of + 1 lap?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the high lap total for tyrrell - yamaha, and a Time/Retired of + 1 lap?`: ```sql
SELECT MIN("laps") FROM "race" WHERE "grid"=14;
## Task Generate a SQL query to answer the following question: `What is the low lap total for a grid of 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the low lap total for a grid of 14?`: ```sql
SELECT COUNT("laps") FROM "race" WHERE "driver"='martin brundle' AND "grid"<10;
## Task Generate a SQL query to answer the following question: `How many laps for martin brundle with a grid of less than 10?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `How many laps for martin brundle with a grid of less than 10?`: ```sql
SELECT AVG("points") FROM "league_and_cup_history" WHERE "domestic_cup"='quarterfinals';
## Task Generate a SQL query to answer the following question: `What was the average points in the quarterfinals domestic cup?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_and_cup_history" ( "season" text, "level" text, "goals" text, "points" real, "domestic_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the average points in the quarterfinals domestic cup?`: ```sql
SELECT "level" FROM "league_and_cup_history" WHERE "domestic_cup"='quarterfinals';
## Task Generate a SQL query to answer the following question: `Which level is quarterfinals domestic cup?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_and_cup_history" ( "season" text, "level" text, "goals" text, "points" real, "domestic_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `Which level is quarterfinals domestic cup?`: ```sql
SELECT "format" FROM "release_history" WHERE "catalogue"='148615';
## Task Generate a SQL query to answer the following question: `What format is catalogue 148615 in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalogue" text ); ### SQL Given the database schema, here is the SQL query that answers `What format is catalogue 148615 in?`: ```sql
SELECT "region" FROM "release_history" WHERE "date"='june 8, 2004';
## Task Generate a SQL query to answer the following question: `Which region was on June 8, 2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalogue" text ); ### SQL Given the database schema, here is the SQL query that answers `Which region was on June 8, 2004?`: ```sql
SELECT "format" FROM "release_history" WHERE "catalogue"='wpcr13504';
## Task Generate a SQL query to answer the following question: `What format is catalogue WPCR13504 in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalogue" text ); ### SQL Given the database schema, here is the SQL query that answers `What format is catalogue WPCR13504 in?`: ```sql
SELECT "format" FROM "release_history" WHERE "catalogue"='9362486152' AND "region"='australia';
## Task Generate a SQL query to answer the following question: `What format is the Catalogue 9362486152 from the region of Australia in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalogue" text ); ### SQL Given the database schema, here is the SQL query that answers `What format is the Catalogue 9362486152 from the region of Australia in?`: ```sql
SELECT "region" FROM "release_history" WHERE "catalogue"='9362486152' AND "date"='september 3, 2004';
## Task Generate a SQL query to answer the following question: `What region is the catalogue number 9362486152 that was from September 3, 2004 from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalogue" text ); ### SQL Given the database schema, here is the SQL query that answers `What region is the catalogue number 9362486152 that was from September 3, 2004 from?`: ```sql
SELECT "region" FROM "release_history" WHERE "date"='june 8, 2004';
## Task Generate a SQL query to answer the following question: `What region is the catalogue released on June 8, 2004 from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalogue" text ); ### SQL Given the database schema, here is the SQL query that answers `What region is the catalogue released on June 8, 2004 from?`: ```sql
SELECT "date" FROM "round_4" WHERE "home_team"='carlton';
## Task Generate a SQL query to answer the following question: `What day is carlton the home side?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_4" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What day is carlton the home side?`: ```sql
SELECT "away_team_score" FROM "round_4" WHERE "home_team_score"='14.18 (102)';
## Task Generate a SQL query to answer the following question: `What is the away team's score when the Home team score is 14.18 (102)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_4" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the away team's score when the Home team score is 14.18 (102)?`: ```sql
SELECT "home_team_score" FROM "round_4" WHERE "away_team"='south melbourne';
## Task Generate a SQL query to answer the following question: `What is the home team's score when south melbourne is away?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_4" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the home team's score when south melbourne is away?`: ```sql
SELECT "date" FROM "round_4" WHERE "home_team_score"='13.13 (91)';
## Task Generate a SQL query to answer the following question: `What day does the home side score 13.13 (91)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_4" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What day does the home side score 13.13 (91)?`: ```sql
SELECT "listed" FROM "superfund_sites" WHERE "cerclis_id"='msd004006995';
## Task Generate a SQL query to answer the following question: `Tell me the listed when cerclis id is msd004006995` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "superfund_sites" ( "cerclis_id" text, "name" text, "county" text, "proposed" text, "listed" text, "construction_completed" text, "partially_deleted" text, "deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the listed when cerclis id is msd004006995`: ```sql
SELECT AVG("rank_timeslot") FROM "the_biggest_loser_u_s_tv_series" WHERE "rating">2.9 AND "rating_share_18_49"='2.6/8' AND "rank_night">5;
## Task Generate a SQL query to answer the following question: `What is the timeslor rank for the episode with larger than 2.9 rating, rating/share of 2.6/8 and rank for the night higher than 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_biggest_loser_u_s_tv_series" ( "episode" real, "rating" real, "share" real, "rating_share_18_49" text, "rank_timeslot" real, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the timeslor rank for the episode with larger than 2.9 rating, rating/share of 2.6/8 and rank for the night higher than 5?`: ```sql
SELECT MIN("rating") FROM "the_biggest_loser_u_s_tv_series" WHERE "rank_night"<7 AND "rank_timeslot"<5 AND "episode">6;
## Task Generate a SQL query to answer the following question: `What is the smallest rating with nightly rank smaller than 7, timeslot rank smaller than 5 and eposide after episode 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_biggest_loser_u_s_tv_series" ( "episode" real, "rating" real, "share" real, "rating_share_18_49" text, "rank_timeslot" real, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest rating with nightly rank smaller than 7, timeslot rank smaller than 5 and eposide after episode 6?`: ```sql
SELECT MIN("rank_night") FROM "the_biggest_loser_u_s_tv_series" WHERE "rating_share_18_49"='2.6/8' AND "episode">1;
## Task Generate a SQL query to answer the following question: `What is the lowest nightly rank for an episode after episode 1 with a rating/share of 2.6/8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_biggest_loser_u_s_tv_series" ( "episode" real, "rating" real, "share" real, "rating_share_18_49" text, "rank_timeslot" real, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest nightly rank for an episode after episode 1 with a rating/share of 2.6/8?`: ```sql
SELECT AVG("rank_timeslot") FROM "the_biggest_loser_u_s_tv_series" WHERE "rating"<2.6 AND "share">4;
## Task Generate a SQL query to answer the following question: `What is the timeslot rank when the rating is smaller than 2.6 and the share is more than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_biggest_loser_u_s_tv_series" ( "episode" real, "rating" real, "share" real, "rating_share_18_49" text, "rank_timeslot" real, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the timeslot rank when the rating is smaller than 2.6 and the share is more than 4?`: ```sql
SELECT MIN("rank_timeslot") FROM "the_biggest_loser_u_s_tv_series" WHERE "rating"<2.6;
## Task Generate a SQL query to answer the following question: `What is the smallest timeslot rank when the rating is smaller than 2.6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_biggest_loser_u_s_tv_series" ( "episode" real, "rating" real, "share" real, "rating_share_18_49" text, "rank_timeslot" real, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest timeslot rank when the rating is smaller than 2.6?`: ```sql
SELECT "away_team" FROM "round_8" WHERE "venue"='kardinia park';
## Task Generate a SQL query to answer the following question: `What away team played at Kardinia Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_8" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What away team played at Kardinia Park?`: ```sql
SELECT "away_team" FROM "round_8" WHERE "home_team"='hawthorn';
## Task Generate a SQL query to answer the following question: `What team played Hawthorn?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_8" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What team played Hawthorn?`: ```sql
SELECT SUM("wins") FROM "final_standing" WHERE "goals_against"<21;
## Task Generate a SQL query to answer the following question: `What is the total wins with less than 21 goals taken?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_standing" ( "team" text, "games_played" real, "wins" real, "losses" real, "ties" real, "goals_for" real, "goals_against" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total wins with less than 21 goals taken?`: ```sql
SELECT "date" FROM "game_log" WHERE "game"=59;
## Task Generate a SQL query to answer the following question: `What is the date of game 59?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of game 59?`: ```sql
SELECT "player" FROM "2007_rugby_world_cup_squads" WHERE "position"='lock' AND "caps"=1;
## Task Generate a SQL query to answer the following question: `What player is a lock with 1 cap?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007_rugby_world_cup_squads" ( "player" text, "position" text, "date_of_birth_age" text, "caps" real, "club_province" text ); ### SQL Given the database schema, here is the SQL query that answers `What player is a lock with 1 cap?`: ```sql
SELECT "position" FROM "2007_rugby_world_cup_squads" WHERE "club_province"='newport gwent dragons' AND "caps"<87 AND "player"='ceri sweeney';
## Task Generate a SQL query to answer the following question: `What position does ceri sweeney with under 87 caps of the newport gwent dragons play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007_rugby_world_cup_squads" ( "player" text, "position" text, "date_of_birth_age" text, "caps" real, "club_province" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does ceri sweeney with under 87 caps of the newport gwent dragons play?`: ```sql
SELECT "player" FROM "2007_rugby_world_cup_squads" WHERE "caps"=12;
## Task Generate a SQL query to answer the following question: `What player has 12 caps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007_rugby_world_cup_squads" ( "player" text, "position" text, "date_of_birth_age" text, "caps" real, "club_province" text ); ### SQL Given the database schema, here is the SQL query that answers `What player has 12 caps?`: ```sql
SELECT "shuji_kondo" FROM "2008" WHERE "mazada"='x' AND "ryuji_hijikata"='hijikata (14:24)';
## Task Generate a SQL query to answer the following question: `Tell me the Shuji Kondo for MAZADA of X with Ryuji Hijikata of hijikata (14:24)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "block_a" text, "ryuji_hijikata" text, "shuji_kondo" text, "mazada" text, "el_samurai" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the Shuji Kondo for MAZADA of X with Ryuji Hijikata of hijikata (14:24)`: ```sql
SELECT "el_samurai" FROM "2008" WHERE "mazada"='x' AND "ryuji_hijikata"='draw (30:00)';
## Task Generate a SQL query to answer the following question: `Name the El samurai with MAZADA of x for Ryuji Hijikata of draw (30:00)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "block_a" text, "ryuji_hijikata" text, "shuji_kondo" text, "mazada" text, "el_samurai" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the El samurai with MAZADA of x for Ryuji Hijikata of draw (30:00)`: ```sql
SELECT "mazada" FROM "2008" WHERE "el_samurai"='mazada (16:22)';
## Task Generate a SQL query to answer the following question: `Name the MAZADA for El Samurai of mazada (16:22)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "block_a" text, "ryuji_hijikata" text, "shuji_kondo" text, "mazada" text, "el_samurai" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the MAZADA for El Samurai of mazada (16:22)`: ```sql
SELECT "shuji_kondo" FROM "2008" WHERE "mazada"='hijikata (14:24)';
## Task Generate a SQL query to answer the following question: `Name the Shuji Kondo for MAZADA of hijikata (14:24)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "block_a" text, "ryuji_hijikata" text, "shuji_kondo" text, "mazada" text, "el_samurai" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the Shuji Kondo for MAZADA of hijikata (14:24)`: ```sql
SELECT SUM("withdrawn") FROM "br_railbuses" WHERE "builder"='ac cars' AND "introduced"<1958;
## Task Generate a SQL query to answer the following question: `when was the building withdrawn when the builder was ac cars and was introduced before 1958?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "br_railbuses" ( "number_range" text, "builder" text, "introduced" real, "no_built" real, "region" text, "withdrawn" real ); ### SQL Given the database schema, here is the SQL query that answers `when was the building withdrawn when the builder was ac cars and was introduced before 1958?`: ```sql
SELECT "decision" FROM "october" WHERE "date"='october 5';
## Task Generate a SQL query to answer the following question: `What was the decision on october 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "october" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the decision on october 5?`: ```sql