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