output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "away_team" FROM "round_14" WHERE "venue"='punt road oval'; |
## Task
Generate a SQL query to answer the following question:
`What is the away team's score at punt road oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the away team's score at punt road oval?`:
```sql
|
SELECT "home" FROM "december" WHERE "score"='116–105'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team at the Nuggets game that had a score of 116–105?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home team at the Nuggets game that had a score of 116–105?`:
```sql
|
SELECT MIN("laps") FROM "race" WHERE "time_retired"='+2 laps' AND "grid"=20; |
## Task
Generate a SQL query to answer the following question:
`Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "driver"='eddie irvine'; |
## Task
Generate a SQL query to answer the following question:
`I want the time/retired for eddie irvine`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want the time/retired for eddie irvine`:
```sql
|
SELECT "date" FROM "season_review" WHERE "winning_driver"='rodger ward'; |
## Task
Generate a SQL query to answer the following question:
`What date was Rodger Ward the winning driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was Rodger Ward the winning driver?`:
```sql
|
SELECT "constructor" FROM "season_review" WHERE "winning_driver"='jack brabham' AND "race"='monaco grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix?`:
```sql
|
SELECT "winning_driver" FROM "season_review" WHERE "pole_position"='joakim bonnier'; |
## Task
Generate a SQL query to answer the following question:
`What driver was the winner when Joakim Bonnier was in the Pole Position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What driver was the winner when Joakim Bonnier was in the Pole Position?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "tyre"='d' AND "winning_driver"='bruce mclaren'; |
## Task
Generate a SQL query to answer the following question:
`What date was the Tyre d and Bruce Mclaren won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the Tyre d and Bruce Mclaren won?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "pole_position"='joakim bonnier'; |
## Task
Generate a SQL query to answer the following question:
`What date was Joakim Bonnier in the pole position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"circuit" text,
"date" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"tyre" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was Joakim Bonnier in the pole position?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"=19; |
## Task
Generate a SQL query to answer the following question:
`What is the time for the racer on grid 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time for the racer on grid 19?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "grid"<7 AND "laps">35 AND "driver"='alberto ascari'; |
## Task
Generate a SQL query to answer the following question:
`Who made the car that Alberto Ascari went more than 35 laps on a grid less than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who made the car that Alberto Ascari went more than 35 laps on a grid less than 7?`:
```sql
|
SELECT "driver" FROM "classification" WHERE "laps">9 AND "grid"=7; |
## Task
Generate a SQL query to answer the following question:
`What driver raced for more than 9 laps on grid 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What driver raced for more than 9 laps on grid 7?`:
```sql
|
SELECT "riding" FROM "14_seats" WHERE "votes">'7,190' AND "candidate"='patricia cordner'; |
## Task
Generate a SQL query to answer the following question:
`What is the Riding of the candidate Patricia Cordner who gained 7,190 votes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "14_seats" (
"riding" text,
"candidate" text,
"gender" text,
"residence" text,
"occupation" text,
"votes" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Riding of the candidate Patricia Cordner who gained 7,190 votes?`:
```sql
|
SELECT "license" FROM "list_of_computer_system_emulators" WHERE "actual_version"='9.0'; |
## Task
Generate a SQL query to answer the following question:
`Which License has an Actual Vaersion of 9.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_computer_system_emulators" (
"name" text,
"actual_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which License has an Actual Vaersion of 9.0?`:
```sql
|
SELECT "system" FROM "list_of_computer_system_emulators" WHERE "actual_version"='9.0'; |
## Task
Generate a SQL query to answer the following question:
`Which System has an Actual Version 9.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_computer_system_emulators" (
"name" text,
"actual_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which System has an Actual Version 9.0?`:
```sql
|
SELECT "system" FROM "list_of_computer_system_emulators" WHERE "name"='gemulator'; |
## Task
Generate a SQL query to answer the following question:
`Which System's Name is Gemulator?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_computer_system_emulators" (
"name" text,
"actual_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which System's Name is Gemulator?`:
```sql
|
SELECT "system" FROM "list_of_computer_system_emulators" WHERE "license"='freeware' AND "name"='steem'; |
## Task
Generate a SQL query to answer the following question:
`Which System's Name is Steem, and has a Freeware License?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_computer_system_emulators" (
"name" text,
"actual_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which System's Name is Steem, and has a Freeware License?`:
```sql
|
SELECT "record" FROM "november" WHERE "decision"='holmqvist' AND "attendance">'16,526' AND "visitor"='carolina'; |
## Task
Generate a SQL query to answer the following question:
`What was the Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvist?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvist?`:
```sql
|
SELECT "date" FROM "november" WHERE "record"='10–13–2'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game when the Lightning had a record of 10–13–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game when the Lightning had a record of 10–13–2?`:
```sql
|
SELECT "date" FROM "november" WHERE "record"='9–8–1'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game when the Lightning had a record of 9–8–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game when the Lightning had a record of 9–8–1?`:
```sql
|
SELECT "decision" FROM "november" WHERE "record"='6–8–1'; |
## Task
Generate a SQL query to answer the following question:
`What was the decision of the game when the Lightning had a record of 6–8–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the decision of the game when the Lightning had a record of 6–8–1?`:
```sql
|
SELECT AVG("pick") FROM "round_4" WHERE "player"='dominic uy'; |
## Task
Generate a SQL query to answer the following question:
`What pick was Dominic Uy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What pick was Dominic Uy?`:
```sql
|
SELECT "college" FROM "round_4" WHERE "pick"=33; |
## Task
Generate a SQL query to answer the following question:
`What college did pick 33 attend?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did pick 33 attend?`:
```sql
|
SELECT "elevation_msl" FROM "population_by_district" WHERE "housing_2007"='91,385'; |
## Task
Generate a SQL query to answer the following question:
`What is the elevation of the city with a number of 91,385 Housing dwellings in 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_by_district" (
"city_district" text,
"area_km" text,
"population_2007_census_hab" text,
"housing_2007" text,
"density_hab_km" text,
"elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the elevation of the city with a number of 91,385 Housing dwellings in 2007?`:
```sql
|
SELECT "density_hab_km" FROM "population_by_district" WHERE "city_district"='san sebastián'; |
## Task
Generate a SQL query to answer the following question:
`What is the density of San Sebastián?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_by_district" (
"city_district" text,
"area_km" text,
"population_2007_census_hab" text,
"housing_2007" text,
"density_hab_km" text,
"elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the density of San Sebastián?`:
```sql
|
SELECT "density_hab_km" FROM "population_by_district" WHERE "elevation_msl"='3,400 msl'; |
## Task
Generate a SQL query to answer the following question:
`What is the density of the city with an elevation of 3,400 msl?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_by_district" (
"city_district" text,
"area_km" text,
"population_2007_census_hab" text,
"housing_2007" text,
"density_hab_km" text,
"elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the density of the city with an elevation of 3,400 msl?`:
```sql
|
SELECT "area_km" FROM "population_by_district" WHERE "density_hab_km"='8,546.1'; |
## Task
Generate a SQL query to answer the following question:
`What is the area of the city with a density of 8,546.1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_by_district" (
"city_district" text,
"area_km" text,
"population_2007_census_hab" text,
"housing_2007" text,
"density_hab_km" text,
"elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area of the city with a density of 8,546.1?`:
```sql
|
SELECT "area_km" FROM "population_by_district" WHERE "density_hab_km"='955.6'; |
## Task
Generate a SQL query to answer the following question:
`What is the area of the city with a density of 955.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_by_district" (
"city_district" text,
"area_km" text,
"population_2007_census_hab" text,
"housing_2007" text,
"density_hab_km" text,
"elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area of the city with a density of 955.6?`:
```sql
|
SELECT "density_hab_km" FROM "population_by_district" WHERE "city_district"='san sebastián'; |
## Task
Generate a SQL query to answer the following question:
`What is the density of San Sebastián?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_by_district" (
"city_district" text,
"area_km" text,
"population_2007_census_hab" text,
"housing_2007" text,
"density_hab_km" text,
"elevation_msl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the density of San Sebastián?`:
```sql
|
SELECT "result" FROM "original_broadway_production" WHERE "category"='best book of a musical'; |
## Task
Generate a SQL query to answer the following question:
`Which Result has a Category of best book of a musical?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "original_broadway_production" (
"year" real,
"award_ceremony" text,
"category" text,
"nominee" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Category of best book of a musical?`:
```sql
|
SELECT "nominee" FROM "original_broadway_production" WHERE "category"='outstanding musical'; |
## Task
Generate a SQL query to answer the following question:
`Which Nominee has a Category of outstanding musical?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "original_broadway_production" (
"year" real,
"award_ceremony" text,
"category" text,
"nominee" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nominee has a Category of outstanding musical?`:
```sql
|
SELECT "time" FROM "track_records" WHERE "record"='nascar camping world truck series'; |
## Task
Generate a SQL query to answer the following question:
`What is the record time at the Nascar Camping World Truck Series?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_records" (
"record" text,
"date" text,
"driver" text,
"time" text,
"speed_avg_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record time at the Nascar Camping World Truck Series?`:
```sql
|
SELECT "record" FROM "track_records" WHERE "date"='nascar nationwide series'; |
## Task
Generate a SQL query to answer the following question:
`What date was the nascar nationwide series held?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_records" (
"record" text,
"date" text,
"driver" text,
"time" text,
"speed_avg_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the nascar nationwide series held?`:
```sql
|
SELECT "record" FROM "track_records" WHERE "time"='24.521'; |
## Task
Generate a SQL query to answer the following question:
`Who holds the record time of 24.521 and where was it made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_records" (
"record" text,
"date" text,
"driver" text,
"time" text,
"speed_avg_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who holds the record time of 24.521 and where was it made?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"='9'; |
## Task
Generate a SQL query to answer the following question:
`Which time/retired has a grid of 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which time/retired has a grid of 9?`:
```sql
|
SELECT "driver" FROM "race" WHERE "grid"='6'; |
## Task
Generate a SQL query to answer the following question:
`Which driver's grid is 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver's grid is 6?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "driver"='juan manuel fangio'; |
## Task
Generate a SQL query to answer the following question:
`For which constructor does Juan Manuel Fangio drive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `For which constructor does Juan Manuel Fangio drive?`:
```sql
|
SELECT "laps" FROM "race" WHERE "grid"='8'; |
## Task
Generate a SQL query to answer the following question:
`Which laps has a grid of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which laps has a grid of 8?`:
```sql
|
SELECT "grid" FROM "race" WHERE "constructor"='maserati' AND "driver"='oscar alfredo gálvez'; |
## Task
Generate a SQL query to answer the following question:
`Which grid is constructed by Maserati and driven by Oscar Alfredo Gálvez?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which grid is constructed by Maserati and driven by Oscar Alfredo Gálvez?`:
```sql
|
SELECT "engine" FROM "teams_and_drivers" WHERE "driver"='ken downing' AND "entrant"='connaught engineering'; |
## Task
Generate a SQL query to answer the following question:
`what was the engine when ken downing drove an entrant from connaught engineering?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the engine when ken downing drove an entrant from connaught engineering?`:
```sql
|
SELECT "constructor" FROM "teams_and_drivers" WHERE "driver"='eric brandon'; |
## Task
Generate a SQL query to answer the following question:
`who built the car driven by eric brandon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `who built the car driven by eric brandon?`:
```sql
|
SELECT "chassis" FROM "teams_and_drivers" WHERE "constructor"='simca-gordini' AND "driver"='max de terra'; |
## Task
Generate a SQL query to answer the following question:
`what was the chassis built by simca-gordini and driven by max de terra?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the chassis built by simca-gordini and driven by max de terra?`:
```sql
|
SELECT "entrant" FROM "teams_and_drivers" WHERE "driver"='kenneth mcalpine'; |
## Task
Generate a SQL query to answer the following question:
`kenneth mcalpine drove from which entrant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `kenneth mcalpine drove from which entrant?`:
```sql
|
SELECT "driver" FROM "teams_and_drivers" WHERE "rounds"='6' AND "chassis"='52 51/52'; |
## Task
Generate a SQL query to answer the following question:
`with 6 rounds, and a 52 51/52 chassis, who is the driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_drivers" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `with 6 rounds, and a 52 51/52 chassis, who is the driver?`:
```sql
|
SELECT AVG("attendance") FROM "game_log" WHERE "opponent"='braves' AND "record"='56-53'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance when the Braves were the opponent and the record was 56-53?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance when the Braves were the opponent and the record was 56-53?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='61-57'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent when the record was 61-57?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent when the record was 61-57?`:
```sql
|
SELECT COUNT("laps") FROM "classification" WHERE "driver"='jochen rindt'; |
## Task
Generate a SQL query to answer the following question:
`How many laps for jochen rindt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps for jochen rindt?`:
```sql
|
SELECT COUNT("grid") FROM "classification" WHERE "driver"='jean-pierre beltoise'; |
## Task
Generate a SQL query to answer the following question:
`What is the grid total for jean-pierre beltoise?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid total for jean-pierre beltoise?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='tony mendoza'; |
## Task
Generate a SQL query to answer the following question:
`What was the time for the event in which Tony Mendoza was the opponent?`
### 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 the time for the event in which Tony Mendoza was the opponent?`:
```sql
|
SELECT AVG("laps") FROM "125cc_classification" WHERE "time_retired"='+23.707' AND "grid">21; |
## Task
Generate a SQL query to answer the following question:
`What is the average lap time for retired time of +23.707 and a Grid greater than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average lap time for retired time of +23.707 and a Grid greater than 21?`:
```sql
|
SELECT "crowd" FROM "round_8" WHERE "away_team_score"='9.8 (62)'; |
## Task
Generate a SQL query to answer the following question:
`When the away team scored 9.8 (62) what was the crowd turnout?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the away team scored 9.8 (62) what was the crowd turnout?`:
```sql
|
SELECT "home_team" FROM "round_8" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`Which home team plays at victoria park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team plays at victoria park?`:
```sql
|
SELECT MIN("avg") FROM "wide_receivers" WHERE "yards"=6 AND "rec">1; |
## Task
Generate a SQL query to answer the following question:
`Tell me the lowest avg for 6 yards and rec more than 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the lowest avg for 6 yards and rec more than 1`:
```sql
|
SELECT SUM("long") FROM "wide_receivers" WHERE "avg">9.8 AND "rec"<5 AND "yards"<20; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of long for avg more than 9.8 with rec less than 5 and yards less than 20`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of long for avg more than 9.8 with rec less than 5 and yards less than 20`:
```sql
|
SELECT SUM("long") FROM "wide_receivers" WHERE "avg"<6 AND "rec"<2; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of long for avg less than 6 and rec less than 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of long for avg less than 6 and rec less than 2`:
```sql
|
SELECT AVG("td_s") FROM "wide_receivers" WHERE "player"='andy mccullough' AND "yards"<434; |
## Task
Generate a SQL query to answer the following question:
`Name the average TD's for andy mccullough with yards less than 434`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average TD's for andy mccullough with yards less than 434`:
```sql
|
SELECT MIN("decile") FROM "waitemata_local_board" WHERE "roll"=428; |
## Task
Generate a SQL query to answer the following question:
`Name the lelast decile for roll of 428`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "waitemata_local_board" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the lelast decile for roll of 428`:
```sql
|
SELECT MAX("decile") FROM "waitemata_local_board" WHERE "roll"=428; |
## Task
Generate a SQL query to answer the following question:
`Name the most decile for roll of 428`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "waitemata_local_board" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most decile for roll of 428`:
```sql
|
SELECT MAX("year") FROM "night_series_winners_1977_1987" WHERE "winners"='hawthorn' AND "season_result"='preliminary finalist' AND "crowd"<'27,407'; |
## Task
Generate a SQL query to answer the following question:
`What's the highest year than hawthorn won with a season result of preliminary finalist and a crowd smaller than 27,407?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "night_series_winners_1977_1987" (
"year" real,
"winners" text,
"grand_finalist" text,
"scores" text,
"venue" text,
"crowd" real,
"margin" real,
"season_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest year than hawthorn won with a season result of preliminary finalist and a crowd smaller than 27,407?`:
```sql
|
SELECT "scores" FROM "night_series_winners_1977_1987" WHERE "grand_finalist"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What scores did grand finalist hawthorn have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "night_series_winners_1977_1987" (
"year" real,
"winners" text,
"grand_finalist" text,
"scores" text,
"venue" text,
"crowd" real,
"margin" real,
"season_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What scores did grand finalist hawthorn have?`:
```sql
|
SELECT "grand_finalist" FROM "night_series_winners_1977_1987" WHERE "year">1979 AND "margin"<30 AND "winners"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`What grand finalist had a year after 1979, a margin smaller than 30, and winners of essendon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "night_series_winners_1977_1987" (
"year" real,
"winners" text,
"grand_finalist" text,
"scores" text,
"venue" text,
"crowd" real,
"margin" real,
"season_result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What grand finalist had a year after 1979, a margin smaller than 30, and winners of essendon?`:
```sql
|
SELECT SUM("numer_of_jamaicans_granted_british_citizenship") FROM "population_and_distribution" WHERE "year"=2004 AND "registration_of_a_minor_child">640; |
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of number of jamaicans given british citizenship for 2004 and registration of a minor child more than 640`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "population_and_distribution" (
"year" real,
"numer_of_jamaicans_granted_british_citizenship" real,
"naturalisation_by_residence" real,
"naturalisation_by_marriage" real,
"registration_of_a_minor_child" real,
"registration_by_other_means" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of number of jamaicans given british citizenship for 2004 and registration of a minor child more than 640`:
```sql
|
SELECT "team_league" FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp"<52 AND "pick_num"=130; |
## Task
Generate a SQL query to answer the following question:
`What team played under 52 Reg GP, and picked 130?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team played under 52 Reg GP, and picked 130?`:
```sql
|
SELECT MAX("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num">9; |
## Task
Generate a SQL query to answer the following question:
`What is the highest PL GP for a round greater than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest PL GP for a round greater than 9?`:
```sql
|
SELECT "title" FROM "track_listing" WHERE "time"='4:22'; |
## Task
Generate a SQL query to answer the following question:
`Which title has a length of 4:22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"composer_s" text,
"guest_performer" text,
"producer_s" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title has a length of 4:22?`:
```sql
|
SELECT "composer_s" FROM "track_listing" WHERE "time"='2:50'; |
## Task
Generate a SQL query to answer the following question:
`Which composer has a track length of 2:50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"composer_s" text,
"guest_performer" text,
"producer_s" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which composer has a track length of 2:50?`:
```sql
|
SELECT "title" FROM "track_listing" WHERE "guest_performer"='black ice' AND "time"='5:49'; |
## Task
Generate a SQL query to answer the following question:
`Which title has a Black Ice for a guest performer and a length of 5:49?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"composer_s" text,
"guest_performer" text,
"producer_s" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title has a Black Ice for a guest performer and a length of 5:49?`:
```sql
|
SELECT "guest_performer" FROM "track_listing" WHERE "time"='5:49'; |
## Task
Generate a SQL query to answer the following question:
`Which guest performer has a track length of 5:49?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"title" text,
"composer_s" text,
"guest_performer" text,
"producer_s" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which guest performer has a track length of 5:49?`:
```sql
|
SELECT "score" FROM "january" WHERE "visitor"='philadelphia'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when philadelphia visited?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when philadelphia visited?`:
```sql
|
SELECT "attendance" FROM "january" WHERE "decision"='weekes'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game with weekes recording the decision?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended the game with weekes recording the decision?`:
```sql
|
SELECT "digital_channel" FROM "tv_stations" WHERE "owner"='three angels broadcasting network'; |
## Task
Generate a SQL query to answer the following question:
`What digital channel does Three Angels Broadcasting Network own?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tv_stations" (
"channel" real,
"digital_channel" text,
"call_sign" text,
"affiliation" text,
"owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What digital channel does Three Angels Broadcasting Network own?`:
```sql
|
SELECT "championship" FROM "runner_ups_5" WHERE "score"='6–3, 2–6, 3–6, 6–3, 3–6'; |
## Task
Generate a SQL query to answer the following question:
`What Championship has Scores of 6–3, 2–6, 3–6, 6–3, 3–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "runner_ups_5" (
"year" real,
"championship" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Championship has Scores of 6–3, 2–6, 3–6, 6–3, 3–6?`:
```sql
|
SELECT "date" FROM "round_15" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game where Geelong was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the game where Geelong was the away team?`:
```sql
|
SELECT "home_team" FROM "round_15" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team of the game where Geelong was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of the game where Geelong was the away team?`:
```sql
|
SELECT "venue" FROM "round_15" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue of the game where Geelong was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue of the game where Geelong was the away team?`:
```sql
|
SELECT "date" FROM "round_15" WHERE "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game where St Kilda is the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the game where St Kilda is the home team?`:
```sql
|
SELECT "home_team_score" FROM "round_15" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team's score of the game where South Melbourne is the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team's score of the game where South Melbourne is the away team?`:
```sql
|
SELECT "away_team_score" FROM "round_15" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the away team's score of the game where the away team is Geelong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the away team's score of the game where the away team is Geelong?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "competition"='2004 afc asian cup qualification' AND "date"='november 18, 2003'; |
## Task
Generate a SQL query to answer the following question:
`Which venue hosted the 2004 AFC Asian Cup qualification on November 18, 2003?`
### 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 `Which venue hosted the 2004 AFC Asian Cup qualification on November 18, 2003?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "result"='draw' AND "competition"='friendly' AND "venue"='dubai'; |
## Task
Generate a SQL query to answer the following question:
`On what date did a friendly competition, hosted in Dubai, result in a draw?`
### 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 `On what date did a friendly competition, hosted in Dubai, result in a draw?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "score"='3-0' AND "date"='december 7, 2002'; |
## Task
Generate a SQL query to answer the following question:
`What venue hosted a match with a 3-0 score on December 7, 2002?`
### 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 venue hosted a match with a 3-0 score on December 7, 2002?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "score"='2-0' AND "venue"='amman'; |
## Task
Generate a SQL query to answer the following question:
`What competition resulted in 2-0 score, hosted in Amman?`
### 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 competition resulted in 2-0 score, hosted in Amman?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "venue"='kuwait city'; |
## Task
Generate a SQL query to answer the following question:
`On what date was Kuwait City a venue?`
### 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 `On what date was Kuwait City a venue?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='26–32'; |
## Task
Generate a SQL query to answer the following question:
`Who did the Mariners play when their record was 26–32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Mariners play when their record was 26–32?`:
```sql
|
SELECT "away_team" FROM "round_11" WHERE "away_team_score"='12.11 (83)'; |
## Task
Generate a SQL query to answer the following question:
`What Away team had a score of 12.11 (83)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Away team had a score of 12.11 (83)?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "laps"=49 AND "constructor"='vanwall'; |
## Task
Generate a SQL query to answer the following question:
`What was the Vanwall time/retired with 49 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Vanwall time/retired with 49 laps?`:
```sql
|
SELECT SUM("laps") FROM "classification" WHERE "time_retired"='engine' AND "grid"=1; |
## Task
Generate a SQL query to answer the following question:
`How many laps did the grid 1 engine have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps did the grid 1 engine have?`:
```sql
|
SELECT MAX("laps") FROM "classification" WHERE "grid">13 AND "time_retired"='engine' AND "driver"='luigi piotti'; |
## Task
Generate a SQL query to answer the following question:
`What was the highest lap for Luigi Piotti with more than 13 grid and a time/retired engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the highest lap for Luigi Piotti with more than 13 grid and a time/retired engine?`:
```sql
|
SELECT MIN("pick_num") FROM "nfl_draft" WHERE "position"='cornerback' AND "round"<1; |
## Task
Generate a SQL query to answer the following question:
`What Cornerback has the lowest Pick # and Round of less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Cornerback has the lowest Pick # and Round of less than 1?`:
```sql
|
SELECT "position" FROM "nfl_draft" WHERE "pick_num"=77; |
## Task
Generate a SQL query to answer the following question:
`What is the Position of Pick #77?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Position of Pick #77?`:
```sql
|
SELECT COUNT("attendance") FROM "game_log" WHERE "date"='august 12'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game on August 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended the game on August 12?`:
```sql
|
SELECT MAX("crowd") FROM "round_6" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest crowd with Home team of hawthorn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest crowd with Home team of hawthorn?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "home_team_score"='12.15 (87)'; |
## Task
Generate a SQL query to answer the following question:
`What away team score also has a Home team score of 12.15 (87)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What away team score also has a Home team score of 12.15 (87)?`:
```sql
|
SELECT "home_team_score" FROM "round_6" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score with Fitzroy as away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team score with Fitzroy as away team?`:
```sql
|
SELECT "home_team" FROM "round_6" WHERE "venue"='glenferrie oval'; |
## Task
Generate a SQL query to answer the following question:
`What is glenferrie oval's home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is glenferrie oval's home team?`:
```sql
|
SELECT "super_g" FROM "season_standings" WHERE "overall"='16'; |
## Task
Generate a SQL query to answer the following question:
`What is the Super G value for the season that has an Overall score of 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_standings" (
"season" real,
"overall" text,
"slalom" text,
"super_g" text,
"downhill" text,
"combined" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Super G value for the season that has an Overall score of 16?`:
```sql
|
SELECT MIN("season") FROM "season_standings" WHERE "super_g"='33'; |
## Task
Generate a SQL query to answer the following question:
`What is the oldest season that had a listed Super G score of 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_standings" (
"season" real,
"overall" text,
"slalom" text,
"super_g" text,
"downhill" text,
"combined" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the oldest season that had a listed Super G score of 33?`:
```sql
|
SELECT "season" FROM "season_standings" WHERE "overall"='77'; |
## Task
Generate a SQL query to answer the following question:
`What year's Season had an Overall of 77?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_standings" (
"season" real,
"overall" text,
"slalom" text,
"super_g" text,
"downhill" text,
"combined" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year's Season had an Overall of 77?`:
```sql
|
SELECT MAX("rank") FROM "leaders" WHERE "earnings">'533,929'; |
## Task
Generate a SQL query to answer the following question:
`What is the high rank for players earning over $533,929?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"events" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the high rank for players earning over $533,929?`:
```sql
|
SELECT "player" FROM "leaders" WHERE "wins"=3 AND "rank">3; |
## Task
Generate a SQL query to answer the following question:
`What player has 3 wins and ranks above 3rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"events" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What player has 3 wins and ranks above 3rd?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.