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,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average total for gold less than 1 and rank less than 5`:
```sql
|
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,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of silver when total is mor ethan 1, bronze is 1 and gold is les than 0`:
```sql
|
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" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most gold when bronze is more than 0 and rank is more than 5 with total more than 2`:
```sql
|
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,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average bronze with silver more than 0, total of 6 and gold more than 0`:
```sql
|
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,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of total with gold more than 1 and bronze more than 0`:
```sql
|
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,
"nominating_festival" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country did Jonas Geirnaert direct a film in?`:
```sql
|
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,
"nominating_festival" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Nominating Festival took place in Germany?`:
```sql
|
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,
"nominating_festival" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the category of the film made in Switzerland?`:
```sql
|
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_festival" text
);
### SQL
Given the database schema, here is the SQL query that answers `What film was directed by Sandro Aguilar?`:
```sql
|
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" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the language that has number of 14`:
```sql
|
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,
"females" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number which has language of other`:
```sql
|
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,
"points" text,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average goals for losses of 19 and goals against more than 59`:
```sql
|
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,
"club" text,
"played" real,
"points" text,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average position when the goals against are more than 42 and draws less than 16 with goals of 44`:
```sql
|
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" text,
"u_s_open_cup" text,
"avg_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which regular season was 2013 in?`:
```sql
|
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" text,
"playoffs" text,
"u_s_open_cup" text,
"avg_attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did the team make conference semifinals?`:
```sql
|
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_subdivisi" (
"rank" real,
"subdivision_name" text,
"country" text,
"area_km" real,
"population" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of a subdivision in Denmark ranked less than 24 with an area greater than 1,420,968?`:
```sql
|
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" (
"rank" real,
"subdivision_name" text,
"country" text,
"area_km" real,
"population" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the smallest area in Russia that is ranked 23 with a population more than 522,800?`:
```sql
|
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
);
### SQL
Given the database schema, here is the SQL query that answers `On the date of June 8 what was the record?`:
```sql
|
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
);
### SQL
Given the database schema, here is the SQL query that answers `On the date of June 15 what was the score?`:
```sql
|
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,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs?`:
```sql
|
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" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the college/junior/club team of the defence player drafted by the New York Rangers?`:
```sql
|
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,
"class" text,
"chassis" text,
"engine" text,
"tyres" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of the cadillac northstar lmp02 chassis?`:
```sql
|
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" real,
"entrant" text,
"class" text,
"chassis" text,
"engine" text,
"tyres" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the entrant for the audi 3.6l turbo v8 engine and ranked 3rd with 163 points?`:
```sql
|
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" real,
"entrant" text,
"class" text,
"chassis" text,
"engine" text,
"tyres" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank with more than 123 points, an audi r8 chassis, and a lmp900 class?`:
```sql
|
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,
"entrant" text,
"class" text,
"chassis" text,
"engine" text,
"tyres" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the engine for the bmw motorsport entrant with 123 points before 2004?`:
```sql
|
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,
"skipper" text,
"points" text,
"combined_elapsed_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which points have a Combined elapsed time of 175d 20h 46m 04s?`:
```sql
|
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,
"skipper" text,
"points" text,
"combined_elapsed_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which yacht name has a Combined elapsed time of 179d 11h 58m 14s?`:
```sql
|
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,
"combined_elapsed_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which skipper has 78 points?`:
```sql
|
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" text,
"skipper" text,
"points" text,
"combined_elapsed_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which points have an Overall place of 9=, and a Skipper of nick fenton?`:
```sql
|
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" text,
"points" text,
"combined_elapsed_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Overall place has a Yacht name of lg flatron?`:
```sql
|
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,
"skipper" text,
"points" text,
"combined_elapsed_time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Combined elapsed time has a Skipper of stephen wilkins?`:
```sql
|
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,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Before the year 1988, what is the lowest number of points that entrant Coloni SpA scored?`:
```sql
|
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,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which chassis used by the entrant Automobiles Gonfaronnaises Sportives scored 0 points?`:
```sql
|
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,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the entrant before 1988?`:
```sql
|
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" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine was used in 1987?`:
```sql
|
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,
"open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `What league did they play in 2001?`:
```sql
|
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,
"league" text,
"reg_season" text,
"playoffs" text,
"open_cup" text
);
### SQL
Given the database schema, here is the SQL query that answers `What open cup did they play in when they finished 2nd, northeast in the reg. season?`:
```sql
|
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" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the week with a date of October 9, 1983, and attendance smaller than 40,492?`:
```sql
|
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" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest attendance with week 14?`:
```sql
|
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_site" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the Oakland Raiders play in week 12 of their 1976 season?`:
```sql
|
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,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years did Barclay Nordica Arrows BMW enter with Cosworth v8 engine?`:
```sql
|
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_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years did barclay nordica arrows bmw enter with a bmw str-4 t/c engine with less than 1 point?`:
```sql
|
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,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years was ensign n180b a Chassis with 4 points?`:
```sql
|
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" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the division record for the Indians?`:
```sql
|
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" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the overall record of Indian River?`:
```sql
|
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" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the season outcome of Lake Forest?`:
```sql
|
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" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Deciles are coed?`:
```sql
|
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" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the lowest Decile that is coed?`:
```sql
|
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,
"authority" text,
"decile" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the years for Kawerau Putauaki School?`:
```sql
|
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" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the round or race of the winning driver Charles Hollings and what was his pole position?`:
```sql
|
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,
"competition" text,
"venue" text,
"position" text,
"performance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the earliest year in which long jump was performed in the world indoor Championships in 5th position?`:
```sql
|
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" text,
"position" text,
"performance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the latest year in which she took 4th position in Budapest, Hungary?`:
```sql
|
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" (
"name" text,
"born" text,
"age_at_first_step" text,
"mission" text,
"lunar_eva_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which astronaut went on the Apollo 16 mission at the age of 36y 6m 18d to step on the moon?`:
```sql
|
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,
"mission" text,
"lunar_eva_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `David Scott went on which mission?`:
```sql
|
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" (
"name" text,
"born" text,
"age_at_first_step" text,
"mission" text,
"lunar_eva_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `The astronaut who was 37y 8m 4d when making a first step on the moon was in which service?`:
```sql
|
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,
"born" text,
"age_at_first_step" text,
"mission" text,
"lunar_eva_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `Pete Conrad was on the Apollo 12 mission but also had what Lunar EVA dates?`:
```sql
|
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,
"born" text,
"age_at_first_step" text,
"mission" text,
"lunar_eva_dates" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `The Apollo astronaut who was 38y 9m 7d when first stepping on the moon is who?`:
```sql
|
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" text,
"class" text,
"chassis" text,
"engine" text,
"rank" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which class has a year prior to 2011 and audi r15 tdi as the chassis?`:
```sql
|
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,
"class" text,
"chassis" text,
"engine" text,
"rank" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which engine has a year later than 2006 and 60 as the points?`:
```sql
|
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_results" (
"year" real,
"entrant" text,
"class" text,
"chassis" text,
"engine" text,
"rank" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years has an engine of audi 3.6l turbo v8 and 1st as the rank with an audi r8r as the chassis?`:
```sql
|
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" text,
"engine" text,
"rank" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which entrant has 25th as the rank?`:
```sql
|
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,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year Rich Beem had a to par less than 17?`:
```sql
|
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" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year won with a total bigger than 156?`:
```sql
|
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,
"year_won" real,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for Bob Tway for the year won before 2002 with a to par bigger than 7?`:
```sql
|
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,
"country" text,
"year_won" real,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par for Paul Azinger from the United States after 1986 for a total bigger than 145?`:
```sql
|
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" real,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year won Paul Azinger had with a to par higher than 5?`:
```sql
|
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,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year won by Australia with a to par bigger than 16?`:
```sql
|
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,
"party" text,
"lifespan" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Lifespan when the Representative is Theodore F. Kluttz?`:
```sql
|
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" real
);
### SQL
Given the database schema, here is the SQL query that answers `What week's game had a result of l 35β37?`:
```sql
|
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" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year was trio brdeact wind allass the entrant?`:
```sql
|
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,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year when kurtis kraft 500f was the chassis?`:
```sql
|
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,
"chassis" text,
"engine" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year when the points were more than 0?`:
```sql
|
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,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the school name in Balclutha that has a Decile of 7 and a roll larger than 186?`:
```sql
|
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,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which school in Balclutha has a roll smaller than 55?`:
```sql
|
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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When has winnipeg jets with a Score of 4β6?`:
```sql
|
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" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is Edmonton Oilers in?`:
```sql
|
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,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score that has a Winnipeg Jets as Visitor on april 7?`:
```sql
|
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" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score on April 6?`:
```sql
|
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" text
);
### SQL
Given the database schema, here is the SQL query that answers `When has a Record of 1β0?`:
```sql
|
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
);
### SQL
Given the database schema, here is the SQL query that answers `What is the LLWS when the Year is 2003?`:
```sql
|
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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest Year when the City is Peabody?`:
```sql
|
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" text,
"city" text,
"llws" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Years when the LLWS is 4th place, and when the City is Westport?`:
```sql
|
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,
"captain" text,
"kit_manufacturer" text,
"shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team has Pony as the kit manufacturer and Gary Mabbutt as the captain?`:
```sql
|
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,
"shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the manager 1 for Leeds United?`:
```sql
|
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,
"captain" text,
"kit_manufacturer" text,
"shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the team with a Pony kit manufacturer and Julian Dicks as the captain?`:
```sql
|
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" text,
"kit_manufacturer" text,
"shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team has a kit manufacturer of Umbro and Eric Cantona as captain?`:
```sql
|
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" text,
"captain" text,
"kit_manufacturer" text,
"shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the manager 1 with Puma as the kit manufacturer and Puma as the shirt sponsor?`:
```sql
|
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,
"kit_manufacturer" text,
"shirt_sponsor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the kit manufacturer with Walkers as the shirt sponsor?`:
```sql
|
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,
"chassis" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average points for dallara 3087 lola t88/50 and year before 1988`:
```sql
|
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,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of points for 1992`:
```sql
|
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,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points for year more than 1987`:
```sql
|
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" text,
"engine" text,
"tyres" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the year for points less than 20 and chassis of dallara 3087`:
```sql
|
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,
"apps" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the most apps that a has a total season and 3 goals?`:
```sql
|
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,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the final number of apps with 2 goals?`:
```sql
|
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,
"share" text,
"bbc_one_weekly_ranking" real
);
### SQL
Given the database schema, here is the SQL query that answers `What date did the episode with a weekly ranking of 14 air?`:
```sql
|
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" text,
"total_viewers" real,
"share" text,
"bbc_one_weekly_ranking" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of total viewers with a share of 18.8% and a weekly ranking under 16?`:
```sql
|
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
);
### SQL
Given the database schema, here is the SQL query that answers `Who has 37 grids?`:
```sql
|
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_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average grid with more than 23 laps?`:
```sql
|
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_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average grid with more than 23 laps?`:
```sql
|
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,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average decile for te puru school?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.