output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "record" FROM "november" WHERE "decision"='prusek' AND "date"='november 26'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for November 26, with the decision made by Prusek?`
### 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 is the record for November 26, with the decision made by Prusek?`:
```sql
|
SELECT "record" FROM "november" WHERE "visitor"='columbus' AND "decision"='denis' AND "home"='phoenix'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for game where Columbus is visitor, Phoenix is home, and decision is made by Denis?`
### 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 is the record for game where Columbus is visitor, Phoenix is home, and decision is made by Denis?`:
```sql
|
SELECT "record" FROM "november" WHERE "decision"='denis' AND "date"='november 4'; |
## Task
Generate a SQL query to answer the following question:
`What is the record for November 4, with a decision made by Denis?`
### 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 is the record for November 4, with a decision made by Denis?`:
```sql
|
SELECT "intergiro_classification" FROM "classification_leadership_by_stage" WHERE "points_classification"='fabrizio guidi' AND "winner"='nicolaj bo larsen'; |
## Task
Generate a SQL query to answer the following question:
`What is the Intergiro classification of Nicolaj bo Larsen, who has a Fabrizio guidi point classification?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Intergiro classification of Nicolaj bo Larsen, who has a Fabrizio guidi point classification?`:
```sql
|
SELECT "mountains_classification" FROM "classification_leadership_by_stage" WHERE "winner"='mario cipollini' AND "general_classification"='pavel tonkov'; |
## Task
Generate a SQL query to answer the following question:
`What is the mountain classification of Mario Cipollini, who has a general classification of Pavel tonkov?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mountain classification of Mario Cipollini, who has a general classification of Pavel tonkov?`:
```sql
|
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "trofeo_fast_team"='gewiss playbus' AND "points_classification"='fabrizio guidi' AND "winner"='fabiano fontanelli'; |
## Task
Generate a SQL query to answer the following question:
`What is the stage of Fabiano Fontanelli, who had a Trofeo Fast Team of Gewiss Playbus and a point classification of Fabrizio Guidi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the stage of Fabiano Fontanelli, who had a Trofeo Fast Team of Gewiss Playbus and a point classification of Fabrizio Guidi?`:
```sql
|
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "points_classification"='silvio martinello' AND "general_classification"='davide rebellin'; |
## Task
Generate a SQL query to answer the following question:
`What is the stage with a point classification of Silvio Martinello and Davide Rebellin as the general classification?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the stage with a point classification of Silvio Martinello and Davide Rebellin as the general classification?`:
```sql
|
SELECT "trofeo_fast_team" FROM "classification_leadership_by_stage" WHERE "points_classification"='silvio martinello' AND "stage"='6'; |
## Task
Generate a SQL query to answer the following question:
`What is the Trofeo Fast Team with a point classification of Silvio Martinello and stage 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"intergiro_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Trofeo Fast Team with a point classification of Silvio Martinello and stage 6?`:
```sql
|
SELECT "points_for" FROM "table" WHERE "club"='castres'; |
## Task
Generate a SQL query to answer the following question:
`How many points did the Castres have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"bonus_points" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did the Castres have?`:
```sql
|
SELECT "club" FROM "table" WHERE "drawn"='0' AND "points_for"='617'; |
## Task
Generate a SQL query to answer the following question:
`Who is the club that had 617 points and a draw of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"bonus_points" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the club that had 617 points and a draw of 0?`:
```sql
|
SELECT "bonus_points" FROM "table" WHERE "club"='stade français'; |
## Task
Generate a SQL query to answer the following question:
`What number of bonus points did Stade Français?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"bonus_points" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What number of bonus points did Stade Français?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='15–15'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent at the game when the record was 15–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,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent at the game when the record was 15–15?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "attendance"='23,203'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent at the game attended by 23,203?`
### 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 `Who was the opponent at the game attended by 23,203?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='16–15'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the game when the record was 16–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,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the loss of the game when the record was 16–15?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "score"='16–7'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance at the game that had a score of 16–7?`
### 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 was the attendance at the game that had a score of 16–7?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "attendance"='25,022'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game attended by 25,022?`
### 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 was the date of the game attended by 25,022?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "attendance">'28,459'; |
## Task
Generate a SQL query to answer the following question:
`Which record has an attendance larger than 28,459?`
### 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 `Which record has an attendance larger than 28,459?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='32-37'; |
## Task
Generate a SQL query to answer the following question:
`When the record was 32-37 what was the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the record was 32-37 what was the score?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='june 7'; |
## Task
Generate a SQL query to answer the following question:
`On the date of june 7 what was the score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On the date of june 7 what was the score?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='68-39'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game when the record was 68-39?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game when the record was 68-39?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "opponent"='white sox' AND "record"='81-48'; |
## Task
Generate a SQL query to answer the following question:
`What was the game of the game against the White Sox with a record of 81-48?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the game of the game against the White Sox with a record of 81-48?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='66-38'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game when the record was 66-38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game when the record was 66-38?`:
```sql
|
SELECT "category" FROM "original_broadway_production" WHERE "nominee"='brian d''arcy james' AND "result"='nominated'; |
## Task
Generate a SQL query to answer the following question:
`What category was Brian D'arcy James nominated for?`
### 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 `What category was Brian D'arcy James nominated for?`:
```sql
|
SELECT "moving_to" FROM "out" WHERE "transfer_fee"='£300,000'; |
## Task
Generate a SQL query to answer the following question:
`What is the item "Moving to", when the Transfer fee is £300,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the item "Moving to", when the Transfer fee is £300,000?`:
```sql
|
SELECT "country" FROM "out" WHERE "transfer_fee"='loan' AND "name"='lynch'; |
## Task
Generate a SQL query to answer the following question:
`What is the Country, when the Transfer fee is "loan", and when the Name is Lynch?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Country, when the Transfer fee is "loan", and when the Name is Lynch?`:
```sql
|
SELECT "transfer_window" FROM "out" WHERE "transfer_fee"='free' AND "name"='dugdale'; |
## Task
Generate a SQL query to answer the following question:
`What is the Transfer window, when the Transfer fee is "free", and when the Name is Dugdale?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Transfer window, when the Transfer fee is "free", and when the Name is Dugdale?`:
```sql
|
SELECT "name" FROM "out" WHERE "transfer_fee"='loan'; |
## Task
Generate a SQL query to answer the following question:
`What is the Name, when the Transfer fee is "loan"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Name, when the Transfer fee is "loan"?`:
```sql
|
SELECT "transfer_window" FROM "out" WHERE "transfer_fee"='free' AND "moving_to"='norwich city'; |
## Task
Generate a SQL query to answer the following question:
`What is the Transfer window, when the Transfer fee is "free", and when the item "Moving to" is Norwich City?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Transfer window, when the Transfer fee is "free", and when the item "Moving to" is Norwich City?`:
```sql
|
SELECT "transfer_fee" FROM "out" WHERE "transfer_window"='winter' AND "moving_to"='northwich victoria'; |
## Task
Generate a SQL query to answer the following question:
`What is the Transfer fee, when the Transfer window is "winter", and when the item "Moving to" is Northwich Victoria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "out" (
"name" text,
"country" text,
"status" text,
"moving_to" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Transfer fee, when the Transfer window is "winter", and when the item "Moving to" is Northwich Victoria?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "time_retired"='collision' AND "grid"='11'; |
## Task
Generate a SQL query to answer the following question:
`What companyw as the constructor when the Time/Retired was collision, and a Grid of 11?`
### 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 `What companyw as the constructor when the Time/Retired was collision, and a Grid of 11?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"='8'; |
## Task
Generate a SQL query to answer the following question:
`What shows as the Time/Retired for Grid 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 `What shows as the Time/Retired for Grid 8?`:
```sql
|
SELECT "laps" FROM "race" WHERE "grid"='3'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of laps for Grid 3?`
### 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 `What is the number of laps for Grid 3?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "driver"='nick heidfeld'; |
## Task
Generate a SQL query to answer the following question:
`What company was the constructor when Nick Heidfeld was the driver/`
### 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 `What company was the constructor when Nick Heidfeld was the driver/`:
```sql
|
SELECT "laps" FROM "race" WHERE "time_retired"='+1:08.577'; |
## Task
Generate a SQL query to answer the following question:
`What shows for laps when the Time/Retired was +1:08.577?`
### 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 `What shows for laps when the Time/Retired was +1:08.577?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "grid"='1'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the constructor for Grid 1?`
### 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 `What is the name of the constructor for Grid 1?`:
```sql
|
SELECT "test_career" FROM "see_also" WHERE "player"='mushfiqur rahim'; |
## Task
Generate a SQL query to answer the following question:
`When was Mushfiqur Rahim's test career?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"player" text,
"test_career" text,
"tests" real,
"catches" real,
"stumpings" real,
"total_dismissals" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was Mushfiqur Rahim's test career?`:
```sql
|
SELECT SUM("points") FROM "indycar_career_results" WHERE "year"<1984; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of points for 1984`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indycar_career_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of points for 1984`:
```sql
|
SELECT "points" FROM "indycar_career_results" WHERE "engine"='chevrolet 265c'; |
## Task
Generate a SQL query to answer the following question:
`Name the points for Engine of chevrolet 265c`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indycar_career_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the points for Engine of chevrolet 265c`:
```sql
|
SELECT "chassis" FROM "indycar_career_results" WHERE "points"=147 AND "engine"='ford cosworth dfx'; |
## Task
Generate a SQL query to answer the following question:
`Name the chassis of 147 points and engine of ford cosworth dfx`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indycar_career_results" (
"year" real,
"team" text,
"chassis" text,
"engine" text,
"rank" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the chassis of 147 points and engine of ford cosworth dfx`:
```sql
|
SELECT "term" FROM "state_house" WHERE "district"='7' AND "party"='democratic'; |
## Task
Generate a SQL query to answer the following question:
`Which term had a Democratic representative from district 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "state_house" (
"name" text,
"party" text,
"hometown" text,
"district" text,
"term" text,
"legislatures" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which term had a Democratic representative from district 7?`:
```sql
|
SELECT "term" FROM "state_house" WHERE "hometown"='anchorage' AND "name"='bruce biers kendall'; |
## Task
Generate a SQL query to answer the following question:
`What was the term of Bruce Biers Kendall whose hometown is Anchorage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "state_house" (
"name" text,
"party" text,
"hometown" text,
"district" text,
"term" text,
"legislatures" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the term of Bruce Biers Kendall whose hometown is Anchorage?`:
```sql
|
SELECT "hometown" FROM "state_house" WHERE "legislatures"='twenty-sixth'; |
## Task
Generate a SQL query to answer the following question:
`What is the hometown of the representative that served the twenty-sixth legislature?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "state_house" (
"name" text,
"party" text,
"hometown" text,
"district" text,
"term" text,
"legislatures" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the hometown of the representative that served the twenty-sixth legislature?`:
```sql
|
SELECT "qual" FROM "indy_500_results" WHERE "rank"='19'; |
## Task
Generate a SQL query to answer the following question:
`What is the qual with a 19 rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the qual with a 19 rank?`:
```sql
|
SELECT "rank" FROM "indy_500_results" WHERE "finish"='25'; |
## Task
Generate a SQL query to answer the following question:
`What rank has a 25 finish?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What rank has a 25 finish?`:
```sql
|
SELECT "finish" FROM "indy_500_results" WHERE "qual"='143.056'; |
## Task
Generate a SQL query to answer the following question:
`What finish has a 143.056 qual?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What finish has a 143.056 qual?`:
```sql
|
SELECT "rank" FROM "indy_500_results" WHERE "laps">165 AND "finish"='5'; |
## Task
Generate a SQL query to answer the following question:
`What rank had more than 165 laps and a finish of 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What rank had more than 165 laps and a finish of 5?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "opponent"='blue jays' AND "loss"='batista (0–3)'; |
## Task
Generate a SQL query to answer the following question:
`What was the record at the game against the Blue Jays with a loss of Batista (0–3)?`
### 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,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record at the game against the Blue Jays with a loss of Batista (0–3)?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='14–8'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the game when the record was 14–8?`
### 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,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the loss of the game when the record was 14–8?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='28–19'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game when the record was 28–19?`
### 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,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game when the record was 28–19?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='may 1' AND "loss"='speier (1–3)'; |
## Task
Generate a SQL query to answer the following question:
`What was the record at the game held on May 1st with a loss of Speier (1–3)?`
### 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,
"time" text,
"att" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record at the game held on May 1st with a loss of Speier (1–3)?`:
```sql
|
SELECT "played" FROM "ppl_2005_final_standings" WHERE "lost"<12 AND "points">37 AND "drawn"=5; |
## Task
Generate a SQL query to answer the following question:
`How many goes played fot hteam that lost less than 12 games, drew 5, and had over 37 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many goes played fot hteam that lost less than 12 games, drew 5, and had over 37 points?`:
```sql
|
SELECT AVG("lost") FROM "ppl_2005_final_standings" WHERE "drawn"=5 AND "points">41; |
## Task
Generate a SQL query to answer the following question:
`How many games lost for the team that drew 5 times and had over 41 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games lost for the team that drew 5 times and had over 41 points?`:
```sql
|
SELECT COUNT("played") FROM "ppl_2005_final_standings" WHERE "drawn"<5 AND "team"='army' AND "points">51; |
## Task
Generate a SQL query to answer the following question:
`How many games played for the army team with over 51 points and under 5 games drawn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games played for the army team with over 51 points and under 5 games drawn?`:
```sql
|
SELECT SUM("points") FROM "ppl_2005_final_standings" WHERE "team"='navy' AND "lost">11; |
## Task
Generate a SQL query to answer the following question:
`How many points for the navy team that lost over 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ppl_2005_final_standings" (
"team" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points for the navy team that lost over 11?`:
```sql
|
SELECT "class" FROM "race_winners" WHERE "race_title"='xi coppa acerbo'; |
## Task
Generate a SQL query to answer the following question:
`What class of car had the XI Coppa Acerbo title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `What class of car had the XI Coppa Acerbo title?`:
```sql
|
SELECT "driver_s" FROM "race_winners" WHERE "race_title"='iii coppa acerbo'; |
## Task
Generate a SQL query to answer the following question:
`Who won the III Coppa Acerbo title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the III Coppa Acerbo title?`:
```sql
|
SELECT "race_title" FROM "race_winners" WHERE "vehicle"='maserati a6gcs'; |
## Task
Generate a SQL query to answer the following question:
`What's the name of the title for the Maserati A6GCS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of the title for the Maserati A6GCS?`:
```sql
|
SELECT "driver_s" FROM "race_winners" WHERE "class"='sports car' AND "race_title"='xxiv gran premio di pescara'; |
## Task
Generate a SQL query to answer the following question:
`Who won the XXIV Gran Premio di Pescara in the sports car class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_winners" (
"year" text,
"driver_s" text,
"class" text,
"vehicle" text,
"race_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the XXIV Gran Premio di Pescara in the sports car class?`:
```sql
|
SELECT "surface" FROM "doubles" WHERE "tournament"='città di caltanissetta'; |
## Task
Generate a SQL query to answer the following question:
`What surface was the città di caltanissetta played on?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"outcome" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What surface was the città di caltanissetta played on?`:
```sql
|
SELECT "score" FROM "doubles" WHERE "tournament"='volkswagen challenger'; |
## Task
Generate a SQL query to answer the following question:
`What was the score in Volkswagen Challenger tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles" (
"outcome" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score in Volkswagen Challenger tournament?`:
```sql
|
SELECT "2010" FROM "top_grape_producing_countries_by_years_i" WHERE "2011"='2,240,000'; |
## Task
Generate a SQL query to answer the following question:
`what is the production in 2010 with 2011 production of 2,240,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_grape_producing_countries_by_years_i" (
"rank" text,
"country" text,
"2009" text,
"2010" text,
"2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the production in 2010 with 2011 production of 2,240,000?`:
```sql
|
SELECT "rank" FROM "top_grape_producing_countries_by_years_i" WHERE "2010"='2,903,000'; |
## Task
Generate a SQL query to answer the following question:
`what is the ranking for 2010 production of 2,903,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_grape_producing_countries_by_years_i" (
"rank" text,
"country" text,
"2009" text,
"2010" text,
"2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the ranking for 2010 production of 2,903,000?`:
```sql
|
SELECT "2010" FROM "top_grape_producing_countries_by_years_i" WHERE "rank"='8'; |
## Task
Generate a SQL query to answer the following question:
`what is the production in 2010 with rank of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_grape_producing_countries_by_years_i" (
"rank" text,
"country" text,
"2009" text,
"2010" text,
"2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the production in 2010 with rank of 8?`:
```sql
|
SELECT "club" FROM "marquee_player" WHERE "captain"='john hutchinson'; |
## Task
Generate a SQL query to answer the following question:
`What club captain is John Hutchinson in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `What club captain is John Hutchinson in?`:
```sql
|
SELECT "international_marquee" FROM "marquee_player" WHERE "vice_captain"='michael mcglinchey'; |
## Task
Generate a SQL query to answer the following question:
`What team is Michael McGlinchey vice captain of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team is Michael McGlinchey vice captain of?`:
```sql
|
SELECT "australian_marquee" FROM "marquee_player" WHERE "captain"='michael beauchamp'; |
## Task
Generate a SQL query to answer the following question:
`What Australian Marquee team is Michael Beauchamp a captain of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Australian Marquee team is Michael Beauchamp a captain of?`:
```sql
|
SELECT "junior_marquee_player" FROM "marquee_player" WHERE "captain"='harry kewell'; |
## Task
Generate a SQL query to answer the following question:
`What Junior Marquee team is Harry Kewell of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "marquee_player" (
"club" text,
"australian_marquee" text,
"international_marquee" text,
"junior_marquee_player" text,
"captain" text,
"vice_captain" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Junior Marquee team is Harry Kewell of?`:
```sql
|
SELECT "call_sign" FROM "translators" WHERE "frequency_m_hz"='91.1 fm'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of call sign that uses a Frequency MHz of 91.1 fm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of call sign that uses a Frequency MHz of 91.1 fm?`:
```sql
|
SELECT COUNT("erp_w") FROM "translators" WHERE "frequency_m_hz"='107.9 fm'; |
## Task
Generate a SQL query to answer the following question:
`How much is the total ERP W for an 107.9 fm freqeuncy MHz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much is the total ERP W for an 107.9 fm freqeuncy MHz?`:
```sql
|
SELECT "fcc_info" FROM "translators" WHERE "city_of_license"='harmony township, new jersey'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me what is FCC info for harmony township, new jersey?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me what is FCC info for harmony township, new jersey?`:
```sql
|
SELECT MIN("erp_w") FROM "translators" WHERE "city_of_license"='allentown, pennsylvania'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest ERP for allentown, pennsylvania?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" text,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest ERP for allentown, pennsylvania?`:
```sql
|
SELECT AVG("grid") FROM "race" WHERE "time_retired"='+3.9 secs' AND "laps"<96; |
## Task
Generate a SQL query to answer the following question:
`Which grid has a time/retired of +3.9 secs in less than 96 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which grid has a time/retired of +3.9 secs in less than 96 laps?`:
```sql
|
SELECT "driver" FROM "race" WHERE "points"=7 AND "team"='team australia'; |
## Task
Generate a SQL query to answer the following question:
`Which driver has 7 points for team Australia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver has 7 points for team Australia?`:
```sql
|
SELECT MIN("laps") FROM "race" WHERE "team"='dale coyne racing' AND "time_retired"='mechanical' AND "points"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest number of laps for a Dale Coyne Racing team with a mechanical time/retired and fewer than 5 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest number of laps for a Dale Coyne Racing team with a mechanical time/retired and fewer than 5 points?`:
```sql
|
SELECT MAX("points") FROM "race" WHERE "driver"='dan clarke' AND "grid">10; |
## Task
Generate a SQL query to answer the following question:
`What is the highest points total scored by Dan Clarke in a grid higher than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest points total scored by Dan Clarke in a grid higher than 10?`:
```sql
|
SELECT MIN("total") FROM "season_6" WHERE "location"='boston, massachusetts'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest episode of the series that is set in Boston, Massachusetts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_6" (
"ep_num" real,
"total" real,
"title" text,
"location" text,
"party_theme" text,
"airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest episode of the series that is set in Boston, Massachusetts?`:
```sql
|
SELECT "sample_size" FROM "general_election" WHERE "date_s_administered"='june 30, 2010'; |
## Task
Generate a SQL query to answer the following question:
`How many people were surveyed in the poll from June 30, 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people were surveyed in the poll from June 30, 2010?`:
```sql
|
SELECT "meg_whitman_r" FROM "general_election" WHERE "margin_of_error"='± 3.3%'; |
## Task
Generate a SQL query to answer the following question:
`What percentage of the vote with a margin of error of ± 3.3% did Meg Whitman (R) get?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
### SQL
Given the database schema, here is the SQL query that answers `What percentage of the vote with a margin of error of ± 3.3% did Meg Whitman (R) get?`:
```sql
|
SELECT "sample_size" FROM "general_election" WHERE "poll_source"='rasmussen reports' AND "date_s_administered"='october 13, 2010'; |
## Task
Generate a SQL query to answer the following question:
`How many people participated in the Rasmussen Reports poll on October 13, 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people participated in the Rasmussen Reports poll on October 13, 2010?`:
```sql
|
SELECT "meg_whitman_r" FROM "general_election" WHERE "date_s_administered"='october 21, 2010'; |
## Task
Generate a SQL query to answer the following question:
`What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "general_election" (
"poll_source" text,
"date_s_administered" text,
"sample_size" text,
"margin_of_error" text,
"jerry_brown_d" text,
"meg_whitman_r" text
);
### SQL
Given the database schema, here is the SQL query that answers `What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010.`:
```sql
|
SELECT "prize" FROM "european_poker_tour" WHERE "event"='ept deauville'; |
## Task
Generate a SQL query to answer the following question:
`What is the Prize, when the Event is Ept Deauville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Prize, when the Event is Ept Deauville?`:
```sql
|
SELECT "city" FROM "european_poker_tour" WHERE "prize"='€880,000'; |
## Task
Generate a SQL query to answer the following question:
`What is the City, when the Prize is €880,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the City, when the Prize is €880,000?`:
```sql
|
SELECT "city" FROM "european_poker_tour" WHERE "winner"='ruben visser'; |
## Task
Generate a SQL query to answer the following question:
`What is the City, when the Winner is Ruben Visser?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the City, when the Winner is Ruben Visser?`:
```sql
|
SELECT "winner" FROM "european_poker_tour" WHERE "prize"='€880,000'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Winner, when the Prize is €880,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Winner, when the Prize is €880,000?`:
```sql
|
SELECT "city" FROM "european_poker_tour" WHERE "prize"='$1,859,000'; |
## Task
Generate a SQL query to answer the following question:
`What is the City, when the Prize is $1,859,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the City, when the Prize is $1,859,000?`:
```sql
|
SELECT "prize" FROM "european_poker_tour" WHERE "event"='ept sanremo'; |
## Task
Generate a SQL query to answer the following question:
`What is the Prize, when the Event is Ept Sanremo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_poker_tour" (
"date" text,
"city" text,
"event" text,
"winner" text,
"prize" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Prize, when the Event is Ept Sanremo?`:
```sql
|
SELECT "date" FROM "west_indies_in_england" WHERE "venue"='edgbaston'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the venue at Edgbaston?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "west_indies_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the venue at Edgbaston?`:
```sql
|
SELECT MIN("image") FROM "reconstruction_in_the_british_museum" WHERE "harrison"='20w' AND "ashmolean"<20; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest image with a 20w Harrison, and less than 20 for Ashmolean?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest image with a 20w Harrison, and less than 20 for Ashmolean?`:
```sql
|
SELECT COUNT("ashmolean") FROM "reconstruction_in_the_british_museum" WHERE "harrison"='14s' AND "image"<542; |
## Task
Generate a SQL query to answer the following question:
`What is the number of Ashmolean with 14s Harrison, and image less than 542?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of Ashmolean with 14s Harrison, and image less than 542?`:
```sql
|
SELECT "cooper" FROM "reconstruction_in_the_british_museum" WHERE "ashmolean"<21 AND "hahland"<4; |
## Task
Generate a SQL query to answer the following question:
`What is the cooper with an Ashmolean less than 21, and hahland smaller than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the cooper with an Ashmolean less than 21, and hahland smaller than 4?`:
```sql
|
SELECT "smith" FROM "reconstruction_in_the_british_museum" WHERE "ashmolean"=16; |
## Task
Generate a SQL query to answer the following question:
`What is the smith with a 16 ashmolean?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reconstruction_in_the_british_museum" (
"image" real,
"smith" text,
"ashmolean" real,
"foster" real,
"hahland" real,
"dinsmoor" text,
"hofkes_brukker" text,
"harrison" text,
"cooper" text,
"bm_corbett" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smith with a 16 ashmolean?`:
```sql
|
SELECT "order" FROM "rodentia" WHERE "species_authority"='hydrochaeris hydrochaeris (linnaeus, 1766)'; |
## Task
Generate a SQL query to answer the following question:
`What order has the Species Authority of hydrochaeris hydrochaeris (linnaeus, 1766)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rodentia" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
### SQL
Given the database schema, here is the SQL query that answers `What order has the Species Authority of hydrochaeris hydrochaeris (linnaeus, 1766)?`:
```sql
|
SELECT MAX("red_list") FROM "rodentia" WHERE "family"='muridae' AND "species_authority"='microtus pinetorum (le conte, 1830)'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Red List for the muridae family and species Authority of microtus pinetorum (le conte, 1830)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rodentia" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Red List for the muridae family and species Authority of microtus pinetorum (le conte, 1830)?`:
```sql
|
SELECT "name" FROM "rodentia" WHERE "species_authority"='sigmodon hispidus say & ord, 1825'; |
## Task
Generate a SQL query to answer the following question:
`What is the name for the species Authority of sigmodon hispidus say & ord, 1825?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rodentia" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name for the species Authority of sigmodon hispidus say & ord, 1825?`:
```sql
|
SELECT MAX("total") FROM "medal_standings" WHERE "silver"=1 AND "rank">7; |
## Task
Generate a SQL query to answer the following question:
`What is the largest total with a Silver of 1, and a Rank larger than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest total with a Silver of 1, and a Rank larger than 7?`:
```sql
|
SELECT COUNT("total") FROM "medal_standings" WHERE "bronze"<3 AND "nation"='zimbabwe' AND "silver"<6; |
## Task
Generate a SQL query to answer the following question:
`How many totals have a Bronze smaller than 3, a Nation of zimbabwe, and a Silver smaller than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many totals have a Bronze smaller than 3, a Nation of zimbabwe, and a Silver smaller than 6?`:
```sql
|
SELECT MIN("silver") FROM "medal_standings" WHERE "bronze"<6 AND "total"=3 AND "rank"<9; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest silver with a Bronze smaller than 6, a Total of 3, and a Rank smaller than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest silver with a Bronze smaller than 6, a Total of 3, and a Rank smaller than 9?`:
```sql
|
SELECT COUNT("rank") FROM "medal_standings" WHERE "gold"=0 AND "nation"='namibia' AND "total"<1; |
## Task
Generate a SQL query to answer the following question:
`How many ranks have 0 golds, a Nation of namibia, and a Total smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many ranks have 0 golds, a Nation of namibia, and a Total smaller than 1?`:
```sql
|
SELECT SUM("total") FROM "medal_standings" WHERE "bronze"=0 AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`How many totals have a Bronze of 0, and a Gold smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many totals have a Bronze of 0, and a Gold smaller than 0?`:
```sql
|
SELECT SUM("silver") FROM "medal_standings" WHERE "rank">9 AND "total">1; |
## Task
Generate a SQL query to answer the following question:
`What is the total silver with a Rank larger than 9, and a Total larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_standings" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total silver with a Rank larger than 9, and a Total larger than 1?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.