output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "runner_up" FROM "women_s_singles" WHERE "year"=1999; |
## Task
Generate a SQL query to answer the following question:
`Who won the runner-up in 1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_singles" (
"location" text,
"year" real,
"champion" text,
"runner_up" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the runner-up in 1999?`:
```sql
|
SELECT "score" FROM "women_s_singles" WHERE "champion"='flavia pennetta'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when Flavia Pennetta won the championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_singles" (
"location" text,
"year" real,
"champion" text,
"runner_up" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when Flavia Pennetta won the championship?`:
```sql
|
SELECT COUNT("matches") FROM "runs" WHERE "s_rate"<133.72 AND "team"='yorkshire carnegie'; |
## Task
Generate a SQL query to answer the following question:
`How many Matches have an S/Rate smaller than 133.72, and a Team of yorkshire carnegie?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runs" (
"player" text,
"team" text,
"matches" real,
"inns" real,
"runs" real,
"balls" real,
"s_rate" real,
"100s" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Matches have an S/Rate smaller than 133.72, and a Team of yorkshire carnegie?`:
```sql
|
SELECT "team" FROM "runs" WHERE "balls"<258 AND "inns"=10 AND "matches"<12; |
## Task
Generate a SQL query to answer the following question:
`Which Team has Balls smaller than 258, and Inns of 10, and Matches smaller than 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runs" (
"player" text,
"team" text,
"matches" real,
"inns" real,
"runs" real,
"balls" real,
"s_rate" real,
"100s" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Team has Balls smaller than 258, and Inns of 10, and Matches smaller than 12?`:
```sql
|
SELECT SUM("matches") FROM "runs" WHERE "balls"<224 AND "average">38.25 AND "s_rate">139.09; |
## Task
Generate a SQL query to answer the following question:
`How many Matches have Balls smaller than 224, and an Average larger than 38.25, and an S/Rate larger than 139.09?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runs" (
"player" text,
"team" text,
"matches" real,
"inns" real,
"runs" real,
"balls" real,
"s_rate" real,
"100s" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Matches have Balls smaller than 224, and an Average larger than 38.25, and an S/Rate larger than 139.09?`:
```sql
|
SELECT COUNT("matches") FROM "runs" WHERE "average">26.53 AND "s_rate"=165.4 AND "100s"<1; |
## Task
Generate a SQL query to answer the following question:
`How many Matches have an Average larger than 26.53, and an S/Rate of 165.4, and a 100s smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runs" (
"player" text,
"team" text,
"matches" real,
"inns" real,
"runs" real,
"balls" real,
"s_rate" real,
"100s" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Matches have an Average larger than 26.53, and an S/Rate of 165.4, and a 100s smaller than 1?`:
```sql
|
SELECT "fastest_lap" FROM "calendar" WHERE "grand_prix"='dutch tt'; |
## Task
Generate a SQL query to answer the following question:
`What was the fastest lap for Grand Prix dutch tt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"round" real,
"date" text,
"grand_prix" text,
"circuit" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the fastest lap for Grand Prix dutch tt?`:
```sql
|
SELECT "race_winner" FROM "calendar" WHERE "circuit"='sachsenring'; |
## Task
Generate a SQL query to answer the following question:
`Who won the race circuit of sachsenring?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"round" real,
"date" text,
"grand_prix" text,
"circuit" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the race circuit of sachsenring?`:
```sql
|
SELECT "race_winner" FROM "calendar" WHERE "fastest_lap"='daijiro hiura' AND "date"='march 29'; |
## Task
Generate a SQL query to answer the following question:
`Who won with the fastest lap of daijiro hiura on March 29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"round" real,
"date" text,
"grand_prix" text,
"circuit" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won with the fastest lap of daijiro hiura on March 29?`:
```sql
|
SELECT "year" FROM "ground_history" WHERE "total"='2' AND "la_matches"='0'; |
## Task
Generate a SQL query to answer the following question:
`What year had a total of 2 and LA matches of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ground_history" (
"name_of_ground" text,
"location" text,
"year" text,
"fc_matches" text,
"la_matches" text,
"t20_matches" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year had a total of 2 and LA matches of 0?`:
```sql
|
SELECT "year" FROM "ground_history" WHERE "total"='9'; |
## Task
Generate a SQL query to answer the following question:
`What year was the total 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ground_history" (
"name_of_ground" text,
"location" text,
"year" text,
"fc_matches" text,
"la_matches" text,
"t20_matches" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the total 9?`:
```sql
|
SELECT "week_4" FROM "2007" WHERE "week_5"='[month ended]' AND "week_2"='april ireland'; |
## Task
Generate a SQL query to answer the following question:
`Who is in week 4 if week 5 is [month ended] and week 2 is April Ireland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is in week 4 if week 5 is [month ended] and week 2 is April Ireland?`:
```sql
|
SELECT "week_3" FROM "2007" WHERE "week_2"='nikki fiction'; |
## Task
Generate a SQL query to answer the following question:
`Who is week 3 if week 2 is Nikki Fiction?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is week 3 if week 2 is Nikki Fiction?`:
```sql
|
SELECT "week_1" FROM "2007" WHERE "week_3"='natasha budhi'; |
## Task
Generate a SQL query to answer the following question:
`Who is week 1 if week 3 is Natasha Budhi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is week 1 if week 3 is Natasha Budhi?`:
```sql
|
SELECT "week_5" FROM "2007" WHERE "week_2"='jenna jordan'; |
## Task
Generate a SQL query to answer the following question:
`Who is week 5 if week 2 is Jenna Jordan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is week 5 if week 2 is Jenna Jordan?`:
```sql
|
SELECT "week_2" FROM "2007" WHERE "week_3"='sara stokes'; |
## Task
Generate a SQL query to answer the following question:
`Who is week 2 if week 3 is Sara Stokes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is week 2 if week 3 is Sara Stokes?`:
```sql
|
SELECT "week_3" FROM "2007" WHERE "week_1"='amanda batt'; |
## Task
Generate a SQL query to answer the following question:
`Who is week 3 if week 1 is Amanda Batt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007" (
"week_1" text,
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is week 3 if week 1 is Amanda Batt?`:
```sql
|
SELECT COUNT("enrollment") FROM "ugdsb_secondary_schools" WHERE "location"='guelph' AND "1_year_ranking_of_727">717; |
## Task
Generate a SQL query to answer the following question:
`How many enrollments have a location of Guelph and a 1-year ranking of 727 larger than 717?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ugdsb_secondary_schools" (
"name" text,
"location" text,
"enrollment" real,
"1_year_ranking_of_727" real,
"5_year_ranking_of_693" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many enrollments have a location of Guelph and a 1-year ranking of 727 larger than 717?`:
```sql
|
SELECT AVG("bronze") FROM "medal_table" WHERE "total"<1; |
## Task
Generate a SQL query to answer the following question:
`What average bronze has a total less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What average bronze has a total less than 1?`:
```sql
|
SELECT AVG("gold") FROM "medal_table" WHERE "nation"='china (chn)' AND "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`What average gold has China (chn) as the nation with a bronze greater than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What average gold has China (chn) as the nation with a bronze greater than 1?`:
```sql
|
SELECT MAX("gold") FROM "medal_table" WHERE "bronze">4; |
## Task
Generate a SQL query to answer the following question:
`Which is the highest gold that has a bronze greater than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the highest gold that has a bronze greater than 4?`:
```sql
|
SELECT "date" FROM "1984" WHERE "against"<32 AND "opposing_teams"='australia'; |
## Task
Generate a SQL query to answer the following question:
`What date has fewer than 32 against and the opposing team of Australia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1984" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date has fewer than 32 against and the opposing team of Australia?`:
```sql
|
SELECT AVG("against") FROM "1984" WHERE "status"='test match'; |
## Task
Generate a SQL query to answer the following question:
`What is the average against for a test match?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1984" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average against for a test match?`:
```sql
|
SELECT "venue" FROM "1984" WHERE "against">9 AND "status"='second test'; |
## Task
Generate a SQL query to answer the following question:
`Which venue has more than 9 against and a status of second test?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1984" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue has more than 9 against and a status of second test?`:
```sql
|
SELECT "status" FROM "1984" WHERE "against"=35; |
## Task
Generate a SQL query to answer the following question:
`Which status has an against of 35?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1984" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which status has an against of 35?`:
```sql
|
SELECT MIN("total_pld") FROM "relegation" WHERE "total_pts"<153 AND "2004_05_pts"='43' AND "2005_06_pts"<49; |
## Task
Generate a SQL query to answer the following question:
`Which Total Pld has a Total Pts smaller than 153, and a 2004–05 Pts of 43, and a 2005–06 Pts smaller than 49?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"2003_04_pts" text,
"2004_05_pts" text,
"2005_06_pts" real,
"total_pts" real,
"total_pld" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total Pld has a Total Pts smaller than 153, and a 2004–05 Pts of 43, and a 2005–06 Pts smaller than 49?`:
```sql
|
SELECT MAX("total_pld") FROM "relegation" WHERE "2004_05_pts"='43' AND "team"='olimpo' AND "2005_06_pts">49; |
## Task
Generate a SQL query to answer the following question:
`Which Total Pld has a 2004–05 Pts of 43, and a Team of olimpo, and a 2005–06 Pts larger than 49?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"2003_04_pts" text,
"2004_05_pts" text,
"2005_06_pts" real,
"total_pts" real,
"total_pld" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total Pld has a 2004–05 Pts of 43, and a Team of olimpo, and a 2005–06 Pts larger than 49?`:
```sql
|
SELECT MAX("total_pld") FROM "relegation" WHERE "2005_06_pts"=27; |
## Task
Generate a SQL query to answer the following question:
`Which Total Pld has a 2005–06 Pts of 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"2003_04_pts" text,
"2004_05_pts" text,
"2005_06_pts" real,
"total_pts" real,
"total_pld" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total Pld has a 2005–06 Pts of 27?`:
```sql
|
SELECT MIN("2005_06_pts") FROM "relegation" WHERE "2004_05_pts"='48'; |
## Task
Generate a SQL query to answer the following question:
`Which 2005–06 Pts has a 2004–05 Pts of 48?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation" (
"team" text,
"2003_04_pts" text,
"2004_05_pts" text,
"2005_06_pts" real,
"total_pts" real,
"total_pld" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which 2005–06 Pts has a 2004–05 Pts of 48?`:
```sql
|
SELECT "music" FROM "po_prostu_taniec_just_dance" WHERE "dance"='modern'; |
## Task
Generate a SQL query to answer the following question:
`What was the music for the modern dance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "po_prostu_taniec_just_dance" (
"team" text,
"dance" text,
"music" text,
"points_jury" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the music for the modern dance?`:
```sql
|
SELECT "place" FROM "po_prostu_taniec_just_dance" WHERE "dance"='tango' AND "points_jury"='24 (7,5,6,6)'; |
## Task
Generate a SQL query to answer the following question:
`What was the place for the tango dance when the points was jury of 24 (7,5,6,6)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "po_prostu_taniec_just_dance" (
"team" text,
"dance" text,
"music" text,
"points_jury" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the place for the tango dance when the points was jury of 24 (7,5,6,6)?`:
```sql
|
SELECT AVG("qualifying_goals") FROM "brazil_1950" WHERE "player"='jack froggatt' AND "finals_goals">0; |
## Task
Generate a SQL query to answer the following question:
`What is the Average Qualifying Goals for Jack Froggatt where the Final Goals is greater than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_1950" (
"player" text,
"club" text,
"qualifying_goals" real,
"finals_goals" real,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Average Qualifying Goals for Jack Froggatt where the Final Goals is greater than 0?`:
```sql
|
SELECT "player" FROM "brazil_1950" WHERE "total_goals">1 AND "qualifying_goals"<3; |
## Task
Generate a SQL query to answer the following question:
`Which Player has a Total Goals greater than 1 and Qualifying Goals smaller than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_1950" (
"player" text,
"club" text,
"qualifying_goals" real,
"finals_goals" real,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Player has a Total Goals greater than 1 and Qualifying Goals smaller than 3?`:
```sql
|
SELECT COUNT("total_goals") FROM "brazil_1950" WHERE "player"='stan mortensen' AND "qualifying_goals">3; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Total Goals scored by Stan Mortensen where the Qualifying Goals is greater than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_1950" (
"player" text,
"club" text,
"qualifying_goals" real,
"finals_goals" real,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Total Goals scored by Stan Mortensen where the Qualifying Goals is greater than 3?`:
```sql
|
SELECT AVG("finals_goals") FROM "brazil_1950" WHERE "total_goals"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the Average Finals Goals if the Total Goals is less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "brazil_1950" (
"player" text,
"club" text,
"qualifying_goals" real,
"finals_goals" real,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Average Finals Goals if the Total Goals is less than 1?`:
```sql
|
SELECT SUM("score") FROM "first_round" WHERE "country"='australia' AND "to_par"='e' AND "player"='adam scott'; |
## Task
Generate a SQL query to answer the following question:
`What was Adam Scott's total score when playing in Australia with a to par of e?`
### 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 was Adam Scott's total score when playing in Australia with a to par of e?`:
```sql
|
SELECT "score" FROM "first_round" WHERE "player"='fredrik jacobson'; |
## Task
Generate a SQL query to answer the following question:
`What was Fredrik Jacobson's score?`
### 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 was Fredrik Jacobson's score?`:
```sql
|
SELECT "home_team" FROM "third_round_proper" WHERE "away_team"='leyton orient'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE HOME TEAM WITH AN AWAY OF LEYTON ORIENT?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE HOME TEAM WITH AN AWAY OF LEYTON ORIENT?`:
```sql
|
SELECT "tie_no" FROM "third_round_proper" WHERE "home_team"='brighton & hove albion'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS NO TIE FROM brighton & hove albion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS NO TIE FROM brighton & hove albion?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='october 5'; |
## Task
Generate a SQL query to answer the following question:
`What was the result for the game on October 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponentnum" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result for the game on October 5?`:
```sql
|
SELECT "fa_cup_apps" FROM "appearances_and_goals" WHERE "total_goals"<4 AND "league_cup_goals"=0 AND "league_apps"='8 (10)'; |
## Task
Generate a SQL query to answer the following question:
`What is the FA Cup Apps when total goals is smaller than 4, League Cup Goals is 0, and League Apps is 8 (10)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the FA Cup Apps when total goals is smaller than 4, League Cup Goals is 0, and League Apps is 8 (10)?`:
```sql
|
SELECT MIN("total_goals") FROM "appearances_and_goals" WHERE "position"='df' AND "fa_cup_goals"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest total goals when position is df, and FA Cup Goals is smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest total goals when position is df, and FA Cup Goals is smaller than 0?`:
```sql
|
SELECT AVG("viewers_m") FROM "weekly_ratings" WHERE "episode"='school council'; |
## Task
Generate a SQL query to answer the following question:
`What Viewers (m) has an Episode of school council?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"18_49" text,
"viewers_m" real,
"rating" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Viewers (m) has an Episode of school council?`:
```sql
|
SELECT MAX("viewers_m") FROM "weekly_ratings" WHERE "rating"='1.7' AND "episode"='the game of life'; |
## Task
Generate a SQL query to answer the following question:
`What Viewers (m) has a Rating of 1.7, and an Episode of the game of life?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"18_49" text,
"viewers_m" real,
"rating" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Viewers (m) has a Rating of 1.7, and an Episode of the game of life?`:
```sql
|
SELECT "viewers_m" FROM "weekly_ratings" WHERE "episode"='40 days'; |
## Task
Generate a SQL query to answer the following question:
`What Viewers (m) has an Episode of 40 days?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"18_49" text,
"viewers_m" real,
"rating" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Viewers (m) has an Episode of 40 days?`:
```sql
|
SELECT "episode" FROM "weekly_ratings" WHERE "rating"='1.8' AND "viewers_m"<2.73; |
## Task
Generate a SQL query to answer the following question:
`What Episode has a Rating of 1.8, and Viewers (m) smaller than 2.73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"18_49" text,
"viewers_m" real,
"rating" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Episode has a Rating of 1.8, and Viewers (m) smaller than 2.73?`:
```sql
|
SELECT "rating" FROM "weekly_ratings" WHERE "viewers_m"=2.73; |
## Task
Generate a SQL query to answer the following question:
`What Rating has Viewers (m) of 2.73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"18_49" text,
"viewers_m" real,
"rating" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Rating has Viewers (m) of 2.73?`:
```sql
|
SELECT "episode" FROM "weekly_ratings" WHERE "share"='tba'; |
## Task
Generate a SQL query to answer the following question:
`What Episode has a Share of tba?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"18_49" text,
"viewers_m" real,
"rating" text,
"share" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Episode has a Share of tba?`:
```sql
|
SELECT "partner" FROM "wins_60" WHERE "date"=1979 AND "opponents_in_the_final"='heinz günthardt bob hewitt'; |
## Task
Generate a SQL query to answer the following question:
`Name the Partner which is in 1979, and Opponents in the final of heinz günthardt bob hewitt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_60" (
"outcome" text,
"date" real,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Partner which is in 1979, and Opponents in the final of heinz günthardt bob hewitt?`:
```sql
|
SELECT "surface" FROM "wins_60" WHERE "opponents_in_the_final"='mark edmondson sherwood stewart' AND "tournament"='dallas , u.s.'; |
## Task
Generate a SQL query to answer the following question:
`which Surface has Opponents in the final of mark edmondson sherwood stewart, and a Tournament of dallas , u.s.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_60" (
"outcome" text,
"date" real,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `which Surface has Opponents in the final of mark edmondson sherwood stewart, and a Tournament of dallas , u.s.?`:
```sql
|
SELECT SUM("date") FROM "wins_60" WHERE "tournament"='paris indoor , france'; |
## Task
Generate a SQL query to answer the following question:
`Name the date of Tournament of paris indoor , france?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_60" (
"outcome" text,
"date" real,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date of Tournament of paris indoor , france?`:
```sql
|
SELECT "outcome" FROM "wins_60" WHERE "surface"='hard' AND "score_in_the_final"='6–2, 6–4'; |
## Task
Generate a SQL query to answer the following question:
`Name the Outcome has a Surface of hard, and a Score in the final of 6–2, 6–4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_60" (
"outcome" text,
"date" real,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Outcome has a Surface of hard, and a Score in the final of 6–2, 6–4?`:
```sql
|
SELECT "surface" FROM "wins_60" WHERE "score_in_the_final"='6–3, 6–2' AND "opponents_in_the_final"='mansour bahrami diego pérez'; |
## Task
Generate a SQL query to answer the following question:
`Name the Surface which has a Score in the final of 6–3, 6–2 and Opponents in the final of mansour bahrami diego pérez?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wins_60" (
"outcome" text,
"date" real,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Surface which has a Score in the final of 6–3, 6–2 and Opponents in the final of mansour bahrami diego pérez?`:
```sql
|
SELECT "res" FROM "mixed_martial_arts_record" WHERE "time"='11:58'; |
## Task
Generate a SQL query to answer the following question:
`Which Res has a Time of 11:58?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Res has a Time of 11:58?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='jerry bohlander'; |
## Task
Generate a SQL query to answer the following question:
`What was jerry bohlander's time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was jerry bohlander's time?`:
```sql
|
SELECT "total" FROM "goal_scorers" WHERE "coppa_italia"=0 AND "champions_league"=1 AND "serie_a"<2 AND "name"='mauro camoranesi'; |
## Task
Generate a SQL query to answer the following question:
`What was the total of Mauro Camoranesi when coppa italia was 0, champions league was 1 and less than 2 serie A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_scorers" (
"name" text,
"serie_a" real,
"champions_league" real,
"coppa_italia" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total of Mauro Camoranesi when coppa italia was 0, champions league was 1 and less than 2 serie A?`:
```sql
|
SELECT AVG("serie_a") FROM "goal_scorers" WHERE "coppa_italia"=5; |
## Task
Generate a SQL query to answer the following question:
`What's the Serie A when the coppa italia was 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_scorers" (
"name" text,
"serie_a" real,
"champions_league" real,
"coppa_italia" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Serie A when the coppa italia was 5?`:
```sql
|
SELECT SUM("total") FROM "goal_scorers" WHERE "champions_league"=0 AND "serie_a">1 AND "coppa_italia"<0; |
## Task
Generate a SQL query to answer the following question:
`What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_scorers" (
"name" text,
"serie_a" real,
"champions_league" real,
"coppa_italia" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was more than 1?`:
```sql
|
SELECT SUM("champions_league") FROM "goal_scorers" WHERE "serie_a"=1 AND "total">1 AND "coppa_italia">2; |
## Task
Generate a SQL query to answer the following question:
`What is the championsleague when the total was greater than 1, the coppa italia was more than 2, and the Serie A was 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goal_scorers" (
"name" text,
"serie_a" real,
"champions_league" real,
"coppa_italia" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the championsleague when the total was greater than 1, the coppa italia was more than 2, and the Serie A was 1?`:
```sql
|
SELECT "combined" FROM "most_race_wins_in_a_single_season" WHERE "victories"=14; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Combined that has the Victories of 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_race_wins_in_a_single_season" (
"women" text,
"country" text,
"season" text,
"victories" real,
"downhill" text,
"super_g" text,
"giant_slalom" text,
"slalom" text,
"combined" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Combined that has the Victories of 14?`:
```sql
|
SELECT "giant_slalom" FROM "most_race_wins_in_a_single_season" WHERE "combined"='1' AND "country"='united states' AND "victories">11; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Giant Slalom that has the Combined of 1, and the Country of united states, and the Victories larger than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_race_wins_in_a_single_season" (
"women" text,
"country" text,
"season" text,
"victories" real,
"downhill" text,
"super_g" text,
"giant_slalom" text,
"slalom" text,
"combined" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Giant Slalom that has the Combined of 1, and the Country of united states, and the Victories larger than 11?`:
```sql
|
SELECT "to_par" FROM "made_both_cuts" WHERE "player"='bob charles'; |
## Task
Generate a SQL query to answer the following question:
`What is Bob Charles' To par?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_both_cuts" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Bob Charles' To par?`:
```sql
|
SELECT MAX("total") FROM "made_both_cuts" WHERE "to_par"='+11'; |
## Task
Generate a SQL query to answer the following question:
`What is the Total for the Player with a To par of +11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_both_cuts" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Total for the Player with a To par of +11?`:
```sql
|
SELECT SUM("total") FROM "made_both_cuts" WHERE "to_par"='–13'; |
## Task
Generate a SQL query to answer the following question:
`What is the Total of the Player with a To par of –13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_both_cuts" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Total of the Player with a To par of –13?`:
```sql
|
SELECT "hometown" FROM "current_roster" WHERE "position"='guard' AND "name"='kerri shields'; |
## Task
Generate a SQL query to answer the following question:
`What is Guard Kerri Shields Hometown?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"number" real,
"position" text,
"height" text,
"year" text,
"hometown" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Guard Kerri Shields Hometown?`:
```sql
|
SELECT "name" FROM "current_roster" WHERE "hometown"='albuquerque, new mexico'; |
## Task
Generate a SQL query to answer the following question:
`What is the Name of the Player from Albuquerque, New Mexico?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_roster" (
"name" text,
"number" real,
"position" text,
"height" text,
"year" text,
"hometown" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Name of the Player from Albuquerque, New Mexico?`:
```sql
|
SELECT "2nd_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='newell''s old boys'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the 2nd leg when Newell's Old Boys played at home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the 2nd leg when Newell's Old Boys played at home?`:
```sql
|
SELECT "home_2nd_leg" FROM "knockout_stages" WHERE "1st_leg"='1-1' AND "aggregate"='2-4'; |
## Task
Generate a SQL query to answer the following question:
`Who played at home for the second leg, with a score of 1-1 on the first leg and an aggregate score of 2-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played at home for the second leg, with a score of 1-1 on the first leg and an aggregate score of 2-4?`:
```sql
|
SELECT "home_2nd_leg" FROM "knockout_stages" WHERE "aggregate"='2-0'; |
## Task
Generate a SQL query to answer the following question:
`Which team played at home for the second leg and has aggregate score of 2-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team played at home for the second leg and has aggregate score of 2-0?`:
```sql
|
SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='gimnasia de mendoza'; |
## Task
Generate a SQL query to answer the following question:
`What was the score on the first leg when gimnasia de mendoza played at home for the second leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score on the first leg when gimnasia de mendoza played at home for the second leg?`:
```sql
|
SELECT "home_2nd_leg" FROM "knockout_stages" WHERE "aggregate"='2-4'; |
## Task
Generate a SQL query to answer the following question:
`Which team played at home for the second leg and has an aggregate score of 2-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team played at home for the second leg and has an aggregate score of 2-4?`:
```sql
|
SELECT "2nd_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='atlético tucumán'; |
## Task
Generate a SQL query to answer the following question:
`What was the 2nd leg score when atlético tucumán played at home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "knockout_stages" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 2nd leg score when atlético tucumán played at home?`:
```sql
|
SELECT "record" FROM "mixed_martial_arts_record" WHERE "res"='win' AND "time"='5:00' AND "round">3; |
## Task
Generate a SQL query to answer the following question:
`What is the record of the match with a win res., a 5:00 time, and more than 3 rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of the match with a win res., a 5:00 time, and more than 3 rounds?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='georges st-pierre'; |
## Task
Generate a SQL query to answer the following question:
`What is the method of opponent georges st-pierre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the method of opponent georges st-pierre?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_record" WHERE "round"=3 AND "event"='fightfest 2'; |
## Task
Generate a SQL query to answer the following question:
`What is the location of fightfest 2, which has 3 rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location of fightfest 2, which has 3 rounds?`:
```sql
|
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "time"='1:19'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent with a time of 1:19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent with a time of 1:19?`:
```sql
|
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='0-1'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent with a 0-1 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent with a 0-1 record?`:
```sql
|
SELECT COUNT("rank_by_average") FROM "average_score_chart" WHERE "total_points">392 AND "average"=24.8; |
## Task
Generate a SQL query to answer the following question:
`What is the total rank with more than 392 total points and an 24.8 average?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "average_score_chart" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total rank with more than 392 total points and an 24.8 average?`:
```sql
|
SELECT MAX("average") FROM "average_score_chart" WHERE "place"<3 AND "total_points"<433 AND "rank_by_average"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the highest average with less than 3 places, less than 433 total points, and a rank less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "average_score_chart" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest average with less than 3 places, less than 433 total points, and a rank less than 2?`:
```sql
|
SELECT COUNT("average") FROM "average_score_chart" WHERE "total_points"=54 AND "rank_by_average"<10; |
## Task
Generate a SQL query to answer the following question:
`What is the total average with 54 total points and a rank less than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "average_score_chart" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total average with 54 total points and a rank less than 10?`:
```sql
|
SELECT COUNT("rank_by_average") FROM "average_score_chart" WHERE "number_of_dances"=2 AND "total_points">37; |
## Task
Generate a SQL query to answer the following question:
`What is the total rank by average for 2 dances, which have more than 37 total points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "average_score_chart" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total rank by average for 2 dances, which have more than 37 total points?`:
```sql
|
SELECT "championship" FROM "singles_40_20_20" WHERE "opponent_in_the_final"='aaron krickstein' AND "score_in_the_final"='7–5, 6–2'; |
## Task
Generate a SQL query to answer the following question:
`What Championship has an Opponent in the final of aaron krickstein, and a Score in the final of 7–5, 6–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_40_20_20" (
"outcome" text,
"date" real,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Championship has an Opponent in the final of aaron krickstein, and a Score in the final of 7–5, 6–2?`:
```sql
|
SELECT "score_in_the_final" FROM "singles_40_20_20" WHERE "surface"='hard' AND "championship"='washington, d.c. , u.s.' AND "opponent_in_the_final"='ivan lendl'; |
## Task
Generate a SQL query to answer the following question:
`What Score in the final has a Surface of hard, a Championship of washington, d.c. , u.s., and an Opponent in the final of ivan lendl?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_40_20_20" (
"outcome" text,
"date" real,
"championship" text,
"surface" text,
"opponent_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Score in the final has a Surface of hard, a Championship of washington, d.c. , u.s., and an Opponent in the final of ivan lendl?`:
```sql
|
SELECT MAX("number_of_seasons_in_liga_mx") FROM "clubs" WHERE "club"='cruz azul'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Number of seasons in Liga MX for Club cruz azul?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs" (
"club" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"number_of_seasons_in_liga_mx" real,
"top_division_titles" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Number of seasons in Liga MX for Club cruz azul?`:
```sql
|
SELECT MAX("number_of_seasons_in_liga_mx") FROM "clubs" WHERE "club"='cruz azul' AND "number_of_seasons_in_top_division">68; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs" (
"club" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"number_of_seasons_in_liga_mx" real,
"top_division_titles" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68?`:
```sql
|
SELECT COUNT("top_division_titles") FROM "clubs" WHERE "number_of_seasons_in_top_division">40 AND "first_season_of_current_spell_in_top_division"='1943-44' AND "number_of_seasons_in_liga_mx">89; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Top division titles for the club that has more than 40 seasons in top division, a First season of current spell in top division of 1943-44, and more than 89 seasons in Liga MX?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs" (
"club" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"number_of_seasons_in_liga_mx" real,
"top_division_titles" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Top division titles for the club that has more than 40 seasons in top division, a First season of current spell in top division of 1943-44, and more than 89 seasons in Liga MX?`:
```sql
|
SELECT SUM("top_division_titles") FROM "clubs" WHERE "number_of_seasons_in_liga_mx">42 AND "club"='guadalajara'; |
## Task
Generate a SQL query to answer the following question:
`How many top division titles does Club Guadalajara have, with more than 42 seasons in Liga MX?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs" (
"club" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"number_of_seasons_in_liga_mx" real,
"top_division_titles" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many top division titles does Club Guadalajara have, with more than 42 seasons in Liga MX?`:
```sql
|
SELECT "club" FROM "clubs" WHERE "number_of_seasons_in_liga_mx"<40 AND "number_of_seasons_in_top_division"=65; |
## Task
Generate a SQL query to answer the following question:
`Which club has fewer than 40 seasons in Liga MX and 65 seasons in the top division?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "clubs" (
"club" text,
"first_season_in_top_division" text,
"number_of_seasons_in_top_division" real,
"first_season_of_current_spell_in_top_division" text,
"number_of_seasons_in_liga_mx" real,
"top_division_titles" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which club has fewer than 40 seasons in Liga MX and 65 seasons in the top division?`:
```sql
|
SELECT SUM("number") FROM "verified_aerial_victories" WHERE "location"='bois de warville' AND "time"<810; |
## Task
Generate a SQL query to answer the following question:
`What number is in Bois de Warville with a time less than 810?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "verified_aerial_victories" (
"number" real,
"time" real,
"aircraft" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number is in Bois de Warville with a time less than 810?`:
```sql
|
SELECT MAX("time") FROM "verified_aerial_victories" WHERE "number"=21; |
## Task
Generate a SQL query to answer the following question:
`What is number 21's highest time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "verified_aerial_victories" (
"number" real,
"time" real,
"aircraft" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is number 21's highest time?`:
```sql
|
SELECT SUM("number") FROM "verified_aerial_victories" WHERE "opponent"='fokker d.vii' AND "time"=1655; |
## Task
Generate a SQL query to answer the following question:
`What number with the opponent Fokker D.vii have with a time of 1655?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "verified_aerial_victories" (
"number" real,
"time" real,
"aircraft" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number with the opponent Fokker D.vii have with a time of 1655?`:
```sql
|
SELECT "opponent" FROM "verified_aerial_victories" WHERE "time">1040 AND "aircraft"='spad xiii' AND "number"<22 AND "location"='dun-sur-meuse'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent with a time higher than 1040, a Spad xiii aircraft in Dun-Sur-Meuse with a lower number than 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "verified_aerial_victories" (
"number" real,
"time" real,
"aircraft" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent with a time higher than 1040, a Spad xiii aircraft in Dun-Sur-Meuse with a lower number than 22?`:
```sql
|
SELECT SUM("number") FROM "verified_aerial_victories" WHERE "opponent"='fokker d.vii' AND "time"=600; |
## Task
Generate a SQL query to answer the following question:
`What number has the opponent Fokker d.vii with a time of 600?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "verified_aerial_victories" (
"number" real,
"time" real,
"aircraft" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number has the opponent Fokker d.vii with a time of 600?`:
```sql
|
SELECT "name" FROM "timeline_of_tallest_buildings" WHERE "floors">36 AND "years_as_tallest"='1986–1992'; |
## Task
Generate a SQL query to answer the following question:
`What is the Name of the Building with 36 or more Floors with Years as tallest of 1986–1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Name of the Building with 36 or more Floors with Years as tallest of 1986–1992?`:
```sql
|
SELECT "years_as_tallest" FROM "timeline_of_tallest_buildings" WHERE "height_ft_m"='145 (44)'; |
## Task
Generate a SQL query to answer the following question:
`What is the Years as tallest of the Building with a Height ft (m) of 145 (44)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Years as tallest of the Building with a Height ft (m) of 145 (44)?`:
```sql
|
SELECT "street_address" FROM "timeline_of_tallest_buildings" WHERE "floors"=17; |
## Task
Generate a SQL query to answer the following question:
`What is the Street Address of the Building with 17 Floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Street Address of the Building with 17 Floors?`:
```sql
|
SELECT "name" FROM "timeline_of_tallest_buildings" WHERE "street_address"='100 north tampa street'; |
## Task
Generate a SQL query to answer the following question:
`What is the Name of the Building at 100 North Tampa Street?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Name of the Building at 100 North Tampa Street?`:
```sql
|
SELECT "away" FROM "european_record" WHERE "round"='q3'; |
## Task
Generate a SQL query to answer the following question:
`What away is there for the q3 round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_record" (
"round" text,
"opponents" text,
"home" text,
"away" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What away is there for the q3 round?`:
```sql
|
SELECT "aggregate" FROM "european_record" WHERE "opponents"='bayer leverkusen'; |
## Task
Generate a SQL query to answer the following question:
`What is the Aggregate of Bayer Leverkusen opponents?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_record" (
"round" text,
"opponents" text,
"home" text,
"away" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Aggregate of Bayer Leverkusen opponents?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "venue"='serravalle, san marino'; |
## Task
Generate a SQL query to answer the following question:
`What is the competition that was at serravalle, san marino?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the competition that was at serravalle, san marino?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.