output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "date" FROM "fifth_round_proper" WHERE "away_team"='southampton'; |
## Task
Generate a SQL query to answer the following question:
`What is the date southampton was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date southampton was the away team?`:
```sql
|
SELECT "score" FROM "fifth_round_proper" WHERE "home_team"='tottenham hotspur'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the home team tottenham hotspur?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fifth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the home team tottenham hotspur?`:
```sql
|
SELECT "score" FROM "second_round_proper" WHERE "date"='16 december 1987'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game on 16 december 1987?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game on 16 december 1987?`:
```sql
|
SELECT "home_team" FROM "second_round_proper" WHERE "away_team"='hereford united'; |
## Task
Generate a SQL query to answer the following question:
`Who played against the away team hereford united?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played against the away team hereford united?`:
```sql
|
SELECT "home_team" FROM "second_round_proper" WHERE "away_team"='hereford united'; |
## Task
Generate a SQL query to answer the following question:
`Who played against away team hereford united?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played against away team hereford united?`:
```sql
|
SELECT "clubs" FROM "details_of_participants" WHERE "position_in_1959_1960"='1'; |
## Task
Generate a SQL query to answer the following question:
`Which club was in Position 1 in 1959-1960?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "details_of_participants" (
"clubs" text,
"seasons_at_this_level" text,
"settlements" text,
"season_joined_league" text,
"position_in_1959_1960" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which club was in Position 1 in 1959-1960?`:
```sql
|
SELECT "season_joined_league" FROM "details_of_participants" WHERE "settlements"='évora'; |
## Task
Generate a SQL query to answer the following question:
`In which season did the évora settlements join the league?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "details_of_participants" (
"clubs" text,
"seasons_at_this_level" text,
"settlements" text,
"season_joined_league" text,
"position_in_1959_1960" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which season did the évora settlements join the league?`:
```sql
|
SELECT "position_in_1959_1960" FROM "details_of_participants" WHERE "seasons_at_this_level"='14 seasons'; |
## Task
Generate a SQL query to answer the following question:
`What was the position in 1959-1960 for the club that had 14 seasons at this level?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "details_of_participants" (
"clubs" text,
"seasons_at_this_level" text,
"settlements" text,
"season_joined_league" text,
"position_in_1959_1960" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the position in 1959-1960 for the club that had 14 seasons at this level?`:
```sql
|
SELECT "position_in_1959_1960" FROM "details_of_participants" WHERE "clubs"='sporting de braga'; |
## Task
Generate a SQL query to answer the following question:
`What was the position in 1959-1960 for the Sporting De Braga club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "details_of_participants" (
"clubs" text,
"seasons_at_this_level" text,
"settlements" text,
"season_joined_league" text,
"position_in_1959_1960" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the position in 1959-1960 for the Sporting De Braga club?`:
```sql
|
SELECT "season_joined_league" FROM "details_of_participants" WHERE "seasons_at_this_level"='15 seasons'; |
## Task
Generate a SQL query to answer the following question:
`What is the "season joined league" for the club that had 15 seasons at this level?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "details_of_participants" (
"clubs" text,
"seasons_at_this_level" text,
"settlements" text,
"season_joined_league" text,
"position_in_1959_1960" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the "season joined league" for the club that had 15 seasons at this level?`:
```sql
|
SELECT "country" FROM "final_round" WHERE "score"='71-66-72-72=281'; |
## Task
Generate a SQL query to answer the following question:
`What country has a score of 71-66-72-72=281?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a score of 71-66-72-72=281?`:
```sql
|
SELECT SUM("money") FROM "final_round" WHERE "player"='payne stewart'; |
## Task
Generate a SQL query to answer the following question:
`What is the total amount of money that Payne Stewart has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total amount of money that Payne Stewart has?`:
```sql
|
SELECT "country" FROM "final_round" WHERE "player"='nick faldo'; |
## Task
Generate a SQL query to answer the following question:
`What country has player Nick Faldo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What country has player Nick Faldo?`:
```sql
|
SELECT "to_par" FROM "final_round" WHERE "score"='64-73-74-69=280'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par for the score 64-73-74-69=280?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par for the score 64-73-74-69=280?`:
```sql
|
SELECT MIN("rank") FROM "busiest_international_routes_from_jeju_2" WHERE "carriers"='china eastern airlines, korean air' AND "passengers">'97,055'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest rank for China Eastern Airlines, Korean Air with more passengers than 97,055?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "busiest_international_routes_from_jeju_2" (
"rank" real,
"airport" text,
"passengers" real,
"aircraft_movements" real,
"carriers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest rank for China Eastern Airlines, Korean Air with more passengers than 97,055?`:
```sql
|
SELECT MIN("rank") FROM "busiest_international_routes_from_jeju_2" WHERE "passengers">'73,754'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest rank for passengers more than 73,754?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "busiest_international_routes_from_jeju_2" (
"rank" real,
"airport" text,
"passengers" real,
"aircraft_movements" real,
"carriers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest rank for passengers more than 73,754?`:
```sql
|
SELECT "carriers" FROM "busiest_international_routes_from_jeju_2" WHERE "rank"=20; |
## Task
Generate a SQL query to answer the following question:
`Which carrier is ranked 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "busiest_international_routes_from_jeju_2" (
"rank" real,
"airport" text,
"passengers" real,
"aircraft_movements" real,
"carriers" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which carrier is ranked 20?`:
```sql
|
SELECT MAX("rank") FROM "busiest_international_routes_from_jeju_2" WHERE "passengers"<'124,296'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank when there are fewer than 124,296 passengers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "busiest_international_routes_from_jeju_2" (
"rank" real,
"airport" text,
"passengers" real,
"aircraft_movements" real,
"carriers" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank when there are fewer than 124,296 passengers?`:
```sql
|
SELECT "2013" FROM "women_s_doubles_performance_timeline" WHERE "tournament"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What's the 2013 result for the grand slam tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the 2013 result for the grand slam tournaments?`:
```sql
|
SELECT "2010" FROM "women_s_doubles_performance_timeline" WHERE "2006"='a'; |
## Task
Generate a SQL query to answer the following question:
`What's the 2010 result when 2006 is a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the 2010 result when 2006 is a?`:
```sql
|
SELECT "tournament" FROM "women_s_doubles_performance_timeline" WHERE "2003"='a'; |
## Task
Generate a SQL query to answer the following question:
`What tournament has a 2003 of a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `What tournament has a 2003 of a?`:
```sql
|
SELECT "2007" FROM "women_s_doubles_performance_timeline" WHERE "2003"='a'; |
## Task
Generate a SQL query to answer the following question:
`What's the 2007 result when 2003 is a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the 2007 result when 2003 is a?`:
```sql
|
SELECT "2011" FROM "women_s_doubles_performance_timeline" WHERE "2010"='2r' AND "2013"='w'; |
## Task
Generate a SQL query to answer the following question:
`What's the 2011 result when 2010 is 2r and 2013 is w?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the 2011 result when 2010 is 2r and 2013 is w?`:
```sql
|
SELECT "2005" FROM "women_s_doubles_performance_timeline" WHERE "2001"='sf'; |
## Task
Generate a SQL query to answer the following question:
`What's the 2005 result when 2001 is sf?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_doubles_performance_timeline" (
"tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the 2005 result when 2001 is sf?`:
```sql
|
SELECT "result" FROM "first_division" WHERE "attendance">'41,415' AND "opponent"='wolverhampton wanderers'; |
## Task
Generate a SQL query to answer the following question:
`When the wolverhampton wanderers were the opponent, with a crowd larger than 41,415, what was the result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_division" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the wolverhampton wanderers were the opponent, with a crowd larger than 41,415, what was the result?`:
```sql
|
SELECT "binibining_pilipinas_world" FROM "title_holders_from_1992_until_1999" WHERE "second_runner_up"='sonia santiago'; |
## Task
Generate a SQL query to answer the following question:
`Which Binibining Pilipinas-World has a Second runner-up of sonia santiago?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "title_holders_from_1992_until_1999" (
"year" real,
"binibining_pilipinas_universe" text,
"binibining_pilipinas_world" text,
"binibining_pilipinas_international" text,
"miss_maja_pilipinas" text,
"first_runner_up" text,
"second_runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Binibining Pilipinas-World has a Second runner-up of sonia santiago?`:
```sql
|
SELECT "year" FROM "title_holders_from_1992_until_1999" WHERE "binibining_pilipinas_international"='alma concepcion'; |
## Task
Generate a SQL query to answer the following question:
`Which Year has a Binibining Pilipinas International of alma concepcion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "title_holders_from_1992_until_1999" (
"year" real,
"binibining_pilipinas_universe" text,
"binibining_pilipinas_world" text,
"binibining_pilipinas_international" text,
"miss_maja_pilipinas" text,
"first_runner_up" text,
"second_runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year has a Binibining Pilipinas International of alma concepcion?`:
```sql
|
SELECT "binibining_pilipinas_international" FROM "title_holders_from_1992_until_1999" WHERE "binibining_pilipinas_world"='sharmaine gutierrez'; |
## Task
Generate a SQL query to answer the following question:
`Which Binibining Pilipinas International has a Binibining Pilipinas-World of sharmaine gutierrez?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "title_holders_from_1992_until_1999" (
"year" real,
"binibining_pilipinas_universe" text,
"binibining_pilipinas_world" text,
"binibining_pilipinas_international" text,
"miss_maja_pilipinas" text,
"first_runner_up" text,
"second_runner_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Binibining Pilipinas International has a Binibining Pilipinas-World of sharmaine gutierrez?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "site"='rice stadium • houston, tx'; |
## Task
Generate a SQL query to answer the following question:
`Which Result has a Site of rice stadium • houston, tx?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Result has a Site of rice stadium • houston, tx?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "site"='razorback stadium • fayetteville, ar' AND "date"='october 7, 1967'; |
## Task
Generate a SQL query to answer the following question:
`What Opponent has a Site of razorback stadium • fayetteville, ar, and a Date of october 7, 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Opponent has a Site of razorback stadium • fayetteville, ar, and a Date of october 7, 1967?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "site"='war memorial stadium • little rock, ar' AND "result"='l6–7'; |
## Task
Generate a SQL query to answer the following question:
`What Opponent has a Site of war memorial stadium • little rock, ar, and a Result of l6–7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Opponent has a Site of war memorial stadium • little rock, ar, and a Result of l6–7?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='october 14, 1967'; |
## Task
Generate a SQL query to answer the following question:
`What Result has a Date of october 14, 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Result has a Date of october 14, 1967?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "result"='l12–21'; |
## Task
Generate a SQL query to answer the following question:
`What Attendance has a Result of l12–21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Attendance has a Result of l12–21?`:
```sql
|
SELECT "site" FROM "schedule" WHERE "attendance"='53,000' AND "date"='october 21, 1967'; |
## Task
Generate a SQL query to answer the following question:
`What Site has Attendance of 53,000, and a Date of october 21, 1967?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Site has Attendance of 53,000, and a Date of october 21, 1967?`:
```sql
|
SELECT "region" FROM "recording_and_release_details" WHERE "format_s"='cd' AND "label"='toshiba emi'; |
## Task
Generate a SQL query to answer the following question:
`What region is the toshiba emi label with a cd format?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recording_and_release_details" (
"region" text,
"date" text,
"label" text,
"format_s" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What region is the toshiba emi label with a cd format?`:
```sql
|
SELECT "date" FROM "recording_and_release_details" WHERE "catalog"='asw 28033'; |
## Task
Generate a SQL query to answer the following question:
`What is the dage of catalog asw 28033?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recording_and_release_details" (
"region" text,
"date" text,
"label" text,
"format_s" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the dage of catalog asw 28033?`:
```sql
|
SELECT "date" FROM "recording_and_release_details" WHERE "region"='japan'; |
## Task
Generate a SQL query to answer the following question:
`What is the date with a Japan region?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recording_and_release_details" (
"region" text,
"date" text,
"label" text,
"format_s" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date with a Japan region?`:
```sql
|
SELECT "region" FROM "recording_and_release_details" WHERE "format_s"='lp' AND "date"='4 august 2008'; |
## Task
Generate a SQL query to answer the following question:
`What region has a lp format on 4 August 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recording_and_release_details" (
"region" text,
"date" text,
"label" text,
"format_s" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What region has a lp format on 4 August 2008?`:
```sql
|
SELECT "region" FROM "recording_and_release_details" WHERE "date"='11 august 2008'; |
## Task
Generate a SQL query to answer the following question:
`What region is on 11 August 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "recording_and_release_details" (
"region" text,
"date" text,
"label" text,
"format_s" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What region is on 11 August 2008?`:
```sql
|
SELECT AVG("pos") FROM "odi_centuries" WHERE "h_a_n"='neutral' AND "inn">2; |
## Task
Generate a SQL query to answer the following question:
`What is the position with a neutral H/A/N and more than 2 innings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "odi_centuries" (
"score" text,
"pos" real,
"inn" real,
"venue" text,
"h_a_n" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position with a neutral H/A/N and more than 2 innings?`:
```sql
|
SELECT "venue" FROM "odi_centuries" WHERE "h_a_n"='neutral' AND "pos"<3 AND "score"='141'; |
## Task
Generate a SQL query to answer the following question:
`Which venue has a neutral H/A/N, lower than position 3 and a score of 141?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "odi_centuries" (
"score" text,
"pos" real,
"inn" real,
"venue" text,
"h_a_n" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue has a neutral H/A/N, lower than position 3 and a score of 141?`:
```sql
|
SELECT "h_a_n" FROM "odi_centuries" WHERE "score"='105*♠'; |
## Task
Generate a SQL query to answer the following question:
`Which H/A/N has a score of 105*♠?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "odi_centuries" (
"score" text,
"pos" real,
"inn" real,
"venue" text,
"h_a_n" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which H/A/N has a score of 105*♠?`:
```sql
|
SELECT AVG("goals_scored") FROM "relegation_table" WHERE "played"<34 AND "draw">2; |
## Task
Generate a SQL query to answer the following question:
`What is the average goals scored when less than 34 were played and there were more than 2 draws?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average goals scored when less than 34 were played and there were more than 2 draws?`:
```sql
|
SELECT AVG("goals_scored") FROM "relegation_table" WHERE "points"='44' AND "place">5; |
## Task
Generate a SQL query to answer the following question:
`What is the average goals scored of the team who scored 44 points and placed higher than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average goals scored of the team who scored 44 points and placed higher than 5?`:
```sql
|
SELECT MIN("place") FROM "relegation_table" WHERE "goals_conceded"=36 AND "lost">6; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest place of the team who conceded 36 goals and lost more than 6 times?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "relegation_table" (
"place" real,
"team" text,
"played" real,
"draw" real,
"lost" real,
"goals_scored" real,
"goals_conceded" real,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest place of the team who conceded 36 goals and lost more than 6 times?`:
```sql
|
SELECT "games" FROM "quarterbacks_sorted_by_win_percentage" WHERE "losses">1 AND "percent"=0.5 AND "wins"=2; |
## Task
Generate a SQL query to answer the following question:
`what is games when the losses is more than 1, percent is 0.5 and wins is 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterbacks_sorted_by_win_percentage" (
"quarterback" text,
"games" real,
"teams" text,
"wins" real,
"losses" real,
"percent" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is games when the losses is more than 1, percent is 0.5 and wins is 2?`:
```sql
|
SELECT AVG("wins") FROM "quarterbacks_sorted_by_win_percentage" WHERE "percent">0.4 AND "teams"='chargers~'; |
## Task
Generate a SQL query to answer the following question:
`what is the average wins when percent is more than 0.4 and teams is chargers~?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterbacks_sorted_by_win_percentage" (
"quarterback" text,
"games" real,
"teams" text,
"wins" real,
"losses" real,
"percent" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average wins when percent is more than 0.4 and teams is chargers~?`:
```sql
|
SELECT AVG("wins") FROM "quarterbacks_sorted_by_win_percentage" WHERE "teams"='lions' AND "percent">0; |
## Task
Generate a SQL query to answer the following question:
`What is the average wins when teams is lions and the percent is more than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterbacks_sorted_by_win_percentage" (
"quarterback" text,
"games" real,
"teams" text,
"wins" real,
"losses" real,
"percent" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average wins when teams is lions and the percent is more than 0?`:
```sql
|
SELECT MAX("wins") FROM "quarterbacks_sorted_by_win_percentage" WHERE "losses"<1 AND "teams"='rams' AND "games">8; |
## Task
Generate a SQL query to answer the following question:
`what is the highest wins when the losses is less than 1, team is rams and the games is more than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterbacks_sorted_by_win_percentage" (
"quarterback" text,
"games" real,
"teams" text,
"wins" real,
"losses" real,
"percent" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest wins when the losses is less than 1, team is rams and the games is more than 8?`:
```sql
|
SELECT "category" FROM "singles_6_3_titles_3_runner_ups" WHERE "opponent"='matthew barton'; |
## Task
Generate a SQL query to answer the following question:
`What category is Matthew Barton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_6_3_titles_3_runner_ups" (
"outcome" text,
"date" text,
"category" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What category is Matthew Barton?`:
```sql
|
SELECT "launched" FROM "ships_in_class" WHERE "commissioned"='november 1975' AND "bow_number"='ps-18'; |
## Task
Generate a SQL query to answer the following question:
`When did the ship commissioned in November 1975 with a bow number of ps-18 launch?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_in_class" (
"bow_number" text,
"ship_name" text,
"launched" text,
"commissioned" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the ship commissioned in November 1975 with a bow number of ps-18 launch?`:
```sql
|
SELECT "launched" FROM "ships_in_class" WHERE "commissioned"='july 1948' AND "bow_number"='ps-31'; |
## Task
Generate a SQL query to answer the following question:
`When did the ship that was commissioned July 1948 with a bow number of ps-31 launch?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_in_class" (
"bow_number" text,
"ship_name" text,
"launched" text,
"commissioned" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the ship that was commissioned July 1948 with a bow number of ps-31 launch?`:
```sql
|
SELECT "commissioned" FROM "ships_in_class" WHERE "ship_name"='brp miguel malvar'; |
## Task
Generate a SQL query to answer the following question:
`When was the ship BRP Miguel Malvar commissioned?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships_in_class" (
"bow_number" text,
"ship_name" text,
"launched" text,
"commissioned" text,
"service" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the ship BRP Miguel Malvar commissioned?`:
```sql
|
SELECT MIN("area_km_2") FROM "parishes" WHERE "population">'1,776' AND "census_ranking"='579 of 5,008'; |
## Task
Generate a SQL query to answer the following question:
`What parish has the lowest area and a population of more than 1,776 and a 579 of 5,008 census ranking?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "parishes" (
"official_name" text,
"status" text,
"area_km_2" real,
"population" real,
"census_ranking" text
);
### SQL
Given the database schema, here is the SQL query that answers `What parish has the lowest area and a population of more than 1,776 and a 579 of 5,008 census ranking?`:
```sql
|
SELECT SUM("population") FROM "parishes" WHERE "area_km_2"<342.4 AND "official_name"='northfield'; |
## Task
Generate a SQL query to answer the following question:
`What is the population of northfield parish that has an area less than 342.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "parishes" (
"official_name" text,
"status" text,
"area_km_2" real,
"population" real,
"census_ranking" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population of northfield parish that has an area less than 342.4?`:
```sql
|
SELECT SUM("population") FROM "parishes" WHERE "census_ranking"='579 of 5,008'; |
## Task
Generate a SQL query to answer the following question:
`What is the population of the parish with a census ranking of 579 of 5,008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "parishes" (
"official_name" text,
"status" text,
"area_km_2" real,
"population" real,
"census_ranking" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population of the parish with a census ranking of 579 of 5,008?`:
```sql
|
SELECT SUM("population") FROM "parishes" WHERE "area_km_2"=304.06; |
## Task
Generate a SQL query to answer the following question:
`What is the population of the parish that has an area of 304.06?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "parishes" (
"official_name" text,
"status" text,
"area_km_2" real,
"population" real,
"census_ranking" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the population of the parish that has an area of 304.06?`:
```sql
|
SELECT MIN("year") FROM "achievements" WHERE "notes"='1500 m' AND "competition"='world junior championships'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year the world junior championships has 1500 m notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year the world junior championships has 1500 m notes?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "notes"='5000 m' AND "year"=2009 AND "position"='1st'; |
## Task
Generate a SQL query to answer the following question:
`Which venue had 5000 m notes in 2009 with a 1st position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue had 5000 m notes in 2009 with a 1st position?`:
```sql
|
SELECT AVG("year") FROM "achievements" WHERE "position"='7th (heats)'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year with 7th (heats) position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year with 7th (heats) position?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='kenneth allen'; |
## Task
Generate a SQL query to answer the following question:
`What Method was used with opponent Kenneth Allen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Method was used with opponent Kenneth Allen?`:
```sql
|
SELECT "remarks" FROM "list_of_dmfas_programme_managers_and_chi" WHERE "country_of_origin"='norway'; |
## Task
Generate a SQL query to answer the following question:
`What is the remark for Norway?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_dmfas_programme_managers_and_chi" (
"number" real,
"name" text,
"dates_in_office" text,
"country_of_origin" text,
"remarks" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the remark for Norway?`:
```sql
|
SELECT SUM("attendance") FROM "pre_season_and_friendlies" WHERE "opponents"='kaizer chiefs'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game against the Kaizer Chiefs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many people attended the game against the Kaizer Chiefs?`:
```sql
|
SELECT "result_f_a" FROM "pre_season_and_friendlies" WHERE "h_a"='h' AND "attendance">'31,727'; |
## Task
Generate a SQL query to answer the following question:
`What is the result F-A with an H/A of h and more than 31,727 attending?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result F-A with an H/A of h and more than 31,727 attending?`:
```sql
|
SELECT "result_f_a" FROM "pre_season_and_friendlies" WHERE "attendance">'11,372' AND "h_a"='n'; |
## Task
Generate a SQL query to answer the following question:
`What was the result F-A with more than 11,372 attending and an H/A of n?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_and_friendlies" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result F-A with more than 11,372 attending and an H/A of n?`:
```sql
|
SELECT "player" FROM "2011_draft_picks" WHERE "college_junior_club_team_league"='val d''or foreurs ( qmjhl )'; |
## Task
Generate a SQL query to answer the following question:
`What is Player, when College/Junior/Club Team (League) is "Val d'Or Foreurs ( QMJHL )"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Player, when College/Junior/Club Team (League) is "Val d'Or Foreurs ( QMJHL )"?`:
```sql
|
SELECT "position" FROM "2011_draft_picks" WHERE "player"='magnus nygren'; |
## Task
Generate a SQL query to answer the following question:
`What is the Position, when Player is "Magnus Nygren"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Position, when Player is "Magnus Nygren"?`:
```sql
|
SELECT "position" FROM "2011_draft_picks" WHERE "round"<5 AND "nationality"='canada' AND "college_junior_club_team_league"='saint john sea dogs ( qmjhl )'; |
## Task
Generate a SQL query to answer the following question:
`What is Position, when Round is less than 5, when Nationality is "Canada", and when College/Junior/Club Team (League) is "Saint John Sea Dogs ( QMJHL )"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Position, when Round is less than 5, when Nationality is "Canada", and when College/Junior/Club Team (League) is "Saint John Sea Dogs ( QMJHL )"?`:
```sql
|
SELECT "college_junior_club_team_league" FROM "2011_draft_picks" WHERE "position"='defence' AND "nationality"='canada' AND "round"<5 AND "player"='josiah didier'; |
## Task
Generate a SQL query to answer the following question:
`What is College/Junior/Club Team (League), when Position is "Defence", when Nationality is "Canada", when Round is less than 5, and when Player is "Josiah Didier"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is College/Junior/Club Team (League), when Position is "Defence", when Nationality is "Canada", when Round is less than 5, and when Player is "Josiah Didier"?`:
```sql
|
SELECT AVG("total") FROM "missed_the_cut" WHERE "player"='ian baker-finch'; |
## Task
Generate a SQL query to answer the following question:
`count the the average Total of ian baker-finch?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `count the the average Total of ian baker-finch?`:
```sql
|
SELECT "country" FROM "missed_the_cut" WHERE "year_s_won"='1963'; |
## Task
Generate a SQL query to answer the following question:
`Which Country has a Year(s) won of 1963?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Country has a Year(s) won of 1963?`:
```sql
|
SELECT "score" FROM "final_leaderboard" WHERE "player"='greg norman'; |
## Task
Generate a SQL query to answer the following question:
`What is Greg Norman's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Greg Norman's score?`:
```sql
|
SELECT "place" FROM "final_leaderboard" WHERE "player"='john cook'; |
## Task
Generate a SQL query to answer the following question:
`What place is John Cook in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What place is John Cook in?`:
```sql
|
SELECT "money" FROM "final_leaderboard" WHERE "score"='68-69-67-73=277'; |
## Task
Generate a SQL query to answer the following question:
`What is the money for the player with a score of 68-69-67-73=277?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the money for the player with a score of 68-69-67-73=277?`:
```sql
|
SELECT "to_par" FROM "final_round" WHERE "score"='72-71-65-69=277'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par of the player with a 72-71-65-69=277 score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par of the player with a 72-71-65-69=277 score?`:
```sql
|
SELECT "country" FROM "final_round" WHERE "money"='playoff' AND "score"='66-67-70-67=270'; |
## Task
Generate a SQL query to answer the following question:
`What is the country of the player with playoff money and a score of 66-67-70-67=270?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the country of the player with playoff money and a score of 66-67-70-67=270?`:
```sql
|
SELECT "money" FROM "final_round" WHERE "score"='76-70-65-68=279'; |
## Task
Generate a SQL query to answer the following question:
`How much money does the player with a score of 76-70-65-68=279 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much money does the player with a score of 76-70-65-68=279 have?`:
```sql
|
SELECT "score" FROM "final_round" WHERE "money"='112,500' AND "player"='darren clarke'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of player darren clarke, who has $112,500?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of player darren clarke, who has $112,500?`:
```sql
|
SELECT "to_par" FROM "final_round" WHERE "country"='united states' AND "player"='notah begay iii'; |
## Task
Generate a SQL query to answer the following question:
`What is the to par of player notah begay iii from the United States?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the to par of player notah begay iii from the United States?`:
```sql
|
SELECT "song" FROM "semi_final_2_31_january_2009" WHERE "draw">4 AND "place"='1st'; |
## Task
Generate a SQL query to answer the following question:
`What song has a draw more than 4 in 1st place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_2_31_january_2009" (
"draw" real,
"artist" text,
"song" text,
"results" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What song has a draw more than 4 in 1st place?`:
```sql
|
SELECT "artist" FROM "semi_final_2_31_january_2009" WHERE "song"='\"alt har en mening nå\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the artist for the song "alt har en mening nå"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_2_31_january_2009" (
"draw" real,
"artist" text,
"song" text,
"results" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the artist for the song "alt har en mening nå"?`:
```sql
|
SELECT "results" FROM "semi_final_2_31_january_2009" WHERE "song"='\"ride\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the song "ride"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_2_31_january_2009" (
"draw" real,
"artist" text,
"song" text,
"results" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result of the song "ride"?`:
```sql
|
SELECT "1st_member" FROM "m_ps_1832_1885_macclesfield_parliamentar" WHERE "2nd_member"='thomas grimsditch'; |
## Task
Generate a SQL query to answer the following question:
`Which 1st member has Thomas Grimsditch as a 2nd member?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m_ps_1832_1885_macclesfield_parliamentar" (
"election" real,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1st member has Thomas Grimsditch as a 2nd member?`:
```sql
|
SELECT SUM("election") FROM "m_ps_1832_1885_macclesfield_parliamentar" WHERE "2nd_party"='conservative'; |
## Task
Generate a SQL query to answer the following question:
`What is all the total election that has conservative as 2nd party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m_ps_1832_1885_macclesfield_parliamentar" (
"election" real,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is all the total election that has conservative as 2nd party?`:
```sql
|
SELECT "1st_party" FROM "m_ps_1832_1885_macclesfield_parliamentar" WHERE "election"<1880 AND "1st_member"='john brocklehurst' AND "2nd_member"='edward christopher egerton'; |
## Task
Generate a SQL query to answer the following question:
`Which 1st party has John Brocklehurst as 1st member, Edward Christopher Egerton 2nd memeber, and election smaller than 1880?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m_ps_1832_1885_macclesfield_parliamentar" (
"election" real,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1st party has John Brocklehurst as 1st member, Edward Christopher Egerton 2nd memeber, and election smaller than 1880?`:
```sql
|
SELECT "1st_party" FROM "m_ps_1832_1885_macclesfield_parliamentar" WHERE "2nd_party"='conservative' AND "election"<1852 AND "2nd_member"='thomas grimsditch'; |
## Task
Generate a SQL query to answer the following question:
`Which 1st party has 2nd party conservative, election smaller than 1852, and Thomas Grimsditch as 2nd member?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m_ps_1832_1885_macclesfield_parliamentar" (
"election" real,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which 1st party has 2nd party conservative, election smaller than 1852, and Thomas Grimsditch as 2nd member?`:
```sql
|
SELECT "weight" FROM "current_squad" WHERE "name"='ádám steinmetz category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`Name the Weight of ádám steinmetz category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Weight of ádám steinmetz category:articles with hcards?`:
```sql
|
SELECT "weight" FROM "current_squad" WHERE "2012_club"='pro recco' AND "name"='tamás kásás category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`Name the Weight which has a 2012 club of pro recco, and a Name of tamás kásás category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Weight which has a 2012 club of pro recco, and a Name of tamás kásás category:articles with hcards?`:
```sql
|
SELECT "weight" FROM "current_squad" WHERE "name"='balázs hárai category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`Name the Weight which has a Name of balázs hárai category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Weight which has a Name of balázs hárai category:articles with hcards?`:
```sql
|
SELECT "2012_club" FROM "current_squad" WHERE "name"='norbert hosnyánszky category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`Name the 012 club which has of norbert hosnyánszky category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_squad" (
"name" text,
"pos" text,
"height" text,
"weight" text,
"2012_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 012 club which has of norbert hosnyánszky category:articles with hcards?`:
```sql
|
SELECT MIN("against") FROM "2005" WHERE "venue"='twickenham , london' AND "status"='six nations' AND "opposing_teams"='france'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Against, when Venue is "Twickenham , London", when Status is "Six Nations", and when Opposing Teams is "France"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Against, when Venue is "Twickenham , London", when Status is "Six Nations", and when Opposing Teams is "France"?`:
```sql
|
SELECT COUNT("against") FROM "2005" WHERE "date"='27/02/2005'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Against, when Date is "27/02/2005"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Against, when Date is "27/02/2005"?`:
```sql
|
SELECT MAX("against") FROM "2005" WHERE "date"='27/02/2005'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Against, when Date is "27/02/2005"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Against, when Date is "27/02/2005"?`:
```sql
|
SELECT "status" FROM "2005" WHERE "opposing_teams"='italy'; |
## Task
Generate a SQL query to answer the following question:
`What is Status, when Opposing Teams is "Italy"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"opposing_teams" text,
"against" real,
"date" text,
"venue" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Status, when Opposing Teams is "Italy"?`:
```sql
|
SELECT "name" FROM "huchra_et_al_1982_members_of_the_dorado_" WHERE "apparent_magnitude"<11.4 AND "r_a_j2000"='04h17m35.8s'; |
## Task
Generate a SQL query to answer the following question:
`Which Name has Apparent Magnitude smaller than 11.4, and R.A. (J2000) of 04h17m35.8s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "huchra_et_al_1982_members_of_the_dorado_" (
"name" text,
"type" text,
"r_a_j2000" text,
"dec_j2000" text,
"redshift_km_s" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Name has Apparent Magnitude smaller than 11.4, and R.A. (J2000) of 04h17m35.8s?`:
```sql
|
SELECT "r_a_j2000" FROM "huchra_et_al_1982_members_of_the_dorado_" WHERE "name"='ngc 1543'; |
## Task
Generate a SQL query to answer the following question:
`Which R.A. (J2000) has a Name of ngc 1543?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "huchra_et_al_1982_members_of_the_dorado_" (
"name" text,
"type" text,
"r_a_j2000" text,
"dec_j2000" text,
"redshift_km_s" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which R.A. (J2000) has a Name of ngc 1543?`:
```sql
|
SELECT "dec_j2000" FROM "huchra_et_al_1982_members_of_the_dorado_" WHERE "redshift_km_s"='1331 ± 3'; |
## Task
Generate a SQL query to answer the following question:
`Which Dec. (J2000) has a Redshift (km/ s) of 1331 ± 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "huchra_et_al_1982_members_of_the_dorado_" (
"name" text,
"type" text,
"r_a_j2000" text,
"dec_j2000" text,
"redshift_km_s" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Dec. (J2000) has a Redshift (km/ s) of 1331 ± 3?`:
```sql
|
SELECT "r_a_j2000" FROM "huchra_et_al_1982_members_of_the_dorado_" WHERE "name"='ngc 1515'; |
## Task
Generate a SQL query to answer the following question:
`Which R.A. (J2000) has a Name of ngc 1515?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "huchra_et_al_1982_members_of_the_dorado_" (
"name" text,
"type" text,
"r_a_j2000" text,
"dec_j2000" text,
"redshift_km_s" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which R.A. (J2000) has a Name of ngc 1515?`:
```sql
|
SELECT "r_a_j2000" FROM "huchra_et_al_1982_members_of_the_dorado_" WHERE "apparent_magnitude"=11.7 AND "dec_j2000"='°07′06″'; |
## Task
Generate a SQL query to answer the following question:
`Which R.A. (J2000) has Apparent Magnitude of 11.7, and Dec. (J2000) of °07′06″?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "huchra_et_al_1982_members_of_the_dorado_" (
"name" text,
"type" text,
"r_a_j2000" text,
"dec_j2000" text,
"redshift_km_s" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which R.A. (J2000) has Apparent Magnitude of 11.7, and Dec. (J2000) of °07′06″?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "to_par"='+11'; |
## Task
Generate a SQL query to answer the following question:
`Which player had a To par of +11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player had a To par of +11?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.