output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MAX("laps") FROM "classification" WHERE "driver"='jackie stewart'; |
## Task
Generate a SQL query to answer the following question:
`what is the most laps for driver jackie stewart?`
### 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 most laps for driver jackie stewart?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "driver"='richard attwood'; |
## Task
Generate a SQL query to answer the following question:
`what is the time/retired for driver richard attwood?`
### 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/retired for driver richard attwood?`:
```sql
|
SELECT "d_41" FROM "senate_composition_before_the_elections" WHERE "r_51"='r 11'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the D 41 and R 51 of r 11`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"r_53" text,
"r_52" text,
"r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the D 41 and R 51 of r 11`:
```sql
|
SELECT "d_46" FROM "senate_composition_before_the_elections" WHERE "d_44"='r 17'; |
## Task
Generate a SQL query to answer the following question:
`I want the D 46 which has a D 44 of r 17`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"r_53" text,
"r_52" text,
"r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the D 46 which has a D 44 of r 17`:
```sql
|
SELECT "d_41" FROM "senate_composition_before_the_elections" WHERE "d_43"='d 18'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the D 41 for D 43 of d 18`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"r_53" text,
"r_52" text,
"r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the D 41 for D 43 of d 18`:
```sql
|
SELECT "d_47" FROM "senate_composition_before_the_elections" WHERE "d_46"='r 35'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the D 47 for D 46 of r 35`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"r_53" text,
"r_52" text,
"r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the D 47 for D 46 of r 35`:
```sql
|
SELECT "d_42" FROM "senate_composition_before_the_elections" WHERE "r_51"='r 11'; |
## Task
Generate a SQL query to answer the following question:
`I want the D 42 with R 51 of r 11`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"r_53" text,
"r_52" text,
"r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the D 42 with R 51 of r 11`:
```sql
|
SELECT "r_53" FROM "senate_composition_before_the_elections" WHERE "d_41"='r 21'; |
## Task
Generate a SQL query to answer the following question:
`I want the R 53 of D 41 of r 21`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_before_the_elections" (
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"r_53" text,
"r_52" text,
"r_51" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the R 53 of D 41 of r 21`:
```sql
|
SELECT MIN("silver") FROM "medal_table_2007_2013" WHERE "gold">0 AND "nation"='switzerland'; |
## Task
Generate a SQL query to answer the following question:
`What is the low silver total for switzerland with over 0 golds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table_2007_2013" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the low silver total for switzerland with over 0 golds?`:
```sql
|
SELECT SUM("silver") FROM "medal_table_2007_2013" WHERE "bronze"=10; |
## Task
Generate a SQL query to answer the following question:
`What is the silver total for nations with 10 bronze medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table_2007_2013" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the silver total for nations with 10 bronze medals?`:
```sql
|
SELECT SUM("gold") FROM "medal_table_2007_2013" WHERE "nation"='lithuania' AND "silver"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the gold total for lithuania with under 2 silvers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table_2007_2013" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the gold total for lithuania with under 2 silvers?`:
```sql
|
SELECT "home_team_score" FROM "round_6" WHERE "venue"='moorabbin oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the home team that played at Moorabbin Oval?`
### 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 was the score for the home team that played at Moorabbin Oval?`:
```sql
|
SELECT "screen_size_inch" FROM "discontinued_models" WHERE "intro_year"='2006' AND "model"='iliad'; |
## Task
Generate a SQL query to answer the following question:
`Name the size of the screen that came out in 2006 and is iliad`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "discontinued_models" (
"maker" text,
"model" text,
"intro_year" text,
"screen_size_inch" text,
"self_lit" text,
"screen_type" text,
"screen_pixels" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the size of the screen that came out in 2006 and is iliad`:
```sql
|
SELECT "report" FROM "season_review" WHERE "race"='belgian grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Which Report includes the Belgian Grand Prix Race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Report includes the Belgian Grand Prix Race?`:
```sql
|
SELECT "report" FROM "season_review" WHERE "location"='monaco'; |
## Task
Generate a SQL query to answer the following question:
`Which Report includes Monaco?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Report includes Monaco?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "fastest_lap"='gunnar nilsson'; |
## Task
Generate a SQL query to answer the following question:
`On what date did Gunnar Nilsson make the fastest lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did Gunnar Nilsson make the fastest lap?`:
```sql
|
SELECT "fastest_lap" FROM "season_review" WHERE "race"='german grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Who had the fastest lap for the German Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the fastest lap for the German Grand Prix?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "catalog"='3645' AND "date">1981 AND "label"='luaka bop'; |
## Task
Generate a SQL query to answer the following question:
`What is the format for the album under the label, luaka bop, that had a catalog number of 3645 and dated after 1981?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" real,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the format for the album under the label, luaka bop, that had a catalog number of 3645 and dated after 1981?`:
```sql
|
SELECT MIN("date") FROM "release_history" WHERE "catalog"='3645' AND "format"='cd' AND "label"='luaka bop'; |
## Task
Generate a SQL query to answer the following question:
`what is the earliest date for the album that had a catalog number of 3645, was formatted as a cd and was under the luaka bop label?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" real,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the earliest date for the album that had a catalog number of 3645, was formatted as a cd and was under the luaka bop label?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "catalog"='3645' AND "date">1987; |
## Task
Generate a SQL query to answer the following question:
`Under what label was the album with the catalog of 3645 and came out later than 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" real,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `Under what label was the album with the catalog of 3645 and came out later than 1987?`:
```sql
|
SELECT MAX("points") FROM "february" WHERE "home"='toronto' AND "game_num">63; |
## Task
Generate a SQL query to answer the following question:
`What is the points where Toronto was the home team and the game number was larger than 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"game_num" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the points where Toronto was the home team and the game number was larger than 63?`:
```sql
|
SELECT COUNT("laps") FROM "classification" WHERE "driver"='mike spence' AND "grid">12; |
## Task
Generate a SQL query to answer the following question:
`How many laps did mike spence complete grids above 12?`
### 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 mike spence complete grids above 12?`:
```sql
|
SELECT AVG("laps") FROM "classification" WHERE "constructor"='brm' AND "grid"=12; |
## Task
Generate a SQL query to answer the following question:
`How many average laps did brm complete in grids larger than 12?`
### 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 average laps did brm complete in grids larger than 12?`:
```sql
|
SELECT "driver" FROM "classification" WHERE "grid">3 AND "time_retired"='accident'; |
## Task
Generate a SQL query to answer the following question:
`Who drove in grids more than 3 and exited in an accident?`
### 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 drove in grids more than 3 and exited in an accident?`:
```sql
|
SELECT "grid" FROM "classification" WHERE "driver"='jim clark'; |
## Task
Generate a SQL query to answer the following question:
`In what grid did jim clark drive in?`
### 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 `In what grid did jim clark drive in?`:
```sql
|
SELECT "opponent" FROM "pre_season" WHERE "date"='21 jul 2007'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent has a date 21 jul 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent has a date 21 jul 2007?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "home_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue of the Melbourne team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 was the venue of the Melbourne team?`:
```sql
|
SELECT "race_name" FROM "non_championship_race_results" WHERE "constructor"='maserati' AND "circuit"='aintree' AND "winning_driver"='stirling moss'; |
## Task
Generate a SQL query to answer the following question:
`What was the race that featured stirling moss winning with a maserati at aintree?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the race that featured stirling moss winning with a maserati at aintree?`:
```sql
|
SELECT "report" FROM "non_championship_race_results" WHERE "circuit"='caen'; |
## Task
Generate a SQL query to answer the following question:
`What does the Circuit of caen report?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What does the Circuit of caen report?`:
```sql
|
SELECT "winning_driver" FROM "non_championship_race_results" WHERE "race_name"='iv grand prix de caen'; |
## Task
Generate a SQL query to answer the following question:
`Who is the winning drive of iv grand prix de caen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the winning drive of iv grand prix de caen?`:
```sql
|
SELECT "ship_types_delivered" FROM "yards_on_the_great_lakes" WHERE "yard_name"='froemming brothers'; |
## Task
Generate a SQL query to answer the following question:
`What types of ships were made at the Froemming Brothers ship yard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "yards_on_the_great_lakes" (
"yard_name" text,
"location_city_state" text,
"1st_ship_delivery_date" text,
"ship_types_delivered" text,
"total_number_of_ways" text
);
### SQL
Given the database schema, here is the SQL query that answers `What types of ships were made at the Froemming Brothers ship yard?`:
```sql
|
SELECT "ship_types_delivered" FROM "yards_on_the_great_lakes" WHERE "1st_ship_delivery_date"='december 1942'; |
## Task
Generate a SQL query to answer the following question:
`What ship types were first delivered in December 1942?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "yards_on_the_great_lakes" (
"yard_name" text,
"location_city_state" text,
"1st_ship_delivery_date" text,
"ship_types_delivered" text,
"total_number_of_ways" text
);
### SQL
Given the database schema, here is the SQL query that answers `What ship types were first delivered in December 1942?`:
```sql
|
SELECT "appearances" FROM "notable_players" WHERE "goals"=36; |
## Task
Generate a SQL query to answer the following question:
`What is the amount of apperances of the person who had 36 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_players" (
"nationality" text,
"position" text,
"boro_career" text,
"captaincy" text,
"appearances" real,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the amount of apperances of the person who had 36 goals?`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "crowd">'10,000' AND "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`If the Home team was north melbourne and the Crowd was larger than 10,000, what was the Home team's score?`
### 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 `If the Home team was north melbourne and the Crowd was larger than 10,000, what was the Home team's score?`:
```sql
|
SELECT COUNT("crowd") FROM "round_8" WHERE "home_team_score"='10.7 (67)'; |
## Task
Generate a SQL query to answer the following question:
`How many people were in the Crowd when the Home team scored 10.7 (67)?`
### 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 `How many people were in the Crowd when the Home team scored 10.7 (67)?`:
```sql
|
SELECT "name" FROM "ladies" WHERE "points"=151.66; |
## Task
Generate a SQL query to answer the following question:
`Tell me the name with points of 151.66`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the name with points of 151.66`:
```sql
|
SELECT COUNT("rank") FROM "ladies" WHERE "places"<94 AND "points"<169.8 AND "nation"='japan'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of rank for places less than 94 and points less than 169.8 for japan`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the total number of rank for places less than 94 and points less than 169.8 for japan`:
```sql
|
SELECT COUNT("sp_fs") FROM "ladies" WHERE "rank">8 AND "nation"='netherlands' AND "points">127.26; |
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of SP+FS with rank more than 8 for the netherlands and points more than 127.26`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the total number of SP+FS with rank more than 8 for the netherlands and points more than 127.26`:
```sql
|
SELECT COUNT("sp_fs") FROM "ladies" WHERE "places"=60 AND "points">151.66; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of SP+FS for places of 60 and points more than 151.66`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of SP+FS for places of 60 and points more than 151.66`:
```sql
|
SELECT AVG("sp_fs") FROM "ladies" WHERE "places"<94 AND "name"='renata baierova'; |
## Task
Generate a SQL query to answer the following question:
`Name the average SP+FS with places less tha 94 for renata baierova`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average SP+FS with places less tha 94 for renata baierova`:
```sql
|
SELECT "color" FROM "features_by_model" WHERE "model_num"='pd-kb400w'; |
## Task
Generate a SQL query to answer the following question:
`What color is model # pd-kb400w?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "features_by_model" (
"model_name" text,
"model_num" text,
"color" text,
"switch_type" text,
"interface" text,
"blank_keytops" text,
"introduced" text
);
### SQL
Given the database schema, here is the SQL query that answers `What color is model # pd-kb400w?`:
```sql
|
SELECT MIN("average") FROM "preliminary_competition" WHERE "swimsuit">6.89 AND "evening_gown">7.76 AND "state"='illinois' AND "interview">8.57; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest average for a swimsuit over 6.89, evening gown over 7.76, and an interview over 8.57 in illinois?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest average for a swimsuit over 6.89, evening gown over 7.76, and an interview over 8.57 in illinois?`:
```sql
|
SELECT MAX("swimsuit") FROM "preliminary_competition" WHERE "average"<8.073 AND "evening_gown"<8.31 AND "interview">8.23 AND "state"='georgia'; |
## Task
Generate a SQL query to answer the following question:
`What's the highest swimsuit for an average less than 8.073, evening gown less than 8.31, and an interview over 8.23 in georgia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest swimsuit for an average less than 8.073, evening gown less than 8.31, and an interview over 8.23 in georgia?`:
```sql
|
SELECT MIN("swimsuit") FROM "preliminary_competition" WHERE "state"='utah' AND "interview">8.53; |
## Task
Generate a SQL query to answer the following question:
`What's utah's lowest swimsuit with an interview over 8.53?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's utah's lowest swimsuit with an interview over 8.53?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "date"='october 9, 1938'; |
## Task
Generate a SQL query to answer the following question:
`What week was October 9, 1938?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What week was October 9, 1938?`:
```sql
|
SELECT "home_team" FROM "round_17" WHERE "away_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What home team played Collingwood as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"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 home team played Collingwood as the away team?`:
```sql
|
SELECT "away_team_score" FROM "round_17" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the away team at Junction Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"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 was the score of the away team at Junction Oval?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "driver"='giancarlo fisichella'; |
## Task
Generate a SQL query to answer the following question:
`Who built giancarlo fisichella's car?`
### 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 `Who built giancarlo fisichella's car?`:
```sql
|
SELECT MAX("laps") FROM "race" WHERE "driver"='mika salo' AND "grid">17; |
## Task
Generate a SQL query to answer the following question:
`What is the high lap total for mika salo with a grid greater than 17?`
### 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 `What is the high lap total for mika salo with a grid greater than 17?`:
```sql
|
SELECT "location" FROM "top_100_in_the_world" WHERE "country"='scotland' AND "name"='muirfield'; |
## Task
Generate a SQL query to answer the following question:
`Where was the location with Muirfield in Scotland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_100_in_the_world" (
"rank" real,
"name" text,
"location" text,
"country" text,
"designer_year" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the location with Muirfield in Scotland?`:
```sql
|
SELECT "country" FROM "players_in" WHERE "name"='pieroni'; |
## Task
Generate a SQL query to answer the following question:
`Name the country for pieroni`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country for pieroni`:
```sql
|
SELECT "country" FROM "players_in" WHERE "type"='6-month loan' AND "moving_from"='lens'; |
## Task
Generate a SQL query to answer the following question:
`Name the country for 6-month loan and moving from of lens`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country for 6-month loan and moving from of lens`:
```sql
|
SELECT "transfer_fee" FROM "players_in" WHERE "transfer_window"='summer' AND "name"='schollen'; |
## Task
Generate a SQL query to answer the following question:
`Name the transfer fee with a transfer window of summer for schollen`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the transfer fee with a transfer window of summer for schollen`:
```sql
|
SELECT "name" FROM "players_in" WHERE "moving_from"='1. fc nürnberg'; |
## Task
Generate a SQL query to answer the following question:
`Name the name that has moving of 1. fc nürnberg.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the name that has moving of 1. fc nürnberg.`:
```sql
|
SELECT "country" FROM "players_in" WHERE "name"='polák'; |
## Task
Generate a SQL query to answer the following question:
`Name the country with polák`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_in" (
"name" text,
"country" text,
"type" text,
"moving_from" text,
"transfer_window" text,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the country with polák`:
```sql
|
SELECT "home_team_score" FROM "round_5" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team score at North Melbourne's away game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 was the home team score at North Melbourne's away game?`:
```sql
|
SELECT "away_team" FROM "round_5" WHERE "away_team_score"='4.15 (39)'; |
## Task
Generate a SQL query to answer the following question:
`Which away team scored 4.15 (39)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 away team scored 4.15 (39)?`:
```sql
|
SELECT "home_team_score" FROM "round_5" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What was Collingwood's score at the home match against Richmond?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"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 was Collingwood's score at the home match against Richmond?`:
```sql
|
SELECT MIN("laps") FROM "classification" WHERE "grid">24; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of laps with a grid larger than 24?`
### 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 lowest number of laps with a grid larger than 24?`:
```sql
|
SELECT MAX("grid") FROM "classification" WHERE "driver"='jo siffert' AND "laps">12; |
## Task
Generate a SQL query to answer the following question:
`For Jo Siffert, what was the highest grid with the number of laps above 12?`
### 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 `For Jo Siffert, what was the highest grid with the number of laps above 12?`:
```sql
|
SELECT AVG("laps") FROM "race" WHERE "driver"='gerhard berger'; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of laps when Gerhard Berger is 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" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of laps when Gerhard Berger is the driver?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "laps">50 AND "grid"=7; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the constructor who has more than 50 laps and a grid of 7?`
### 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 `What is the name of the constructor who has more than 50 laps and a grid of 7?`:
```sql
|
SELECT "title" FROM "season_2" WHERE "production_code"='ad1b04'; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the episode with a production code of ad1b04?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2" (
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title of the episode with a production code of ad1b04?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "event"='tfc 21'; |
## Task
Generate a SQL query to answer the following question:
`Name the time for event of tfc 21`
### 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 `Name the time for event of tfc 21`:
```sql
|
SELECT "sport" FROM "asian_games" WHERE "gold">0 AND "silver"=2; |
## Task
Generate a SQL query to answer the following question:
`What sport has a Gold larger than 0, and a Silver of 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What sport has a Gold larger than 0, and a Silver of 2?`:
```sql
|
SELECT MIN("bronze") FROM "asian_games" WHERE "total">18 AND "sport"='total' AND "silver"<143; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Bronze that has a Total larger than 18 and a Silver smaller than 143?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Bronze that has a Total larger than 18 and a Silver smaller than 143?`:
```sql
|
SELECT SUM("silver") FROM "asian_games" WHERE "bronze">19 AND "total"<125; |
## Task
Generate a SQL query to answer the following question:
`How many total Silver has a Bronze larger than 19 and a Total smaller than 125?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total Silver has a Bronze larger than 19 and a Total smaller than 125?`:
```sql
|
SELECT MAX("total") FROM "asian_games" WHERE "bronze">10 AND "silver">28 AND "gold"=58; |
## Task
Generate a SQL query to answer the following question:
`What is the highest total Bronze larger than 10, Silver larger than 28, and a Gold of 58?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest total Bronze larger than 10, Silver larger than 28, and a Gold of 58?`:
```sql
|
SELECT MIN("total") FROM "asian_games" WHERE "gold">0 AND "silver"<4 AND "sport"='football' AND "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Total that has a Gold larger than 0, Silver smaller than 4, Sport of football, and a Bronze larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"sport" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Total that has a Gold larger than 0, Silver smaller than 4, Sport of football, and a Bronze larger than 1?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"=9; |
## Task
Generate a SQL query to answer the following question:
`what is the time/retired when the grid is 9?`
### 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/retired when the grid is 9?`:
```sql
|
SELECT COUNT("laps") FROM "classification" WHERE "driver"='ron flockhart'; |
## Task
Generate a SQL query to answer the following question:
`what is the number of laps when the driver is ron flockhart?`
### 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 number of laps when the driver is ron flockhart?`:
```sql
|
SELECT "engine" FROM "engines" WHERE "power"='114hp (85kw)'; |
## Task
Generate a SQL query to answer the following question:
`What Engine has a Power of 114hp (85kw)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"years" text,
"displacement" text,
"engine" text,
"power" text,
"torque" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Engine has a Power of 114hp (85kw)?`:
```sql
|
SELECT "torque" FROM "engines" WHERE "engine"='amc power tech i6'; |
## Task
Generate a SQL query to answer the following question:
`What Torque has an AMC Power Tech I6 Engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"years" text,
"displacement" text,
"engine" text,
"power" text,
"torque" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Torque has an AMC Power Tech I6 Engine?`:
```sql
|
SELECT "displacement" FROM "engines" WHERE "power"='185hp (138kw)'; |
## Task
Generate a SQL query to answer the following question:
`What Displacement has 185hp (138kw) Power o`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"years" text,
"displacement" text,
"engine" text,
"power" text,
"torque" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Displacement has 185hp (138kw) Power o`:
```sql
|
SELECT "venue" FROM "round_4" WHERE "home_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What venue features collingwood as the home side?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 venue features collingwood as the home side?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "game_site"='veterans stadium'; |
## Task
Generate a SQL query to answer the following question:
`What's the attendance numbers for veterans stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"game_site" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the attendance numbers for veterans stadium?`:
```sql
|
SELECT "school" FROM "2008_boys_team" WHERE "player"='michael dunigan'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the school that has a player named Michael Dunigan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the school that has a player named Michael Dunigan?`:
```sql
|
SELECT "religion" FROM "delegates" WHERE "assumed_office"<2005 AND "former_experience"='commissioner of health'; |
## Task
Generate a SQL query to answer the following question:
`Name the religion for Former Experience of commissioner of health and assumed office before 2005`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "delegates" (
"district" text,
"name" text,
"party" text,
"religion" text,
"former_experience" text,
"assumed_office" real,
"born_in" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the religion for Former Experience of commissioner of health and assumed office before 2005`:
```sql
|
SELECT MIN("assumed_office") FROM "delegates" WHERE "name"='madeleine bordallo'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the loewst assume office for madeleine bordallo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "delegates" (
"district" text,
"name" text,
"party" text,
"religion" text,
"former_experience" text,
"assumed_office" real,
"born_in" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the loewst assume office for madeleine bordallo`:
```sql
|
SELECT "team" FROM "game_log" WHERE "game"=82; |
## Task
Generate a SQL query to answer the following question:
`Which team had a game of 82?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team had a game of 82?`:
```sql
|
SELECT "crowd" FROM "round_13" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game at Junction Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"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 `How many people attended the game at Junction Oval?`:
```sql
|
SELECT "score" FROM "march" WHERE "decision"='gerber' AND "home"='boston'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for Boston's Home game that had Gerber as the decision?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 for Boston's Home game that had Gerber as the decision?`:
```sql
|
SELECT "record" FROM "march" WHERE "date"='march 25'; |
## Task
Generate a SQL query to answer the following question:
`What was the record for the game on March 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 record for the game on March 25?`:
```sql
|
SELECT "decision" FROM "march" WHERE "home"='anaheim'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Decision at Anaheim's home game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 `Who was the Decision at Anaheim's home game?`:
```sql
|
SELECT "driver" FROM "drivers_and_constructors" WHERE "chassis"='tg183b tg184'; |
## Task
Generate a SQL query to answer the following question:
`Who is the driver of the chassis that is tg183b tg184?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyres" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the driver of the chassis that is tg183b tg184?`:
```sql
|
SELECT "engine" FROM "drivers_and_constructors" WHERE "tyres"='p' AND "driver"='pierluigi martini'; |
## Task
Generate a SQL query to answer the following question:
`What was the engine belonging to Pierluigi Martini with a Tyre of P?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyres" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the engine belonging to Pierluigi Martini with a Tyre of P?`:
```sql
|
SELECT "engine" FROM "drivers_and_constructors" WHERE "rounds"='10-13'; |
## Task
Generate a SQL query to answer the following question:
`What was the featured in Engine through rounds 10-13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyres" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the featured in Engine through rounds 10-13?`:
```sql
|
SELECT "entrant" FROM "drivers_and_constructors" WHERE "driver"='nigel mansell'; |
## Task
Generate a SQL query to answer the following question:
`Nigel Mansell was the driver in what Entrant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyres" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Nigel Mansell was the driver in what Entrant?`:
```sql
|
SELECT "date" FROM "tornadoes" WHERE "name_location"='belyanitsky, ivanovo, and balino'; |
## Task
Generate a SQL query to answer the following question:
`What Date does the Name (location) Belyanitsky, Ivanovo, and Balino have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tornadoes" (
"rank" real,
"name_location" text,
"country" text,
"date" text,
"deaths" real,
"injuries_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Date does the Name (location) Belyanitsky, Ivanovo, and Balino have?`:
```sql
|
SELECT "date" FROM "round_16" WHERE "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What day did North Melbourne play as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 day did North Melbourne play as the home team?`:
```sql
|
SELECT "away_team" FROM "round_16" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team at Arden Street Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 `Who was the away team at Arden Street Oval?`:
```sql
|
SELECT "long_term_capital_gain_rate" FROM "regular_and_capital_gains_tax_rates_for_" WHERE "long_term_gain_on_commercial_buildings"='25%' AND "long_term_gain_on_collectibles"='28%' AND "short_term_capital_gain_rate"='33%'; |
## Task
Generate a SQL query to answer the following question:
`What is the long-term capital gain rate when the long-term gain on commercial buildings is 25% and long term gain on collectibles is 28% while short-term capital gain rate is 33%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_and_capital_gains_tax_rates_for_" (
"ordinary_income_rate" text,
"long_term_capital_gain_rate" text,
"short_term_capital_gain_rate" text,
"long_term_gain_on_commercial_buildings" text,
"long_term_gain_on_collectibles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the long-term capital gain rate when the long-term gain on commercial buildings is 25% and long term gain on collectibles is 28% while short-term capital gain rate is 33%?`:
```sql
|
SELECT "long_term_gain_on_commercial_buildings" FROM "regular_and_capital_gains_tax_rates_for_" WHERE "long_term_gain_on_collectibles"='28%' AND "ordinary_income_rate"='35%'; |
## Task
Generate a SQL query to answer the following question:
`What is long-term gain for commercial buildings when long-term gain on collectible sis 28% and ordinary income rate is 35%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_and_capital_gains_tax_rates_for_" (
"ordinary_income_rate" text,
"long_term_capital_gain_rate" text,
"short_term_capital_gain_rate" text,
"long_term_gain_on_commercial_buildings" text,
"long_term_gain_on_collectibles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is long-term gain for commercial buildings when long-term gain on collectible sis 28% and ordinary income rate is 35%?`:
```sql
|
SELECT "ordinary_income_rate" FROM "regular_and_capital_gains_tax_rates_for_" WHERE "short_term_capital_gain_rate"='28%'; |
## Task
Generate a SQL query to answer the following question:
`What is the ordinary income rate when short-term capital gain rate is 28%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_and_capital_gains_tax_rates_for_" (
"ordinary_income_rate" text,
"long_term_capital_gain_rate" text,
"short_term_capital_gain_rate" text,
"long_term_gain_on_commercial_buildings" text,
"long_term_gain_on_collectibles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the ordinary income rate when short-term capital gain rate is 28%?`:
```sql
|
SELECT "long_term_gain_on_commercial_buildings" FROM "regular_and_capital_gains_tax_rates_for_" WHERE "short_term_capital_gain_rate"='15%'; |
## Task
Generate a SQL query to answer the following question:
`What is the long-term gain for commercial buildings with a short-term capital gain rate of 15%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_and_capital_gains_tax_rates_for_" (
"ordinary_income_rate" text,
"long_term_capital_gain_rate" text,
"short_term_capital_gain_rate" text,
"long_term_gain_on_commercial_buildings" text,
"long_term_gain_on_collectibles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the long-term gain for commercial buildings with a short-term capital gain rate of 15%?`:
```sql
|
SELECT "short_term_capital_gain_rate" FROM "regular_and_capital_gains_tax_rates_for_" WHERE "long_term_gain_on_collectibles"='15%'; |
## Task
Generate a SQL query to answer the following question:
`What is short-term capital gain rate with long-term gain on collectibles at 15%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_and_capital_gains_tax_rates_for_" (
"ordinary_income_rate" text,
"long_term_capital_gain_rate" text,
"short_term_capital_gain_rate" text,
"long_term_gain_on_commercial_buildings" text,
"long_term_gain_on_collectibles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is short-term capital gain rate with long-term gain on collectibles at 15%?`:
```sql
|
SELECT "long_term_gain_on_collectibles" FROM "regular_and_capital_gains_tax_rates_for_" WHERE "ordinary_income_rate"='15%'; |
## Task
Generate a SQL query to answer the following question:
`What long-term gain for collectibles coincides with ordinary income rate 15%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_and_capital_gains_tax_rates_for_" (
"ordinary_income_rate" text,
"long_term_capital_gain_rate" text,
"short_term_capital_gain_rate" text,
"long_term_gain_on_commercial_buildings" text,
"long_term_gain_on_collectibles" text
);
### SQL
Given the database schema, here is the SQL query that answers `What long-term gain for collectibles coincides with ordinary income rate 15%?`:
```sql
|
SELECT SUM("decile") FROM "franklin_local_board" WHERE "authority"='state' AND "roll"=120; |
## Task
Generate a SQL query to answer the following question:
`What is the Decile with a State Authority and a roll of 120?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "franklin_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 `What is the Decile with a State Authority and a roll of 120?`:
```sql
|
SELECT MAX("roll") FROM "franklin_local_board" WHERE "decile"<8 AND "authority"='state' AND "name"='orere school'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Roll of Orere School with a Decile less than 8 with a State Authority?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "franklin_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 `What is the highest Roll of Orere School with a Decile less than 8 with a State Authority?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "away_team_score"='10.11 (71)'; |
## Task
Generate a SQL query to answer the following question:
`Which venue has an Away team score of 10.11 (71)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 venue has an Away team score of 10.11 (71)?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.