output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MAX("year") FROM "achievements" WHERE "venue"='edmonton, canada'; |
## Task
Generate a SQL query to answer the following question:
`Which Year is the highest one that has a Venue of edmonton, canada?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year is the highest one that has a Venue of edmonton, canada?`:
```sql
|
SELECT "position" FROM "achievements" WHERE "competition"='world championships' AND "year">1997; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Competition of world championships, and a Year larger than 1997?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Competition of world championships, and a Year larger than 1997?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "notes"='heptathlon' AND "year"=1991; |
## Task
Generate a SQL query to answer the following question:
`Which Venue has a Notes of heptathlon, and a Year of 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Venue has a Notes of heptathlon, and a Year of 1991?`:
```sql
|
SELECT "days_held" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "wrestler"='noiz'; |
## Task
Generate a SQL query to answer the following question:
`What days held has noiz as the wrestler?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What days held has noiz as the wrestler?`:
```sql
|
SELECT "location" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "wrestler"='tatsuhito takaiwa'; |
## Task
Generate a SQL query to answer the following question:
`What location has tatsuhito takaiwa as the wrestler?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location has tatsuhito takaiwa as the wrestler?`:
```sql
|
SELECT "event" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "days_held"='8'; |
## Task
Generate a SQL query to answer the following question:
`What event has 8 as the days held?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event has 8 as the days held?`:
```sql
|
SELECT "event" FROM "pro_wrestling_zero1_version_disputed_bra" WHERE "days_held"='unknown'; |
## Task
Generate a SQL query to answer the following question:
`What event has unknown as the days held.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pro_wrestling_zero1_version_disputed_bra" (
"wrestler" text,
"reign" text,
"days_held" text,
"location" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event has unknown as the days held.?`:
```sql
|
SELECT "displacement" FROM "2011" WHERE "engine"='iveco f1ce3481e'; |
## Task
Generate a SQL query to answer the following question:
`What is the Displacement of the Iveco F1CE3481E Engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Displacement of the Iveco F1CE3481E Engine?`:
```sql
|
SELECT "displacement" FROM "2011" WHERE "model"='180 multijet power/3.0 hdi'; |
## Task
Generate a SQL query to answer the following question:
`What is the Displacement of the 180 Multijet Power/3.0 HDI Model?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Displacement of the 180 Multijet Power/3.0 HDI Model?`:
```sql
|
SELECT "valvetrain" FROM "2011" WHERE "model"='diesel engines'; |
## Task
Generate a SQL query to answer the following question:
`What is the Valvetrain of the Diesel Engines Model?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011" (
"model" text,
"engine" text,
"displacement" text,
"valvetrain" text,
"fuel_system" text,
"max_power_at_rpm" text,
"max_torque_at_rpm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Valvetrain of the Diesel Engines Model?`:
```sql
|
SELECT AVG("total") FROM "made_the_cut" WHERE "year_s_won"='1994 , 1997'; |
## Task
Generate a SQL query to answer the following question:
`Year(s) won of 1994 , 1997 has what average total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Year(s) won of 1994 , 1997 has what average total?`:
```sql
|
SELECT AVG("total") FROM "made_the_cut" WHERE "player"='corey pavin' AND "to_par">5; |
## Task
Generate a SQL query to answer the following question:
`Player of corey pavin, and a To par larger than 5 has what average total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Player of corey pavin, and a To par larger than 5 has what average total?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "total"<285 AND "to_par">1; |
## Task
Generate a SQL query to answer the following question:
`Total smaller than 285, and a To par larger than 1 belongs to what player?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Total smaller than 285, and a To par larger than 1 belongs to what player?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "total">285 AND "finish"='t30'; |
## Task
Generate a SQL query to answer the following question:
`Total larger than 285, and a Finish of t30 belongs to what player?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Total larger than 285, and a Finish of t30 belongs to what player?`:
```sql
|
SELECT "high_rebounds" FROM "game_log" WHERE "record"='18-20'; |
## Task
Generate a SQL query to answer the following question:
`Which player for a team with an 18-20 record had the most rebounds in a game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player for a team with an 18-20 record had the most rebounds in a game?`:
```sql
|
SELECT COUNT("area_km_2") FROM "islands_km" WHERE "island_s_name"='kruzof island'; |
## Task
Generate a SQL query to answer the following question:
`What is the total area of Kruzof island?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "islands_km" (
"rank" real,
"island_s_name" text,
"area_sqmi" real,
"area_km_2" real,
"location" text,
"population_2000" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total area of Kruzof island?`:
```sql
|
SELECT COUNT("frequency_m_hz") FROM "external_links" WHERE "class"='d' AND "call_sign"='k201bm' AND "erp_w"<74; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of frequency Mhz with class of d and call sign of k201bm and ERP W less than 74`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of frequency Mhz with class of d and call sign of k201bm and ERP W less than 74`:
```sql
|
SELECT MIN("frequency_m_hz") FROM "external_links" WHERE "call_sign"='k202ag'; |
## Task
Generate a SQL query to answer the following question:
`Name the least frequency Mhz with call sign of k202ag`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least frequency Mhz with call sign of k202ag`:
```sql
|
SELECT "class" FROM "external_links" WHERE "call_sign"='k220cp'; |
## Task
Generate a SQL query to answer the following question:
`Name the class with call sign of k220cp`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the class with call sign of k220cp`:
```sql
|
SELECT "record" FROM "schedule_and_results" WHERE "opponent"='winnipeg jets'; |
## Task
Generate a SQL query to answer the following question:
`What is the Winnipeg Jets record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Winnipeg Jets record?`:
```sql
|
SELECT "home" FROM "regular_season" WHERE "date"='november 8'; |
## Task
Generate a SQL query to answer the following question:
`What's the stadium on November 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the stadium on November 8?`:
```sql
|
SELECT "visitor" FROM "regular_season" WHERE "date"='march 17'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visitor on March 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visitor on March 17?`:
```sql
|
SELECT "score" FROM "regular_season" WHERE "home"='toronto maple leafs' AND "date"='november 10'; |
## Task
Generate a SQL query to answer the following question:
`What's the score for Toronto Maple Leafs on November 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the score for Toronto Maple Leafs on November 10?`:
```sql
|
SELECT "visitor" FROM "regular_season" WHERE "date"='october 31'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visitor on October 31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visitor on October 31?`:
```sql
|
SELECT "rank" FROM "motorcycle_grand_prix_results" WHERE "wins"=0 AND "class"='350cc'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank associated with 0 wins and a 350cc class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank associated with 0 wins and a 350cc class?`:
```sql
|
SELECT "run_2" FROM "women" WHERE "country"='australia' AND "run_1"<53.75; |
## Task
Generate a SQL query to answer the following question:
`What is the run 2 of the athlete from Australia with a run 1 less than 53.75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the run 2 of the athlete from Australia with a run 1 less than 53.75?`:
```sql
|
SELECT SUM("run_2") FROM "women" WHERE "country"='russia' AND "athlete"='maria orlova'; |
## Task
Generate a SQL query to answer the following question:
`What is the run 2 of athlete Maria Orlova from Russia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the run 2 of athlete Maria Orlova from Russia?`:
```sql
|
SELECT SUM("run_3") FROM "women" WHERE "run_1">53.75 AND "run_2"<52.91; |
## Task
Generate a SQL query to answer the following question:
`What is the run 3 of the athlete with a run 1 more than 53.75 and a run 2 less than 52.91?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the run 3 of the athlete with a run 1 more than 53.75 and a run 2 less than 52.91?`:
```sql
|
SELECT MIN("run_3") FROM "women" WHERE "run_2"<53.72 AND "run_1"=53.1; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest run 3 an athlete with a run 2 less than 53.72 and a run 1 of 53.1 has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest run 3 an athlete with a run 2 less than 53.72 and a run 1 of 53.1 has?`:
```sql
|
SELECT MIN("run_2") FROM "women" WHERE "run_1"=52.44 AND "run_3"<52.35; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest run 2 of the athlete with a run 1 of 52.44 and a run 3 less than 52.35?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"athlete" text,
"country" text,
"run_1" real,
"run_2" real,
"run_3" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest run 2 of the athlete with a run 1 of 52.44 and a run 3 less than 52.35?`:
```sql
|
SELECT MAX("points") FROM "standings" WHERE "top_5_s">1 AND "wins"=1 AND "poles">0 AND "driver"='andrew ranger'; |
## Task
Generate a SQL query to answer the following question:
`How many points are associated with over 1 top 5, 1 win, over 0 poles, and andrew ranger as the driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standings" (
"position" real,
"driver" text,
"wins" real,
"poles" real,
"top_5_s" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points are associated with over 1 top 5, 1 win, over 0 poles, and andrew ranger as the driver?`:
```sql
|
SELECT COUNT("points") FROM "standings" WHERE "poles"<0; |
## Task
Generate a SQL query to answer the following question:
`How many points are associated with 0 poles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standings" (
"position" real,
"driver" text,
"wins" real,
"poles" real,
"top_5_s" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points are associated with 0 poles?`:
```sql
|
SELECT SUM("wins") FROM "standings" WHERE "position"<6 AND "top_5_s"=8 AND "points"=1793; |
## Task
Generate a SQL query to answer the following question:
`How many wins are associated with a position of under 6, over 8 top 5s, and 1793 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standings" (
"position" real,
"driver" text,
"wins" real,
"poles" real,
"top_5_s" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins are associated with a position of under 6, over 8 top 5s, and 1793 points?`:
```sql
|
SELECT MIN("game_num") FROM "march" WHERE "home"='detroit'; |
## Task
Generate a SQL query to answer the following question:
`What is the first game that has a home team of Detroit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first game that has a home team of Detroit?`:
```sql
|
SELECT "home" FROM "march" WHERE "points">92; |
## Task
Generate a SQL query to answer the following question:
`Which home team has higher than 92 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team has higher than 92 points?`:
```sql
|
SELECT "team" FROM "test_centuries_by_nightwatchmen" WHERE "score"='101'; |
## Task
Generate a SQL query to answer the following question:
`what team's score is 101?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "test_centuries_by_nightwatchmen" (
"player" text,
"team" text,
"score" text,
"versus" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `what team's score is 101?`:
```sql
|
SELECT "team" FROM "test_centuries_by_nightwatchmen" WHERE "year"=1999 AND "versus"='zimbabwe'; |
## Task
Generate a SQL query to answer the following question:
`what team played against zimbabwe in 1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "test_centuries_by_nightwatchmen" (
"player" text,
"team" text,
"score" text,
"versus" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `what team played against zimbabwe in 1999?`:
```sql
|
SELECT "team" FROM "test_centuries_by_nightwatchmen" WHERE "year"=2006; |
## Task
Generate a SQL query to answer the following question:
`what is the team that played in 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "test_centuries_by_nightwatchmen" (
"player" text,
"team" text,
"score" text,
"versus" text,
"year" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the team that played in 2006?`:
```sql
|
SELECT MIN("points") FROM "highest_average_points_per_race_entered" WHERE "driver"='romain grosjean' AND "average_pre_2010"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest amount of points driver Romain Grosjean, who has an average pre-2010 less than 0, has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest amount of points driver Romain Grosjean, who has an average pre-2010 less than 0, has?`:
```sql
|
SELECT AVG("entries") FROM "highest_average_points_per_race_entered" WHERE "driver"='mark webber' AND "points">1014.5; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of entries driver Mark Webber, who has more than 1014.5 points, has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of entries driver Mark Webber, who has more than 1014.5 points, has?`:
```sql
|
SELECT MAX("average_points_per_race_entered") FROM "highest_average_points_per_race_entered" WHERE "points"<969 AND "average_pre_2010"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the highest average points per race of the driver with less than 969 points and an average pre-2010 less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest average points per race of the driver with less than 969 points and an average pre-2010 less than 0?`:
```sql
|
SELECT MIN("average_points_per_race_entered") FROM "highest_average_points_per_race_entered" WHERE "driver"='kimi räikkönen' AND "entries">194; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest average points per race entered of driver kimi räikkönen, who has more than 194 entries?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_average_points_per_race_entered" (
"driver" text,
"entries" real,
"points" real,
"average_points_per_race_entered" real,
"average_pre_2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest average points per race entered of driver kimi räikkönen, who has more than 194 entries?`:
```sql
|
SELECT MIN("game") FROM "schedule_and_results" WHERE "opponent"='chicago black hawks'; |
## Task
Generate a SQL query to answer the following question:
`What is the first game played against the Chicago Black Hawks?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"january" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first game played against the Chicago Black Hawks?`:
```sql
|
SELECT "opponent" FROM "premier_division" WHERE "date"='9 november 1991'; |
## Task
Generate a SQL query to answer the following question:
`Name the opponent for 9 november 1991`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "premier_division" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the opponent for 9 november 1991`:
```sql
|
SELECT MIN("losses") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "wins"<0; |
## Task
Generate a SQL query to answer the following question:
`Which Losses is the lowest one that has Wins smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Losses is the lowest one that has Wins smaller than 0?`:
```sql
|
SELECT "losses" FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "season">1941 AND "team"='hamilton wildcats' AND "ties"=0; |
## Task
Generate a SQL query to answer the following question:
`Which Losses have a Season larger than 1941, and a Team of hamilton wildcats, and Ties of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Losses have a Season larger than 1941, and a Team of hamilton wildcats, and Ties of 0?`:
```sql
|
SELECT SUM("season") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "ties"<1 AND "team"='vancouver grizzlies' AND "wins"<1; |
## Task
Generate a SQL query to answer the following question:
`Which Season has Ties smaller than 1, and a Team of vancouver grizzlies, and Wins smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Season has Ties smaller than 1, and a Team of vancouver grizzlies, and Wins smaller than 1?`:
```sql
|
SELECT COUNT("ties") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "wins"<1 AND "games"=6 AND "losses"=6 AND "season">1941; |
## Task
Generate a SQL query to answer the following question:
`How many Ties have Wins smaller than 1, and Games of 6, and Losses of 6, and a Season larger than 1941?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Ties have Wins smaller than 1, and Games of 6, and Losses of 6, and a Season larger than 1941?`:
```sql
|
SELECT AVG("wins") FROM "cfl_teams_with_one_or_no_wins_in_a_seaso" WHERE "team"='winnipeg blue bombers' AND "season">1964; |
## Task
Generate a SQL query to answer the following question:
`Which Wins have a Team of winnipeg blue bombers, and a Season larger than 1964?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_teams_with_one_or_no_wins_in_a_seaso" (
"season" real,
"team" text,
"games" real,
"wins" real,
"losses" real,
"ties" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Wins have a Team of winnipeg blue bombers, and a Season larger than 1964?`:
```sql
|
SELECT "class" FROM "motorcycle_grand_prix_results" WHERE "year">1985 AND "wins">0; |
## Task
Generate a SQL query to answer the following question:
`What engine class is associated with a year after 1985 and over 0 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What engine class is associated with a year after 1985 and over 0 wins?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "loss"='trout (7-4)'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent has a loss of trout (7-4)?`
### 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,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent has a loss of trout (7-4)?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "save"='smith (22)'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent has a save of smith (22)?`
### 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,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent has a save of smith (22)?`:
```sql
|
SELECT COUNT("gold") FROM "medal_table" WHERE "bronze">1 AND "silver">2; |
## Task
Generate a SQL query to answer the following question:
`How much Gold has a Bronze larger than 1, and a Silver larger than 2?`
### 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 `How much Gold has a Bronze larger than 1, and a Silver larger than 2?`:
```sql
|
SELECT AVG("total") FROM "medal_table" WHERE "nation"='japan (jpn)' AND "silver"<1; |
## Task
Generate a SQL query to answer the following question:
`Which Total has a Nation of japan (jpn), and a Silver smaller 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 `Which Total has a Nation of japan (jpn), and a Silver smaller than 1?`:
```sql
|
SELECT "margin_of_victory" FROM "pga_tour_wins_13" WHERE "tournament"='wgc-accenture match play championship'; |
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory in WGC-Accenture Match Play Championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the margin of victory in WGC-Accenture Match Play Championship?`:
```sql
|
SELECT "date" FROM "pga_tour_wins_13" WHERE "runner_s_up"='nick price'; |
## Task
Generate a SQL query to answer the following question:
`On what date was Nick Price the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was Nick Price the runner-up?`:
```sql
|
SELECT "margin_of_victory" FROM "pga_tour_wins_13" WHERE "runner_s_up"='nick price'; |
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory for Nick Price as a runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the margin of victory for Nick Price as a runner-up?`:
```sql
|
SELECT "margin_of_victory" FROM "pga_tour_wins_13" WHERE "tournament"='pga championship'; |
## Task
Generate a SQL query to answer the following question:
`What is the margin of victory for PGA Championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the margin of victory for PGA Championship?`:
```sql
|
SELECT "date" FROM "pga_tour_wins_13" WHERE "winning_score"='–20 (68-67-65-64=264)'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the winning score –20 (68-67-65-64=264)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the winning score –20 (68-67-65-64=264)?`:
```sql
|
SELECT "player" FROM "draft_picks" WHERE "position"='d' AND "round">3; |
## Task
Generate a SQL query to answer the following question:
`Which player was D past Round 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player was D past Round 3?`:
```sql
|
SELECT "round" FROM "draft_picks" WHERE "position"='f'; |
## Task
Generate a SQL query to answer the following question:
`Which Round was F picked?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round was F picked?`:
```sql
|
SELECT "position" FROM "draft_picks" WHERE "player"='ryan russell'; |
## Task
Generate a SQL query to answer the following question:
`What Position is Ryan Russell?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Position is Ryan Russell?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "round"=4; |
## Task
Generate a SQL query to answer the following question:
`What country does Round 4 come from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country does Round 4 come from?`:
```sql
|
SELECT "opponent" FROM "playoffs" WHERE "date"='april 14'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent was present on April 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent was present on April 14?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "date"='april 15'; |
## Task
Generate a SQL query to answer the following question:
`what team lost on april 15`
### 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,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team lost on april 15`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "date"='april 21'; |
## Task
Generate a SQL query to answer the following question:
`what team played on april 21`
### 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,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team played on april 21`:
```sql
|
SELECT "score" FROM "game_log" WHERE "date"='april 10'; |
## Task
Generate a SQL query to answer the following question:
`what team scored on april 10`
### 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,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team scored on april 10`:
```sql
|
SELECT "loser" FROM "preliminary_card" WHERE "time"='0:58'; |
## Task
Generate a SQL query to answer the following question:
`Who lost with a time of 0:58?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_card" (
"weight_division" text,
"winner" text,
"loser" text,
"method" text,
"round" real,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who lost with a time of 0:58?`:
```sql
|
SELECT AVG("round") FROM "preliminary_card" WHERE "winner"='rafael cavalcante'; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of rounds for winner Rafael Cavalcante?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_card" (
"weight_division" text,
"winner" text,
"loser" text,
"method" text,
"round" real,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of rounds for winner Rafael Cavalcante?`:
```sql
|
SELECT "method" FROM "preliminary_card" WHERE "time"='2:32'; |
## Task
Generate a SQL query to answer the following question:
`What win method has a time of 2:32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_card" (
"weight_division" text,
"winner" text,
"loser" text,
"method" text,
"round" real,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What win method has a time of 2:32?`:
```sql
|
SELECT "1_credit" FROM "double_double_bonus" WHERE "5_credits"='800' AND "hand"='four aces'; |
## Task
Generate a SQL query to answer the following question:
`If Four aces yields 800 for 5 credits, what would the result be for 1 Credit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "double_double_bonus" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
### SQL
Given the database schema, here is the SQL query that answers `If Four aces yields 800 for 5 credits, what would the result be for 1 Credit?`:
```sql
|
SELECT SUM("points") FROM "world_championship_group_c_denmark" WHERE "lost"=0 AND "games">8; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of points values that are associated with 0 losses and more than 8 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of points values that are associated with 0 losses and more than 8 games?`:
```sql
|
SELECT MIN("lost") FROM "world_championship_group_c_denmark" WHERE "points">13 AND "games"<8; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest losses associated with more than 13 points and fewer than 8 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest losses associated with more than 13 points and fewer than 8 games?`:
```sql
|
SELECT "points_difference" FROM "world_championship_group_c_denmark" WHERE "points">2 AND "lost"<3 AND "drawn"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the difference associated with more than 2 points, fewer than 3 losses, and fewer than 1 draw?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the difference associated with more than 2 points, fewer than 3 losses, and fewer than 1 draw?`:
```sql
|
SELECT MIN("points") FROM "world_championship_group_c_denmark" WHERE "games">8; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest number of points associated with more than 8 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_group_c_denmark" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest number of points associated with more than 8 games?`:
```sql
|
SELECT "title" FROM "1921_1930" WHERE "role"='richard kolner'; |
## Task
Generate a SQL query to answer the following question:
`Which title did richard kolner play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1921_1930" (
"title" text,
"date" text,
"theatre" text,
"role" text,
"dance_partner" text,
"director" text,
"lyrics" text,
"music" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title did richard kolner play?`:
```sql
|
SELECT "title" FROM "1921_1930" WHERE "dance_partner"='adele astaire' AND "lyrics"='ira gershwin' AND "director"='felix edwardes'; |
## Task
Generate a SQL query to answer the following question:
`Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1921_1930" (
"title" text,
"date" text,
"theatre" text,
"role" text,
"dance_partner" text,
"director" text,
"lyrics" text,
"music" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?`:
```sql
|
SELECT "role" FROM "1921_1930" WHERE "theatre"='globe' AND "music"='jerome kern'; |
## Task
Generate a SQL query to answer the following question:
`Which Role has a Theatre of globe, and a Music of jerome kern?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1921_1930" (
"title" text,
"date" text,
"theatre" text,
"role" text,
"dance_partner" text,
"director" text,
"lyrics" text,
"music" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Role has a Theatre of globe, and a Music of jerome kern?`:
```sql
|
SELECT "name" FROM "proposed" WHERE "year_est"='2012'; |
## Task
Generate a SQL query to answer the following question:
`what name was on the year 2012`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposed" (
"rank" real,
"name" text,
"height_ft_m" text,
"year_est" text,
"city" text
);
### SQL
Given the database schema, here is the SQL query that answers `what name was on the year 2012`:
```sql
|
SELECT "name" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "spouse"='charles ii'; |
## Task
Generate a SQL query to answer the following question:
`Which member of house of Habsburg-Lorraine had the spouse Charles II?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which member of house of Habsburg-Lorraine had the spouse Charles II?`:
```sql
|
SELECT "marriage" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "death"='29 december 1829'; |
## Task
Generate a SQL query to answer the following question:
`What is the marriage date for the Habsburg-Lorraine house member who died 29 December 1829?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the marriage date for the Habsburg-Lorraine house member who died 29 December 1829?`:
```sql
|
SELECT "ceased_to_be_duchess" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "became_duchess"='7/8 april 1766'; |
## Task
Generate a SQL query to answer the following question:
`When did the duchess who became duchess on 7/8 April 1766 cease to be duchess?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the duchess who became duchess on 7/8 April 1766 cease to be duchess?`:
```sql
|
SELECT "death" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "birth"='30 october 1797'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of death of the duchess born on 30 October 1797?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of death of the duchess born on 30 October 1797?`:
```sql
|
SELECT "birth" FROM "house_of_habsburg_lorraine_1765_1918" WHERE "marriage"='1 may 1844'; |
## Task
Generate a SQL query to answer the following question:
`What is the birth date of the duchess who married on 1 May 1844?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "house_of_habsburg_lorraine_1765_1918" (
"name" text,
"birth" text,
"marriage" text,
"became_duchess" text,
"ceased_to_be_duchess" text,
"death" text,
"spouse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the birth date of the duchess who married on 1 May 1844?`:
```sql
|
SELECT MAX("pick") FROM "nba_draft" WHERE "round"=7; |
## Task
Generate a SQL query to answer the following question:
`What is the highest numbered pick from round 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nba_draft" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest numbered pick from round 7?`:
```sql
|
SELECT COUNT("played") FROM "torneio_rio_s_o_paulo" WHERE "against">11 AND "team"='botafogo' AND "position"<2; |
## Task
Generate a SQL query to answer the following question:
`How much Played has an Against larger than 11, and a Team of botafogo, and a Position smaller than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much Played has an Against larger than 11, and a Team of botafogo, and a Position smaller than 2?`:
```sql
|
SELECT AVG("drawn") FROM "torneio_rio_s_o_paulo" WHERE "points"<14 AND "lost"<4 AND "played">9; |
## Task
Generate a SQL query to answer the following question:
`Which average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?`:
```sql
|
SELECT MIN("played") FROM "torneio_rio_s_o_paulo" WHERE "team"='vasco da gama' AND "against"<11; |
## Task
Generate a SQL query to answer the following question:
`Which Played is the lowest one that has a Team of vasco da gama, and an Against smaller than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Played is the lowest one that has a Team of vasco da gama, and an Against smaller than 11?`:
```sql
|
SELECT SUM("played") FROM "torneio_rio_s_o_paulo" WHERE "lost">4 AND "team"='américa' AND "points"<5; |
## Task
Generate a SQL query to answer the following question:
`Which Played has a Lost larger than 4, and a Team of américa, and Points smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Played has a Lost larger than 4, and a Team of américa, and Points smaller than 5?`:
```sql
|
SELECT SUM("lost") FROM "torneio_rio_s_o_paulo" WHERE "position"=3 AND "drawn">3; |
## Task
Generate a SQL query to answer the following question:
`Which Lost has a Position of 3, and a Drawn larger than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lost has a Position of 3, and a Drawn larger than 3?`:
```sql
|
SELECT COUNT("lost") FROM "torneio_rio_s_o_paulo" WHERE "drawn">1 AND "points"<14 AND "against">10; |
## Task
Generate a SQL query to answer the following question:
`How much Lost has a Drawn larger than 1, and Points smaller than 14, and an Against larger than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much Lost has a Drawn larger than 1, and Points smaller than 14, and an Against larger than 10?`:
```sql
|
SELECT "tournament" FROM "singles_6_2_titles_4_runners_up" WHERE "opponent"='yvonne vermaak'; |
## Task
Generate a SQL query to answer the following question:
`What tournament has yvonne vermaak as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_6_2_titles_4_runners_up" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What tournament has yvonne vermaak as the opponent?`:
```sql
|
SELECT "outcome" FROM "singles_6_2_titles_4_runners_up" WHERE "opponent"='yvonne vermaak'; |
## Task
Generate a SQL query to answer the following question:
`What outcome has yvonne vermaak as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_6_2_titles_4_runners_up" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What outcome has yvonne vermaak as the opponent?`:
```sql
|
SELECT "outcome" FROM "singles_6_2_titles_4_runners_up" WHERE "tournament"='hershey'; |
## Task
Generate a SQL query to answer the following question:
`What is the outcome for the Hershey tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_6_2_titles_4_runners_up" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the outcome for the Hershey tournament?`:
```sql
|
SELECT "opponent" FROM "regular_season" WHERE "save"='ni fu-deh'; |
## Task
Generate a SQL query to answer the following question:
`Who played against Save Of Ni Fu-Deh?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played against Save Of Ni Fu-Deh?`:
```sql
|
SELECT "loss" FROM "regular_season" WHERE "opponent"='chinatrust whales' AND "save"='miguel saladin'; |
## Task
Generate a SQL query to answer the following question:
`What's the loss of who has a Save of Miguel Saladin and played against Chinatrust Whales?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the loss of who has a Save of Miguel Saladin and played against Chinatrust Whales?`:
```sql
|
SELECT "opponent" FROM "regular_season" WHERE "loss"='diegomar markwell'; |
## Task
Generate a SQL query to answer the following question:
`Who's the opponent when Diegomar Markwell is the loss?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"save" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the opponent when Diegomar Markwell is the loss?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "record"='86-71'; |
## Task
Generate a SQL query to answer the following question:
`what game had a score of 86-71`
### 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what game had a score of 86-71`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='september 14'; |
## Task
Generate a SQL query to answer the following question:
`what game took place on september 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what game took place on september 14`:
```sql
|
SELECT "record" FROM "game_log" WHERE "attendance"='21,629'; |
## Task
Generate a SQL query to answer the following question:
`what game had an attendance of 21,629`
### 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" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what game had an attendance of 21,629`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.