output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT AVG("total") FROM "performance_by_nation" WHERE "gold"<1 AND "rank"<5; |
## Task
Generate a SQL query to answer the following question:
`Name the average total for gold less than 1 and rank less than 5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"... |
SELECT SUM("silver") FROM "performance_by_nation" WHERE "total">1 AND "bronze"=1 AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of silver when total is mor ethan 1, bronze is 1 and gold is les than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_nation" (
"rank" real,
"gold" real,
... |
SELECT MAX("gold") FROM "performance_by_nation" WHERE "bronze">0 AND "rank">5 AND "total">2; |
## Task
Generate a SQL query to answer the following question:
`Name the most gold when bronze is more than 0 and rank is more than 5 with total more than 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_nation" (
"rank" real,
"gold... |
SELECT AVG("bronze") FROM "performance_by_nation" WHERE "silver">0 AND "total"=6 AND "gold">0; |
## Task
Generate a SQL query to answer the following question:
`Name the average bronze with silver more than 0, total of 6 and gold more than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_nation" (
"rank" real,
"gold" real,
"s... |
SELECT SUM("total") FROM "performance_by_nation" WHERE "gold">1 AND "bronze">0; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of total with gold more than 1 and bronze more than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_by_nation" (
"rank" real,
"gold" real,
"silver" real,
... |
SELECT "country" FROM "2005" WHERE "director_s"='jonas geirnaert'; |
## Task
Generate a SQL query to answer the following question:
`What country did Jonas Geirnaert direct a film in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"category" text,
"film" text,
"director_s" text,
"country" text,
"nomin... |
SELECT "nominating_festival" FROM "2005" WHERE "country"='germany'; |
## Task
Generate a SQL query to answer the following question:
`What Nominating Festival took place in Germany?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"category" text,
"film" text,
"director_s" text,
"country" text,
"nominati... |
SELECT "category" FROM "2005" WHERE "country"='switzerland'; |
## Task
Generate a SQL query to answer the following question:
`What is the category of the film made in Switzerland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"category" text,
"film" text,
"director_s" text,
"country" text,
"no... |
SELECT "film" FROM "2005" WHERE "director_s"='sandro aguilar'; |
## Task
Generate a SQL query to answer the following question:
`What film was directed by Sandro Aguilar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"category" text,
"film" text,
"director_s" text,
"country" text,
"nominating_fes... |
SELECT "language" FROM "language" WHERE "number"='14'; |
## Task
Generate a SQL query to answer the following question:
`Name the language that has number of 14`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "language" (
"language" text,
"number" text,
"percentage_pct" text,
"males" text,
"females"... |
SELECT "number" FROM "language" WHERE "language"='other'; |
## Task
Generate a SQL query to answer the following question:
`Name the number which has language of other`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "language" (
"language" text,
"number" text,
"percentage_pct" text,
"males" text,
"fema... |
SELECT AVG("goals_for") FROM "final_table" WHERE "losses"=19 AND "goals_against">59; |
## Task
Generate a SQL query to answer the following question:
`Tell me the average goals for losses of 19 and goals against more than 59`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"club" text,
"played" real,
... |
SELECT AVG("position") FROM "final_table" WHERE "goals_against">42 AND "goals_for"=44 AND "draws"<16; |
## Task
Generate a SQL query to answer the following question:
`Name the average position when the goals against are more than 42 and draws less than 16 with goals of 44`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
... |
SELECT "regular_season" FROM "year_by_year" WHERE "year"=2013; |
## Task
Generate a SQL query to answer the following question:
`Which regular season was 2013 in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"league" text,
"regular_season" text,
"playoffs" t... |
SELECT COUNT("year") FROM "year_by_year" WHERE "playoffs"='conference semifinals'; |
## Task
Generate a SQL query to answer the following question:
`What year did the team make conference semifinals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"league" text,
"regular_season" tex... |
SELECT "subdivision_name" FROM "list_of_the_50_largest_country_subdivisi" WHERE "rank"<24 AND "area_km">'1,420,968' AND "country"='denmark'; |
## Task
Generate a SQL query to answer the following question:
`What's the name of a subdivision in Denmark ranked less than 24 with an area greater than 1,420,968?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_the_50_largest_country_subdivis... |
SELECT MIN("area_km") FROM "list_of_the_50_largest_country_subdivisi" WHERE "country"='russia' AND "rank"=23 AND "population">'522,800'; |
## Task
Generate a SQL query to answer the following question:
`What's the smallest area in Russia that is ranked 23 with a population more than 522,800?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_the_50_largest_country_subdivisi" (
"ran... |
SELECT "record" FROM "game_log" WHERE "date"='june 8'; |
## Task
Generate a SQL query to answer the following question:
`On the date of June 8 what was the record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
#... |
SELECT "score" FROM "game_log" WHERE "date"='june 15'; |
## Task
Generate a SQL query to answer the following question:
`On the date of June 15 what was the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
#... |
SELECT "college_junior_club_team" FROM "round_seven" WHERE "nhl_team"='toronto maple leafs' AND "nationality"='united states'; |
## Task
Generate a SQL query to answer the following question:
`What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_seven" (
"pick_num" text,
"... |
SELECT "college_junior_club_team" FROM "round_seven" WHERE "nhl_team"='new york rangers' AND "position"='defence'; |
## Task
Generate a SQL query to answer the following question:
`What is the college/junior/club team of the defence player drafted by the New York Rangers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_seven" (
"pick_num" text,
"player" tex... |
SELECT "rank" FROM "complete_american_le_mans_series_results" WHERE "chassis"='cadillac northstar lmp02'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of the cadillac northstar lmp02 chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" real,
"entrant" text,
"cl... |
SELECT "entrant" FROM "complete_american_le_mans_series_results" WHERE "engine"='audi 3.6l turbo v8' AND "rank"='3rd' AND "points"=163; |
## Task
Generate a SQL query to answer the following question:
`What is the entrant for the audi 3.6l turbo v8 engine and ranked 3rd with 163 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" r... |
SELECT "rank" FROM "complete_american_le_mans_series_results" WHERE "points">123 AND "chassis"='audi r8' AND "class"='lmp900'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank with more than 123 points, an audi r8 chassis, and a lmp900 class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" rea... |
SELECT "engine" FROM "complete_american_le_mans_series_results" WHERE "year"<2004 AND "entrant"='bmw motorsport' AND "points"=123; |
## Task
Generate a SQL query to answer the following question:
`What is the engine for the bmw motorsport entrant with 123 points before 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" real,
... |
SELECT "points" FROM "bt_global_challenge_2000_1" WHERE "combined_elapsed_time"='175d 20h 46m 04s'; |
## Task
Generate a SQL query to answer the following question:
`Which points have a Combined elapsed time of 175d 20h 46m 04s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bt_global_challenge_2000_1" (
"overall_place" text,
"yacht_name" text,
... |
SELECT "yacht_name" FROM "bt_global_challenge_2000_1" WHERE "combined_elapsed_time"='179d 11h 58m 14s'; |
## Task
Generate a SQL query to answer the following question:
`Which yacht name has a Combined elapsed time of 179d 11h 58m 14s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bt_global_challenge_2000_1" (
"overall_place" text,
"yacht_name" text,... |
SELECT "skipper" FROM "bt_global_challenge_2000_1" WHERE "points"='78'; |
## Task
Generate a SQL query to answer the following question:
`Which skipper has 78 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bt_global_challenge_2000_1" (
"overall_place" text,
"yacht_name" text,
"skipper" text,
"points" text,
... |
SELECT "points" FROM "bt_global_challenge_2000_1" WHERE "overall_place"='9=' AND "skipper"='nick fenton'; |
## Task
Generate a SQL query to answer the following question:
`Which points have an Overall place of 9=, and a Skipper of nick fenton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bt_global_challenge_2000_1" (
"overall_place" text,
"yacht_name"... |
SELECT "overall_place" FROM "bt_global_challenge_2000_1" WHERE "yacht_name"='lg flatron'; |
## Task
Generate a SQL query to answer the following question:
`Which Overall place has a Yacht name of lg flatron?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bt_global_challenge_2000_1" (
"overall_place" text,
"yacht_name" text,
"skipper" t... |
SELECT "combined_elapsed_time" FROM "bt_global_challenge_2000_1" WHERE "skipper"='stephen wilkins'; |
## Task
Generate a SQL query to answer the following question:
`Which Combined elapsed time has a Skipper of stephen wilkins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bt_global_challenge_2000_1" (
"overall_place" text,
"yacht_name" text,
"... |
SELECT MIN("points") FROM "complete_formula_one_results" WHERE "entrant"='coloni spa' AND "year"<1988; |
## Task
Generate a SQL query to answer the following question:
`Before the year 1988, what is the lowest number of points that entrant Coloni SpA scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"... |
SELECT "chassis" FROM "complete_formula_one_results" WHERE "points"=0 AND "entrant"='automobiles gonfaronnaises sportives'; |
## Task
Generate a SQL query to answer the following question:
`Which chassis used by the entrant Automobiles Gonfaronnaises Sportives scored 0 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"en... |
SELECT "entrant" FROM "complete_formula_one_results" WHERE "year"<1988; |
## Task
Generate a SQL query to answer the following question:
`Who was the entrant before 1988?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"poin... |
SELECT "engine" FROM "complete_formula_one_results" WHERE "year"=1987; |
## Task
Generate a SQL query to answer the following question:
`Which engine was used in 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points... |
SELECT "league" FROM "year_by_year" WHERE "year"=2001; |
## Task
Generate a SQL query to answer the following question:
`What league did they play in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"league" text,
"reg_season" text,
"playoffs" text... |
SELECT "open_cup" FROM "year_by_year" WHERE "reg_season"='2nd, northeast'; |
## Task
Generate a SQL query to answer the following question:
`What open cup did they play in when they finished 2nd, northeast in the reg. season?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" text,
"le... |
SELECT COUNT("week") FROM "schedule" WHERE "date"='october 9, 1983' AND "attendance"<'40,492'; |
## Task
Generate a SQL query to answer the following question:
`What is the week with a date of October 9, 1983, and attendance smaller than 40,492?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" ... |
SELECT MIN("attendance") FROM "schedule" WHERE "week"=14; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest attendance with week 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" rea... |
SELECT "game_site" FROM "schedule" WHERE "week"=12; |
## Task
Generate a SQL query to answer the following question:
`Where did the Oakland Raiders play in week 12 of their 1976 season?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"opponent" text,
"result" text,
"game_s... |
SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "entrant"='barclay nordica arrows bmw' AND "engine"='cosworth v8'; |
## Task
Generate a SQL query to answer the following question:
`How many years did Barclay Nordica Arrows BMW enter with Cosworth v8 engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"e... |
SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='bmw str-4 t/c' AND "entrant"='barclay nordica arrows bmw' AND "points"<1; |
## Task
Generate a SQL query to answer the following question:
`How many years did barclay nordica arrows bmw enter with a bmw str-4 t/c engine with less than 1 point?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_champions... |
SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "points"=4 AND "chassis"='ensign n180b'; |
## Task
Generate a SQL query to answer the following question:
`How many years was ensign n180b a Chassis with 4 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"cha... |
SELECT "division_record" FROM "2011_regular_season_football_standings" WHERE "team"='indians'; |
## Task
Generate a SQL query to answer the following question:
`What is the division record for the Indians?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" t... |
SELECT "overall_record" FROM "2011_regular_season_football_standings" WHERE "school"='indian river'; |
## Task
Generate a SQL query to answer the following question:
`What is the overall record of Indian River?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" te... |
SELECT "season_outcome" FROM "2011_regular_season_football_standings" WHERE "school"='lake forest'; |
## Task
Generate a SQL query to answer the following question:
`What was the season outcome of Lake Forest?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" te... |
SELECT COUNT("decile") FROM "kawerau_district" WHERE "gender"='coed'; |
## Task
Generate a SQL query to answer the following question:
`How many Deciles are coed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kawerau_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile"... |
SELECT MIN("decile") FROM "kawerau_district" WHERE "gender"='coed'; |
## Task
Generate a SQL query to answer the following question:
`Which is the lowest Decile that is coed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kawerau_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" te... |
SELECT "years" FROM "kawerau_district" WHERE "name"='kawerau putauaki school'; |
## Task
Generate a SQL query to answer the following question:
`What are the years for Kawerau Putauaki School?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kawerau_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"author... |
SELECT "round_race" FROM "calendar" WHERE "winning_driver"='charles hollings' AND "pole_position"='charles hollings'; |
## Task
Generate a SQL query to answer the following question:
`What is the round or race of the winning driver Charles Hollings and what was his pole position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"round_race" text,
"circuit... |
SELECT MIN("year") FROM "achievements" WHERE "performance"='long jump' AND "competition"='world indoor championships' AND "position"='5th'; |
## Task
Generate a SQL query to answer the following question:
`What was the earliest year in which long jump was performed in the world indoor Championships in 5th position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real... |
SELECT MAX("year") FROM "achievements" WHERE "position"='4th' AND "venue"='budapest, hungary'; |
## Task
Generate a SQL query to answer the following question:
`What was the latest year in which she took 4th position in Budapest, Hungary?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue"... |
SELECT "name" FROM "apollo_astronauts_who_walked_on_the_moon" WHERE "mission"='apollo 16' AND "age_at_first_step"='36y 6m 18d'; |
## Task
Generate a SQL query to answer the following question:
`Which astronaut went on the Apollo 16 mission at the age of 36y 6m 18d to step on the moon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_walked_on_the_moon" (
"n... |
SELECT "mission" FROM "apollo_astronauts_who_walked_on_the_moon" WHERE "name"='david scott'; |
## Task
Generate a SQL query to answer the following question:
`David Scott went on which mission?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_walked_on_the_moon" (
"name" text,
"born" text,
"age_at_first_step" text,
"... |
SELECT "service" FROM "apollo_astronauts_who_walked_on_the_moon" WHERE "age_at_first_step"='37y 8m 4d'; |
## Task
Generate a SQL query to answer the following question:
`The astronaut who was 37y 8m 4d when making a first step on the moon was in which service?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_walked_on_the_moon" (
"na... |
SELECT "lunar_eva_dates" FROM "apollo_astronauts_who_walked_on_the_moon" WHERE "mission"='apollo 12' AND "name"='pete conrad'; |
## Task
Generate a SQL query to answer the following question:
`Pete Conrad was on the Apollo 12 mission but also had what Lunar EVA dates?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_walked_on_the_moon" (
"name" text,
"bo... |
SELECT "born" FROM "apollo_astronauts_who_walked_on_the_moon" WHERE "age_at_first_step"='38y 9m 7d'; |
## Task
Generate a SQL query to answer the following question:
`The Apollo astronaut who was 38y 9m 7d when first stepping on the moon is who?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "apollo_astronauts_who_walked_on_the_moon" (
"name" text,
... |
SELECT "class" FROM "complete_american_le_mans_series_results" WHERE "year"<2011 AND "chassis"='audi r15 tdi'; |
## Task
Generate a SQL query to answer the following question:
`Which class has a year prior to 2011 and audi r15 tdi as the chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" real,
"entrant"... |
SELECT "engine" FROM "complete_american_le_mans_series_results" WHERE "year">2006 AND "points"='60'; |
## Task
Generate a SQL query to answer the following question:
`Which engine has a year later than 2006 and 60 as the points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" real,
"entrant" text,
... |
SELECT COUNT("year") FROM "complete_american_le_mans_series_results" WHERE "engine"='audi 3.6l turbo v8' AND "rank"='1st' AND "chassis"='audi r8r'; |
## Task
Generate a SQL query to answer the following question:
`How many years has an engine of audi 3.6l turbo v8 and 1st as the rank with an audi r8r as the chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_res... |
SELECT "entrant" FROM "complete_american_le_mans_series_results" WHERE "rank"='25th'; |
## Task
Generate a SQL query to answer the following question:
`Which entrant has 25th as the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_american_le_mans_series_results" (
"year" real,
"entrant" text,
"class" text,
"chassis"... |
SELECT AVG("year_won") FROM "missed_the_cut" WHERE "player"='rich beem' AND "to_par"<17; |
## Task
Generate a SQL query to answer the following question:
`What is the average year Rich Beem had a to par less than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won" real,
"tot... |
SELECT MIN("year_won") FROM "missed_the_cut" WHERE "total">156; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year won with a total bigger than 156?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won" real,
"total... |
SELECT COUNT("total") FROM "missed_the_cut" WHERE "year_won"<2002 AND "player"='bob tway' AND "to_par">7; |
## Task
Generate a SQL query to answer the following question:
`What is the total for Bob Tway for the year won before 2002 with a to par bigger than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text... |
SELECT COUNT("to_par") FROM "missed_the_cut" WHERE "country"='united states' AND "year_won">1986 AND "player"='paul azinger' AND "total">145; |
## Task
Generate a SQL query to answer the following question:
`What is the to par for Paul Azinger from the United States after 1986 for a total bigger than 145?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"cou... |
SELECT MIN("year_won") FROM "missed_the_cut" WHERE "player"='paul azinger' AND "to_par">5; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year won Paul Azinger had with a to par higher than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won... |
SELECT COUNT("year_won") FROM "missed_the_cut" WHERE "country"='australia' AND "to_par">16; |
## Task
Generate a SQL query to answer the following question:
`What is the year won by Australia with a to par bigger than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_won" real,
"t... |
SELECT "lifespan" FROM "references" WHERE "representative"='theodore f. kluttz'; |
## Task
Generate a SQL query to answer the following question:
`What is the Lifespan when the Representative is Theodore F. Kluttz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"representative" text,
"years" text,
"state" text,
... |
SELECT "week" FROM "schedule" WHERE "result"='l 35–37'; |
## Task
Generate a SQL query to answer the following question:
`What week's game had a result of l 35–37?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"opponent" text,
"result" text,
"game_site" text,
"attendance" ... |
SELECT "year" FROM "complete_formula_one_world_championship_" WHERE "entrant"='trio brdeact wind allass'; |
## Task
Generate a SQL query to answer the following question:
`What year was trio brdeact wind allass the entrant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis"... |
SELECT SUM("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 500f'; |
## Task
Generate a SQL query to answer the following question:
`What is the year when kurtis kraft 500f was the chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"cha... |
SELECT MIN("year") FROM "complete_formula_one_world_championship_" WHERE "points">0; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year when the points were more than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"... |
SELECT "name" FROM "clutha_district" WHERE "area"='balclutha' AND "decile"<7 AND "roll">186; |
## Task
Generate a SQL query to answer the following question:
`What's the school name in Balclutha that has a Decile of 7 and a roll larger than 186?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clutha_district" (
"name" text,
"years" text,
"... |
SELECT "name" FROM "clutha_district" WHERE "area"='balclutha' AND "roll"<55; |
## Task
Generate a SQL query to answer the following question:
`Which school in Balclutha has a roll smaller than 55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clutha_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"a... |
SELECT "date" FROM "edmonton_oilers_4_winnipeg_jets_1" WHERE "home"='winnipeg jets' AND "score"='4–6'; |
## Task
Generate a SQL query to answer the following question:
`When has winnipeg jets with a Score of 4–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "edmonton_oilers_4_winnipeg_jets_1" (
"date" text,
"visitor" text,
"score" text,
"home" t... |
SELECT "date" FROM "edmonton_oilers_4_winnipeg_jets_1" WHERE "home"='edmonton oilers'; |
## Task
Generate a SQL query to answer the following question:
`When is Edmonton Oilers in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "edmonton_oilers_4_winnipeg_jets_1" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" ... |
SELECT "score" FROM "edmonton_oilers_4_winnipeg_jets_1" WHERE "visitor"='winnipeg jets' AND "date"='april 7'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score that has a Winnipeg Jets as Visitor on april 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "edmonton_oilers_4_winnipeg_jets_1" (
"date" text,
"visitor" text,
"s... |
SELECT "score" FROM "edmonton_oilers_4_winnipeg_jets_1" WHERE "date"='april 6'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score on April 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "edmonton_oilers_4_winnipeg_jets_1" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record... |
SELECT "date" FROM "edmonton_oilers_4_winnipeg_jets_1" WHERE "record"='1–0'; |
## Task
Generate a SQL query to answer the following question:
`When has a Record of 1–0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "edmonton_oilers_4_winnipeg_jets_1" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" te... |
SELECT "llws" FROM "llws_results" WHERE "year"=2003; |
## Task
Generate a SQL query to answer the following question:
`What is the LLWS when the Year is 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "llws_results" (
"year" real,
"champion" text,
"city" text,
"llws" text,
"record" text
);
#... |
SELECT MIN("year") FROM "llws_results" WHERE "city"='peabody'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest Year when the City is Peabody?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "llws_results" (
"year" real,
"champion" text,
"city" text,
"llws" text,
"recor... |
SELECT COUNT("year") FROM "llws_results" WHERE "llws"='4th place' AND "city"='westport'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Years when the LLWS is 4th place, and when the City is Westport?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "llws_results" (
"year" real,
"champion" tex... |
SELECT "team" FROM "personnel_and_kits" WHERE "kit_manufacturer"='pony' AND "captain"='gary mabbutt'; |
## Task
Generate a SQL query to answer the following question:
`What team has Pony as the kit manufacturer and Gary Mabbutt as the captain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "personnel_and_kits" (
"team" text,
"manager_1" text,
"capt... |
SELECT "manager_1" FROM "personnel_and_kits" WHERE "team"='leeds united'; |
## Task
Generate a SQL query to answer the following question:
`Who is the manager 1 for Leeds United?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "personnel_and_kits" (
"team" text,
"manager_1" text,
"captain" text,
"kit_manufacturer" text,... |
SELECT "team" FROM "personnel_and_kits" WHERE "kit_manufacturer"='pony' AND "captain"='julian dicks'; |
## Task
Generate a SQL query to answer the following question:
`What is the team with a Pony kit manufacturer and Julian Dicks as the captain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "personnel_and_kits" (
"team" text,
"manager_1" text,
"c... |
SELECT "team" FROM "personnel_and_kits" WHERE "kit_manufacturer"='umbro' AND "captain"='eric cantona'; |
## Task
Generate a SQL query to answer the following question:
`What team has a kit manufacturer of Umbro and Eric Cantona as captain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "personnel_and_kits" (
"team" text,
"manager_1" text,
"captain" ... |
SELECT "manager_1" FROM "personnel_and_kits" WHERE "kit_manufacturer"='puma' AND "shirt_sponsor"='puma'; |
## Task
Generate a SQL query to answer the following question:
`Who is the manager 1 with Puma as the kit manufacturer and Puma as the shirt sponsor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "personnel_and_kits" (
"team" text,
"manager_1" tex... |
SELECT "kit_manufacturer" FROM "personnel_and_kits" WHERE "shirt_sponsor"='walkers'; |
## Task
Generate a SQL query to answer the following question:
`What is the kit manufacturer with Walkers as the shirt sponsor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "personnel_and_kits" (
"team" text,
"manager_1" text,
"captain" text,
... |
SELECT AVG("points") FROM "complete_international_formula_3000_resu" WHERE "chassis"='dallara 3087 lola t88/50' AND "year"<1988; |
## Task
Generate a SQL query to answer the following question:
`Name the average points for dallara 3087 lola t88/50 and year before 1988`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_international_formula_3000_resu" (
"year" real,
"chas... |
SELECT SUM("points") FROM "complete_international_formula_3000_resu" WHERE "year"=1992; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of points for 1992`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_international_formula_3000_resu" (
"year" real,
"chassis" text,
"engine" text,
"tyres" text... |
SELECT "points" FROM "complete_international_formula_3000_resu" WHERE "year">1987; |
## Task
Generate a SQL query to answer the following question:
`Name the points for year more than 1987`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_international_formula_3000_resu" (
"year" real,
"chassis" text,
"engine" text,
"tyr... |
SELECT "year" FROM "complete_international_formula_3000_resu" WHERE "points"<20 AND "chassis"='dallara 3087'; |
## Task
Generate a SQL query to answer the following question:
`Name the year for points less than 20 and chassis of dallara 3087`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_international_formula_3000_resu" (
"year" real,
"chassis" tex... |
SELECT MAX("apps") FROM "international" WHERE "season"='total' AND "goals">3; |
## Task
Generate a SQL query to answer the following question:
`What is the most apps that a has a total season and 3 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international" (
"national_team" text,
"club" text,
"season" text,
"app... |
SELECT COUNT("apps") FROM "international" WHERE "goals"=2; |
## Task
Generate a SQL query to answer the following question:
`What is the final number of apps with 2 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international" (
"national_team" text,
"club" text,
"season" text,
"apps" real,
"go... |
SELECT "airdate" FROM "series_4" WHERE "bbc_one_weekly_ranking"=14; |
## Task
Generate a SQL query to answer the following question:
`What date did the episode with a weekly ranking of 14 air?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_4" (
"episode_no" real,
"airdate" text,
"total_viewers" real,
"sha... |
SELECT COUNT("total_viewers") FROM "series_4" WHERE "share"='18.8%' AND "bbc_one_weekly_ranking"<16; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of total viewers with a share of 18.8% and a weekly ranking under 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series_4" (
"episode_no" real,
"airdate" ... |
SELECT "rider" FROM "125cc_classification" WHERE "grid"=37; |
## Task
Generate a SQL query to answer the following question:
`Who has 37 grids?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retired" text,
"grid" real
);
### ... |
SELECT AVG("grid") FROM "125cc_classification" WHERE "laps">23; |
## Task
Generate a SQL query to answer the following question:
`What is the average grid with more than 23 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retir... |
SELECT AVG("grid") FROM "125cc_classification" WHERE "laps">23; |
## Task
Generate a SQL query to answer the following question:
`What is the average grid with more than 23 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retir... |
SELECT AVG("decile") FROM "thames_coromandel_district" WHERE "name"='te puru school'; |
## Task
Generate a SQL query to answer the following question:
`What is the average decile for te puru school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "thames_coromandel_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.