output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT COUNT("runs") FROM "batting_averages" WHERE "inns"<9; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of runs for the player with fewer than 9 Inns?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "batting_averages" (
"player" text,
"matches" real,
"inns" real,
"runs" real,
"high_score" real,
"average" real,
"catches" real,
"stump" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of runs for the player with fewer than 9 Inns?`:
```sql
|
SELECT MIN("average") FROM "batting_averages" WHERE "matches"=13 AND "catches"<7; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest average for the player with 13 matches and fewer than 7 catches?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "batting_averages" (
"player" text,
"matches" real,
"inns" real,
"runs" real,
"high_score" real,
"average" real,
"catches" real,
"stump" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest average for the player with 13 matches and fewer than 7 catches?`:
```sql
|
SELECT "city" FROM "first_and_second_rounds" WHERE "host"='university of texas'; |
## Task
Generate a SQL query to answer the following question:
`Which city is the host of the University of Texas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which city is the host of the University of Texas?`:
```sql
|
SELECT "region" FROM "first_and_second_rounds" WHERE "venue"='thompson-boling arena'; |
## Task
Generate a SQL query to answer the following question:
`In which region is the Thompson-Boling arena located?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which region is the Thompson-Boling arena located?`:
```sql
|
SELECT "host" FROM "first_and_second_rounds" WHERE "city"='philadelphia'; |
## Task
Generate a SQL query to answer the following question:
`Who is the host in the city of Philadelphia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the host in the city of Philadelphia?`:
```sql
|
SELECT "city" FROM "first_and_second_rounds" WHERE "region"='mideast' AND "host"='temple university'; |
## Task
Generate a SQL query to answer the following question:
`Which city in the mideast region is the hot of Temple University?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which city in the mideast region is the hot of Temple University?`:
```sql
|
SELECT "city" FROM "first_and_second_rounds" WHERE "host"='university of montana'; |
## Task
Generate a SQL query to answer the following question:
`Which city is the University of Montana located in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which city is the University of Montana located in?`:
```sql
|
SELECT "away_team_score" FROM "round_13" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team score at Hawthorn?`
### 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 `What was the away team score at Hawthorn?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "home_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`Who went to Geelong to play?`
### 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 `Who went to Geelong to play?`:
```sql
|
SELECT "home_team" FROM "round_13" WHERE "away_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`Who did Collingwood play at home?`
### 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 `Who did Collingwood play at home?`:
```sql
|
SELECT "date" FROM "round_13" WHERE "away_team_score"='7.8 (50)'; |
## Task
Generate a SQL query to answer the following question:
`When did an away team score 7.8 (50)?`
### 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 `When did an away team score 7.8 (50)?`:
```sql
|
SELECT COUNT("population") FROM "by_density" WHERE "area_km"='62,848' AND "density"<37.7; |
## Task
Generate a SQL query to answer the following question:
`What population has an area (km²) of 62,848 and a density less than 37.7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_density" (
"rank" text,
"state" text,
"population" real,
"area_km" real,
"density" real
);
### SQL
Given the database schema, here is the SQL query that answers `What population has an area (km²) of 62,848 and a density less than 37.7?`:
```sql
|
SELECT MAX("population") FROM "by_density" WHERE "density"=20.3 AND "area_km">'50,350'; |
## Task
Generate a SQL query to answer the following question:
`Which population is the greatest, has a density of 20.3, and an area (km²) larger than 50,350?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_density" (
"rank" text,
"state" text,
"population" real,
"area_km" real,
"density" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which population is the greatest, has a density of 20.3, and an area (km²) larger than 50,350?`:
```sql
|
SELECT "rank" FROM "by_density" WHERE "area_km">'151,571' AND "density">80.9 AND "state"='aguascalientes'; |
## Task
Generate a SQL query to answer the following question:
`The state of Aguascalientes has an area (km²) larger than 151,571 and a density greater than 80.9, what is the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_density" (
"rank" text,
"state" text,
"population" real,
"area_km" real,
"density" real
);
### SQL
Given the database schema, here is the SQL query that answers `The state of Aguascalientes has an area (km²) larger than 151,571 and a density greater than 80.9, what is the rank?`:
```sql
|
SELECT "home_team" FROM "round_15" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team at the game held at the Junction Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home team at the game held at the Junction Oval?`:
```sql
|
SELECT "venue" FROM "round_15" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game held when Fitzroy was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_15" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the game held when Fitzroy was the away team?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "opponent"='kansas city chiefs'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the Rams game against the Kansas City Chiefs?`
### 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" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the Rams game against the Kansas City Chiefs?`:
```sql
|
SELECT "iata" FROM "references" WHERE "country"='china'; |
## Task
Generate a SQL query to answer the following question:
`What is China's IATA?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is China's IATA?`:
```sql
|
SELECT "country" FROM "references" WHERE "city"='douala'; |
## Task
Generate a SQL query to answer the following question:
`Where is the City of Douala?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where is the City of Douala?`:
```sql
|
SELECT "airport" FROM "references" WHERE "country"='south africa' AND "icao"='fajs'; |
## Task
Generate a SQL query to answer the following question:
`Which airport is in South Africa and has a ICAO fajs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which airport is in South Africa and has a ICAO fajs?`:
```sql
|
SELECT "icao" FROM "references" WHERE "country"='cuba'; |
## Task
Generate a SQL query to answer the following question:
`What is Cuba's ICAO?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Cuba's ICAO?`:
```sql
|
SELECT "airport" FROM "references" WHERE "country"='angola' AND "icao"='fnsa'; |
## Task
Generate a SQL query to answer the following question:
`What is Angola's airport and ICAO of fnsa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Angola's airport and ICAO of fnsa?`:
```sql
|
SELECT "home_team" FROM "round_9" WHERE "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`What team plays at home at Windy Hill?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 team plays at home at Windy Hill?`:
```sql
|
SELECT COUNT("crowd") FROM "round_9" WHERE "home_team_score"='11.10 (76)'; |
## Task
Generate a SQL query to answer the following question:
`What was the size of the crowd that saw the Home team score 11.10 (76)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 size of the crowd that saw the Home team score 11.10 (76)?`:
```sql
|
SELECT "away_team_score" FROM "round_9" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What was Footscray's score as an away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 Footscray's score as an away team?`:
```sql
|
SELECT "home_team_score" FROM "round_9" WHERE "away_team_score"='7.15 (57)'; |
## Task
Generate a SQL query to answer the following question:
`What was the home teams score agains the team that scored 7.15 (57)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 teams score agains the team that scored 7.15 (57)?`:
```sql
|
SELECT "date" FROM "round_17" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What day is richmond the away side?`
### 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 day is richmond the away side?`:
```sql
|
SELECT "home_team" FROM "round_17" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`Who is the home team when hawthorn is 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 `Who is the home team when hawthorn is the away team?`:
```sql
|
SELECT "game_name" FROM "scratchers" WHERE "odds_of_winning"='1 in 4.23' AND "top_prize"='$15,000'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the game with odds of winning 1 in 4.23 with a top prize of $15,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scratchers" (
"game_name" text,
"price" text,
"top_prize" text,
"launch_date" text,
"odds_of_winning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the game with odds of winning 1 in 4.23 with a top prize of $15,000?`:
```sql
|
SELECT "launch_date" FROM "scratchers" WHERE "odds_of_winning"='1 in 4.23' AND "top_prize"='$15,000'; |
## Task
Generate a SQL query to answer the following question:
`What is the launch date odds of winning 1 in 4.23 with a top prize of $15,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scratchers" (
"game_name" text,
"price" text,
"top_prize" text,
"launch_date" text,
"odds_of_winning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the launch date odds of winning 1 in 4.23 with a top prize of $15,000?`:
```sql
|
SELECT "launch_date" FROM "scratchers" WHERE "odds_of_winning"='1 in 4.54'; |
## Task
Generate a SQL query to answer the following question:
`What is the launch date odds of winning 1 in 4.54?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scratchers" (
"game_name" text,
"price" text,
"top_prize" text,
"launch_date" text,
"odds_of_winning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the launch date odds of winning 1 in 4.54?`:
```sql
|
SELECT "launch_date" FROM "scratchers" WHERE "odds_of_winning"='1 in 4.44'; |
## Task
Generate a SQL query to answer the following question:
`What is the launch date odds of winning 1 in 4.44?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scratchers" (
"game_name" text,
"price" text,
"top_prize" text,
"launch_date" text,
"odds_of_winning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the launch date odds of winning 1 in 4.44?`:
```sql
|
SELECT "game_name" FROM "scratchers" WHERE "top_prize"='$888'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the game with a top prize of $888?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scratchers" (
"game_name" text,
"price" text,
"top_prize" text,
"launch_date" text,
"odds_of_winning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the game with a top prize of $888?`:
```sql
|
SELECT "top_prize" FROM "scratchers" WHERE "price"='$1' AND "launch_date"='february 12, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the top price of $1 with a launch date on February 12, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scratchers" (
"game_name" text,
"price" text,
"top_prize" text,
"launch_date" text,
"odds_of_winning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the top price of $1 with a launch date on February 12, 2008?`:
```sql
|
SELECT MAX("laps") FROM "race_3_results" WHERE "points"<5 AND "team"='garry rogers motorsport' AND "grid"<23; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of laps when there are less than 5 points for team garry rogers motorsport and the grid number is under 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_3_results" (
"name" text,
"team" text,
"laps" real,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of laps when there are less than 5 points for team garry rogers motorsport and the grid number is under 23?`:
```sql
|
SELECT "name" FROM "race_3_results" WHERE "laps"=46 AND "points"<9 AND "grid"<12; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the driver who went 46 laps had less than 9 points and had a grid number under 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_3_results" (
"name" text,
"team" text,
"laps" real,
"grid" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the driver who went 46 laps had less than 9 points and had a grid number under 12?`:
```sql
|
SELECT "finals_venue_surface" FROM "list_of_finals" WHERE "year"=1966; |
## Task
Generate a SQL query to answer the following question:
`Where was the 1966 final played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_finals" (
"year" real,
"winner" text,
"score" text,
"runner_up" text,
"finals_venue_surface" text,
"city" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the 1966 final played?`:
```sql
|
SELECT AVG("worst_score") FROM "highest_and_lowest_scoring_performances" WHERE "best_dancer"='mario lopez' AND "dance"='tango'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Worst score for Mario Lopez as the Best dancer and Tango as the Dance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer" text,
"best_score" real,
"worst_dancer" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Worst score for Mario Lopez as the Best dancer and Tango as the Dance?`:
```sql
|
SELECT MAX("best_score") FROM "highest_and_lowest_scoring_performances" WHERE "dance"='mambo'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Best score for the Dance Mambo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer" text,
"best_score" real,
"worst_dancer" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Best score for the Dance Mambo?`:
```sql
|
SELECT "best_dancer" FROM "highest_and_lowest_scoring_performances" WHERE "worst_dancer"='jerry springer' AND "best_score"=29 AND "dance"='quickstep'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Best dancer with the Worst dancer of Jerry Springer, a Best score of 29, and the Dance was the Quickstep?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_and_lowest_scoring_performances" (
"dance" text,
"best_dancer" text,
"best_score" real,
"worst_dancer" text,
"worst_score" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Best dancer with the Worst dancer of Jerry Springer, a Best score of 29, and the Dance was the Quickstep?`:
```sql
|
SELECT "number_of_dances" FROM "averages" WHERE "place">1 AND "total_points"=40; |
## Task
Generate a SQL query to answer the following question:
`How many dances placed below 1 with a point total of 40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "averages" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many dances placed below 1 with a point total of 40?`:
```sql
|
SELECT MIN("number_of_dances") FROM "averages" WHERE "rank_by_average">4 AND "place"=8; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of dances with a rank larger than 4 and a place of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "averages" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of dances with a rank larger than 4 and a place of 8?`:
```sql
|
SELECT MIN("number_of_dances") FROM "averages" WHERE "place"<2 AND "average"<27.5; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of dances with a less than 2 place and an average smaller than 27.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "averages" (
"rank_by_average" real,
"place" real,
"couple" text,
"total_points" real,
"number_of_dances" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of dances with a less than 2 place and an average smaller than 27.5?`:
```sql
|
SELECT SUM("diff") FROM "europe_pool_a" WHERE "played"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the total difference for teams that played less than 6 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total difference for teams that played less than 6 games?`:
```sql
|
SELECT MAX("played") FROM "europe_pool_a" WHERE "lost">5 AND "against"=228; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of games played for teams that lost over 5 games and had an against total of 228?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of games played for teams that lost over 5 games and had an against total of 228?`:
```sql
|
SELECT COUNT("lost") FROM "europe_pool_a" WHERE "points"<4 AND "against">340; |
## Task
Generate a SQL query to answer the following question:
`How many games lost for team(s) with less than 4 paints and against total of over 340?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "europe_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games lost for team(s) with less than 4 paints and against total of over 340?`:
```sql
|
SELECT "week" FROM "game_by_game_results" WHERE "attendance"='24,242'; |
## Task
Generate a SQL query to answer the following question:
`What week was the game that had an attendance of 24,242?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_by_game_results" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week was the game that had an attendance of 24,242?`:
```sql
|
SELECT "attendance" FROM "game_by_game_results" WHERE "result"='l 35–14'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance of the game that had a score of l 35–14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_by_game_results" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance of the game that had a score of l 35–14?`:
```sql
|
SELECT "date" FROM "game_by_game_results" WHERE "week"<10 AND "attendance"='38,865'; |
## Task
Generate a SQL query to answer the following question:
`When was the pre-Week 10 game that had an attendance of over 38,865?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_by_game_results" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the pre-Week 10 game that had an attendance of over 38,865?`:
```sql
|
SELECT "location" FROM "2006_in_sports" WHERE "ppv_buyrate"='775,000'; |
## Task
Generate a SQL query to answer the following question:
`Which Location has a PPV Buyrate of 775,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_in_sports" (
"date" text,
"event" text,
"alternate_name_s" text,
"location" text,
"attendance" text,
"ppv_buyrate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Location has a PPV Buyrate of 775,000?`:
```sql
|
SELECT "venue" FROM "round_5" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`Where did Geelong play as the away team?`
### 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 `Where did Geelong play as the away team?`:
```sql
|
SELECT "away_team_score" FROM "round_5" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team's score against Hawthorn?`
### 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 away team's score against Hawthorn?`:
```sql
|
SELECT MAX("crowd") FROM "round_5" WHERE "home_team_score"='14.7 (91)'; |
## Task
Generate a SQL query to answer the following question:
`What was the largest crowd when the home team scored 14.7 (91)?`
### 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 largest crowd when the home team scored 14.7 (91)?`:
```sql
|
SELECT "home_team" FROM "round_5" WHERE "home_team_score"='18.15 (123)'; |
## Task
Generate a SQL query to answer the following question:
`What as the home team that scored 18.15 (123)?`
### 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 as the home team that scored 18.15 (123)?`:
```sql
|
SELECT "away_team" FROM "round_5" WHERE "away_team_score"='6.13 (49)'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team that scored 6.13 (49)?`
### 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 away team that scored 6.13 (49)?`:
```sql
|
SELECT "away_team_score" FROM "round_12" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`When Fitzroy was the home team, what was the away team's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Fitzroy was the home team, what was the away team's score?`:
```sql
|
SELECT "date" FROM "round_12" WHERE "home_team_score"='5.8 (38)'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the home team score 5.8 (38)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 `On what date did the home team score 5.8 (38)?`:
```sql
|
SELECT MAX("crowd") FROM "round_12" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`How big was the largest crowd recorded at the Arden Street Oval venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 big was the largest crowd recorded at the Arden Street Oval venue?`:
```sql
|
SELECT COUNT("crowd") FROM "round_12" WHERE "away_team_score"='10.14 (74)'; |
## Task
Generate a SQL query to answer the following question:
`How big was the crowd at the match where the away team had a score of 10.14 (74)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 big was the crowd at the match where the away team had a score of 10.14 (74)?`:
```sql
|
SELECT AVG("crowd") FROM "round_12" WHERE "home_team_score"='6.12 (48)'; |
## Task
Generate a SQL query to answer the following question:
`What is the average crowd size at all matches where the home team scored 6.12 (48)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average crowd size at all matches where the home team scored 6.12 (48)?`:
```sql
|
SELECT "venue" FROM "round_12" WHERE "home_team_score"='8.6 (54)'; |
## Task
Generate a SQL query to answer the following question:
`At what venue did the match where the home team scored 8.6 (54) take place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 `At what venue did the match where the home team scored 8.6 (54) take place?`:
```sql
|
SELECT MIN("attendance") FROM "exhibition_schedule" WHERE "week"=1; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest attendance in week 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest attendance in week 1?`:
```sql
|
SELECT MAX("week") FROM "exhibition_schedule" WHERE "date"='august 9, 1968' AND "attendance"<'64,020'; |
## Task
Generate a SQL query to answer the following question:
`What is the larges week for the date august 9, 1968 and less than 64,020 in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the larges week for the date august 9, 1968 and less than 64,020 in attendance?`:
```sql
|
SELECT MIN("attendance") FROM "exhibition_schedule" WHERE "date"='august 9, 1968'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest attendance number for august 9, 1968?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest attendance number for august 9, 1968?`:
```sql
|
SELECT "result" FROM "exhibition_schedule" WHERE "date"='august 30, 1968'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the game on august 30, 1968?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the game on august 30, 1968?`:
```sql
|
SELECT "class" FROM "broadcast_translators_of_wbfj_fm" WHERE "call_sign"='w267an'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the w267an call sign?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "broadcast_translators_of_wbfj_fm" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"facility_id" real,
"erp_w" real,
"height_m_ft" text,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the w267an call sign?`:
```sql
|
SELECT MIN("erp_w") FROM "broadcast_translators_of_wbfj_fm" WHERE "facility_id"=67829; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest ERP W of the 67829 Facility ID?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "broadcast_translators_of_wbfj_fm" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"facility_id" real,
"erp_w" real,
"height_m_ft" text,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest ERP W of the 67829 Facility ID?`:
```sql
|
SELECT "fcc_info" FROM "broadcast_translators_of_wbfj_fm" WHERE "frequency_m_hz"=101.3 AND "erp_w">10 AND "facility_id"<87027; |
## Task
Generate a SQL query to answer the following question:
`What is the FCC info for the call sign with a frequency MHz of 101.3, a ERP W over 10, and a Facility ID smaller than 87027?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "broadcast_translators_of_wbfj_fm" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"facility_id" real,
"erp_w" real,
"height_m_ft" text,
"class" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the FCC info for the call sign with a frequency MHz of 101.3, a ERP W over 10, and a Facility ID smaller than 87027?`:
```sql
|
SELECT AVG("off_reb") FROM "external_links" WHERE "ftm_fta"='16-17' AND "steals"<8; |
## Task
Generate a SQL query to answer the following question:
`What was the average of the Off Reb with steals less than 8 and FTM-FTA of 16-17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "external_links" (
"rank" real,
"score" real,
"date" text,
"player" text,
"opponent" text,
"minutes" real,
"fgm_fga" text,
"3_pm_3_pa" text,
"ftm_fta" text,
"off_reb" real,
"def_reb" real,
"assists" real,
"steals" real,
"blocks" real,
"turnovers" real,
"fouls" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average of the Off Reb with steals less than 8 and FTM-FTA of 16-17?`:
```sql
|
SELECT "song" FROM "singles" WHERE "release_info"='heavenly (hvn152)'; |
## Task
Generate a SQL query to answer the following question:
`Which song released on heavenly (hvn152)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"song" text,
"release_date" text,
"release_info" text,
"formats" text,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which song released on heavenly (hvn152)?`:
```sql
|
SELECT "album" FROM "singles" WHERE "release_info"='heavenly (hvn95)'; |
## Task
Generate a SQL query to answer the following question:
`Which album had a release of heavenly (hvn95)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"song" text,
"release_date" text,
"release_info" text,
"formats" text,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which album had a release of heavenly (hvn95)?`:
```sql
|
SELECT COUNT("round") FROM "1997_new_england_patriots_draft_selectio" WHERE "college"='florida state'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of all the rounds when a Florida State player was drafted?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1997_new_england_patriots_draft_selectio" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of all the rounds when a Florida State player was drafted?`:
```sql
|
SELECT AVG("round") FROM "1997_new_england_patriots_draft_selectio" WHERE "position"='safety' AND "overall">89; |
## Task
Generate a SQL query to answer the following question:
`What is the average round in which a Safety with an overall rank higher than 89 was drafted?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1997_new_england_patriots_draft_selectio" (
"round" real,
"overall" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average round in which a Safety with an overall rank higher than 89 was drafted?`:
```sql
|
SELECT "venue" FROM "results" WHERE "silver"='united states' AND "year"=2010; |
## Task
Generate a SQL query to answer the following question:
`Where was 2010 tournament where the United States received the silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"gold" text,
"silver" text,
"bronze" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was 2010 tournament where the United States received the silver?`:
```sql
|
SELECT "venue" FROM "results" WHERE "bronze"='finland' AND "silver"='united states'; |
## Task
Generate a SQL query to answer the following question:
`Where was the tournament where Finland received the bronze and the United States received the silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"gold" text,
"silver" text,
"bronze" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the tournament where Finland received the bronze and the United States received the silver?`:
```sql
|
SELECT "gold" FROM "results" WHERE "silver"='czech republic' AND "venue"='bratislava'; |
## Task
Generate a SQL query to answer the following question:
`Who received the gold at the tournament at bratislava where the Czech Republic received the silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"gold" text,
"silver" text,
"bronze" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who received the gold at the tournament at bratislava where the Czech Republic received the silver?`:
```sql
|
SELECT "venue" FROM "results" WHERE "year">1991 AND "bronze"='czech republic' AND "silver"='russia'; |
## Task
Generate a SQL query to answer the following question:
`Where was the post 1991 tournament where the Czech Republic received the bronze and Russia received the silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"year" real,
"gold" text,
"silver" text,
"bronze" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the post 1991 tournament where the Czech Republic received the bronze and Russia received the silver?`:
```sql
|
SELECT "away_team" FROM "round_2" WHERE "home_team_score"='10.12 (72)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team when the home team scored 10.12 (72)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"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 when the home team scored 10.12 (72)?`:
```sql
|
SELECT "away_team" FROM "round_2" WHERE "venue"='kardinia park'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team at the game at Kardinia Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"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 the game at Kardinia Park?`:
```sql
|
SELECT MIN("crowd") FROM "round_2" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the smallest crowd for a Melbourne away game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"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 smallest crowd for a Melbourne away game?`:
```sql
|
SELECT "home_team" FROM "round_2" WHERE "home_team_score"='10.12 (72)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team that scored 10.12 (72)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"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 home team that scored 10.12 (72)?`:
```sql
|
SELECT "date" FROM "regular_season_schedule" WHERE "week"=8; |
## Task
Generate a SQL query to answer the following question:
`What day did the team play on week 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What day did the team play on week 8?`:
```sql
|
SELECT AVG("crowd") FROM "round_12" WHERE "venue"='corio oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the average size of the crowd for matches held at Corio Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 average size of the crowd for matches held at Corio Oval?`:
```sql
|
SELECT "home_team_score" FROM "round_12" WHERE "away_team_score"='16.21 (117)'; |
## Task
Generate a SQL query to answer the following question:
`For the match with an away team score of 16.21 (117), what was the home team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 `For the match with an away team score of 16.21 (117), what was the home team score?`:
```sql
|
SELECT "venue" FROM "round_12" WHERE "home_team_score"='11.14 (80)'; |
## Task
Generate a SQL query to answer the following question:
`For the match with a home team score of 11.14 (80), what was the venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 `For the match with a home team score of 11.14 (80), what was the venue?`:
```sql
|
SELECT "home_team" FROM "round_14" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`What home team played against St Kilda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What home team played against St Kilda?`:
```sql
|
SELECT "venue" FROM "round_14" WHERE "home_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`At what venue was South Melbourne the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `At what venue was South Melbourne the home team?`:
```sql
|
SELECT "home_team_score" FROM "round_14" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was Hawthorn's score when they were the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Hawthorn's score when they were the home team?`:
```sql
|
SELECT "venue" FROM "round_14" WHERE "away_team_score"='7.7 (49)'; |
## Task
Generate a SQL query to answer the following question:
`At which venue did the away team score 7.7 (49)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `At which venue did the away team score 7.7 (49)?`:
```sql
|
SELECT "home_team_score" FROM "round_13" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team's score when they played at Lake 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 `What was the home team's score when they played at Lake Oval?`:
```sql
|
SELECT "income_inequality_1994_2011_latest_available" FROM "indicators" WHERE "population_2011"='21,315,135'; |
## Task
Generate a SQL query to answer the following question:
`What is the latest available income inequality for the country with a population of 21,315,135?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indicators" (
"country" text,
"area_km_2010" text,
"population_2011" text,
"gdp_ppp_intl_2011" text,
"gdp_ppp_per_capita_intl_2011" text,
"income_inequality_1994_2011_latest_available" text,
"hdi_2011" text,
"fsi_2012" text,
"cpi_2011" text,
"ief_2011" text,
"gpi_2012" text,
"wpfi_2011_2012" text,
"di_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latest available income inequality for the country with a population of 21,315,135?`:
```sql
|
SELECT "ief_2011" FROM "indicators" WHERE "fsi_2012"='99.2'; |
## Task
Generate a SQL query to answer the following question:
`What is the IEF 2011 of the country with an FSI 2012 of 99.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indicators" (
"country" text,
"area_km_2010" text,
"population_2011" text,
"gdp_ppp_intl_2011" text,
"gdp_ppp_per_capita_intl_2011" text,
"income_inequality_1994_2011_latest_available" text,
"hdi_2011" text,
"fsi_2012" text,
"cpi_2011" text,
"ief_2011" text,
"gpi_2012" text,
"wpfi_2011_2012" text,
"di_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the IEF 2011 of the country with an FSI 2012 of 99.2?`:
```sql
|
SELECT "income_inequality_1994_2011_latest_available" FROM "indicators" WHERE "country"='seychelles'; |
## Task
Generate a SQL query to answer the following question:
`What is the current income inequality for the country of Seychelles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indicators" (
"country" text,
"area_km_2010" text,
"population_2011" text,
"gdp_ppp_intl_2011" text,
"gdp_ppp_per_capita_intl_2011" text,
"income_inequality_1994_2011_latest_available" text,
"hdi_2011" text,
"fsi_2012" text,
"cpi_2011" text,
"ief_2011" text,
"gpi_2012" text,
"wpfi_2011_2012" text,
"di_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the current income inequality for the country of Seychelles?`:
```sql
|
SELECT "hdi_2011" FROM "indicators" WHERE "di_2011"='7.63'; |
## Task
Generate a SQL query to answer the following question:
`What is the HDI 2011 of the country with a DI 2011 of 7.63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indicators" (
"country" text,
"area_km_2010" text,
"population_2011" text,
"gdp_ppp_intl_2011" text,
"gdp_ppp_per_capita_intl_2011" text,
"income_inequality_1994_2011_latest_available" text,
"hdi_2011" text,
"fsi_2012" text,
"cpi_2011" text,
"ief_2011" text,
"gpi_2012" text,
"wpfi_2011_2012" text,
"di_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the HDI 2011 of the country with a DI 2011 of 7.63?`:
```sql
|
SELECT "country" FROM "indicators" WHERE "ief_2011"='45.3'; |
## Task
Generate a SQL query to answer the following question:
`What country has an IEF 2011 of 45.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indicators" (
"country" text,
"area_km_2010" text,
"population_2011" text,
"gdp_ppp_intl_2011" text,
"gdp_ppp_per_capita_intl_2011" text,
"income_inequality_1994_2011_latest_available" text,
"hdi_2011" text,
"fsi_2012" text,
"cpi_2011" text,
"ief_2011" text,
"gpi_2012" text,
"wpfi_2011_2012" text,
"di_2011" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has an IEF 2011 of 45.3?`:
```sql
|
SELECT "date" FROM "round_18" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What date did South Melbourne play as the Away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"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 date did South Melbourne play as the Away team?`:
```sql
|
SELECT "venue" FROM "round_18" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`Where did Essendon play as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"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 `Where did Essendon play as the home team?`:
```sql
|
SELECT "school_country" FROM "p" WHERE "position"='guard' AND "from"='2000'; |
## Task
Generate a SQL query to answer the following question:
`What is the school or country for the guard from 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "p" (
"player" text,
"nationality" text,
"position" text,
"from" text,
"school_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the school or country for the guard from 2000?`:
```sql
|
SELECT "player" FROM "p" WHERE "from"='2000'; |
## Task
Generate a SQL query to answer the following question:
`What is the player from the year 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "p" (
"player" text,
"nationality" text,
"position" text,
"from" text,
"school_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the player from the year 2000?`:
```sql
|
SELECT "position" FROM "p" WHERE "from"='2002'; |
## Task
Generate a SQL query to answer the following question:
`What position does the player from 2002 play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "p" (
"player" text,
"nationality" text,
"position" text,
"from" text,
"school_country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What position does the player from 2002 play?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.