output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT SUM("losses") FROM "by_clubs" WHERE "matches"=2 AND "against"=2 AND "draws_pct"='0%' AND "wins"<1; |
## Task
Generate a SQL query to answer the following question:
`What are the total losses with 2 matches, 2 against, 0% of draws and less than 1 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_clubs" (
"team" text,
"matches" real,
"wins" real,
"wins_pct" text,
"draws" real,
"draws_pct" text,
"losses" real,
"losses_pct" text,
"against" real,
"for_against_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the total losses with 2 matches, 2 against, 0% of draws and less than 1 wins?`:
```sql
|
SELECT SUM("wins") FROM "by_clubs" WHERE "for_against_ratio"='0.83' AND "losses">1; |
## Task
Generate a SQL query to answer the following question:
`What is the sum on wins with an against ratio of 0.83, and more than 1 loss?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_clubs" (
"team" text,
"matches" real,
"wins" real,
"wins_pct" text,
"draws" real,
"draws_pct" text,
"losses" real,
"losses_pct" text,
"against" real,
"for_against_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum on wins with an against ratio of 0.83, and more than 1 loss?`:
```sql
|
SELECT "reason_of_departure" FROM "managerial_changes" WHERE "date_outgoing"='august 1, 2008'; |
## Task
Generate a SQL query to answer the following question:
`Why did the manager who departed on August 1, 2008 leave?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"date_outgoing" text,
"reason_of_departure" text,
"replaced_by" text,
"date_of_replacement" text
);
### SQL
Given the database schema, here is the SQL query that answers `Why did the manager who departed on August 1, 2008 leave?`:
```sql
|
SELECT "date_of_replacement" FROM "managerial_changes" WHERE "reason_of_departure"='sacked' AND "team"='psis semarang'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the manager for PSIS Semarang take over for the manager that was sacked?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"date_outgoing" text,
"reason_of_departure" text,
"replaced_by" text,
"date_of_replacement" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did the manager for PSIS Semarang take over for the manager that was sacked?`:
```sql
|
SELECT "reason_of_departure" FROM "managerial_changes" WHERE "date_outgoing"='august 1, 2008'; |
## Task
Generate a SQL query to answer the following question:
`Why did the manager who departed on August 1, 2008 leave?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"date_outgoing" text,
"reason_of_departure" text,
"replaced_by" text,
"date_of_replacement" text
);
### SQL
Given the database schema, here is the SQL query that answers `Why did the manager who departed on August 1, 2008 leave?`:
```sql
|
SELECT "date_outgoing" FROM "managerial_changes" WHERE "outgoing_manager"='peter butler'; |
## Task
Generate a SQL query to answer the following question:
`When did Peter Butler leave his team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"date_outgoing" text,
"reason_of_departure" text,
"replaced_by" text,
"date_of_replacement" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Peter Butler leave his team?`:
```sql
|
SELECT "date_of_replacement" FROM "managerial_changes" WHERE "date_outgoing"='august 20, 2008'; |
## Task
Generate a SQL query to answer the following question:
`When did the manager take over for the manager that left on August 20, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" text,
"date_outgoing" text,
"reason_of_departure" text,
"replaced_by" text,
"date_of_replacement" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the manager take over for the manager that left on August 20, 2008?`:
```sql
|
SELECT "competition" FROM "competition_record" WHERE "notes"='1.90 m'; |
## Task
Generate a SQL query to answer the following question:
`In which competition(s) did Iljuštšenko jump 1.90 m?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_record" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which competition(s) did Iljuštšenko jump 1.90 m?`:
```sql
|
SELECT "position" FROM "competition_record" WHERE "year"<2008 AND "competition"='european championships'; |
## Task
Generate a SQL query to answer the following question:
`In which position did Iljuštšenko finish in the European Championships held prior to 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_record" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which position did Iljuštšenko finish in the European Championships held prior to 2008?`:
```sql
|
SELECT "year" FROM "competition_record" WHERE "venue"='barcelona, spain'; |
## Task
Generate a SQL query to answer the following question:
`In what year did Iljuštšenko compete in Barcelona, Spain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_record" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year did Iljuštšenko compete in Barcelona, Spain?`:
```sql
|
SELECT SUM("number_of_electorates_2009") FROM "assembly_segments" WHERE "constituency_number"='56'; |
## Task
Generate a SQL query to answer the following question:
`What's the number of electorates for constituency number 56?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the number of electorates for constituency number 56?`:
```sql
|
SELECT "constituency_number" FROM "assembly_segments" WHERE "number_of_electorates_2009">'173,217' AND "name"='damoh'; |
## Task
Generate a SQL query to answer the following question:
`What's the constituency number for Damoh with more than 173,217 electorates?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the constituency number for Damoh with more than 173,217 electorates?`:
```sql
|
SELECT "tour_apps" FROM "squad" WHERE "career_caps"=15; |
## Task
Generate a SQL query to answer the following question:
`What is the tour Apps when the career caps show 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad" (
"name" text,
"tests" real,
"club" text,
"career_caps" real,
"tour_apps" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the tour Apps when the career caps show 15?`:
```sql
|
SELECT COUNT("career_caps") FROM "squad" WHERE "position"='full back' AND "tour_apps"<29; |
## Task
Generate a SQL query to answer the following question:
`What is the number of career caps for a full back, when tour Apps is smaller than 29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad" (
"name" text,
"tests" real,
"club" text,
"career_caps" real,
"tour_apps" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of career caps for a full back, when tour Apps is smaller than 29?`:
```sql
|
SELECT "career_caps" FROM "squad" WHERE "position"='half-back' AND "tests">3; |
## Task
Generate a SQL query to answer the following question:
`What is the career caps for half-back, when tests is more than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad" (
"name" text,
"tests" real,
"club" text,
"career_caps" real,
"tour_apps" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the career caps for half-back, when tests is more than 3?`:
```sql
|
SELECT "name" FROM "squad" WHERE "tour_apps">7 AND "tests">4 AND "career_caps"=20; |
## Task
Generate a SQL query to answer the following question:
`What name has tour Apps larger than 7, tests larger than 4, and a Career caps of 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad" (
"name" text,
"tests" real,
"club" text,
"career_caps" real,
"tour_apps" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What name has tour Apps larger than 7, tests larger than 4, and a Career caps of 20?`:
```sql
|
SELECT "constructor" FROM "results" WHERE "grid"<21 AND "time_retired"='engine'; |
## Task
Generate a SQL query to answer the following question:
`What constructor has a grid less than 21, and time/retired of engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"driver" text,
"entrant" text,
"constructor" text,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What constructor has a grid less than 21, and time/retired of engine?`:
```sql
|
SELECT "driver" FROM "results" WHERE "entrant"='fred saunders'; |
## Task
Generate a SQL query to answer the following question:
`When the entrant is fred saunders what is the driver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"driver" text,
"entrant" text,
"constructor" text,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the entrant is fred saunders what is the driver?`:
```sql
|
SELECT MIN("grid") FROM "results" WHERE "entrant"='fred saunders'; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest grid with and entrant of fred saunders?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"driver" text,
"entrant" text,
"constructor" text,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest grid with and entrant of fred saunders?`:
```sql
|
SELECT "time_retired" FROM "results" WHERE "driver"='emerson fittipaldi'; |
## Task
Generate a SQL query to answer the following question:
`What is the time/retired for the driver emerson fittipaldi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"driver" text,
"entrant" text,
"constructor" text,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time/retired for the driver emerson fittipaldi?`:
```sql
|
SELECT "artist" FROM "music" WHERE "label"='columbia' AND "standard_number"='cocc-72073'; |
## Task
Generate a SQL query to answer the following question:
`Which Artist has the Label of Columbia and the Standard number of COCC-72073?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "music" (
"title" text,
"type" text,
"artist" text,
"label" text,
"standard_number" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Artist has the Label of Columbia and the Standard number of COCC-72073?`:
```sql
|
SELECT "type" FROM "music" WHERE "artist"='hiroyuki takami'; |
## Task
Generate a SQL query to answer the following question:
`What Type has the Artist of Hiroyuki Takami?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "music" (
"title" text,
"type" text,
"artist" text,
"label" text,
"standard_number" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Type has the Artist of Hiroyuki Takami?`:
```sql
|
SELECT "title" FROM "music" WHERE "label"='columbia' AND "standard_number"='codc-8760'; |
## Task
Generate a SQL query to answer the following question:
`What Title has the Label of Columbia and Standard number of CODC-8760?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "music" (
"title" text,
"type" text,
"artist" text,
"label" text,
"standard_number" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Title has the Label of Columbia and Standard number of CODC-8760?`:
```sql
|
SELECT "type" FROM "acquisitions_1885_94" WHERE "name_wade_giles"='kuang-hsing'; |
## Task
Generate a SQL query to answer the following question:
`What is the type of Kuang-Hsing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "acquisitions_1885_94" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type of Kuang-Hsing?`:
```sql
|
SELECT "type" FROM "acquisitions_1885_94" WHERE "characters"='廣丙'; |
## Task
Generate a SQL query to answer the following question:
`What type has the characters 廣丙?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "acquisitions_1885_94" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type has the characters 廣丙?`:
```sql
|
SELECT "name_wade_giles" FROM "acquisitions_1885_94" WHERE "characters"='廣亨'; |
## Task
Generate a SQL query to answer the following question:
`What's the name that has the characters 廣亨?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "acquisitions_1885_94" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name that has the characters 廣亨?`:
```sql
|
SELECT "type" FROM "acquisitions_1885_94" WHERE "characters"='廣利'; |
## Task
Generate a SQL query to answer the following question:
`What type has the characters 廣利?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "acquisitions_1885_94" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type has the characters 廣利?`:
```sql
|
SELECT "type" FROM "acquisitions_1885_94" WHERE "name_pinyin"='guangjia'; |
## Task
Generate a SQL query to answer the following question:
`What is the type of Guangjia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "acquisitions_1885_94" (
"name_pinyin" text,
"name_wade_giles" text,
"characters" text,
"type" text,
"construction" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the type of Guangjia?`:
```sql
|
SELECT "soap_opera" FROM "top_10_across_all_platforms" WHERE "rank">1 AND "character"='emily bishop'; |
## Task
Generate a SQL query to answer the following question:
`What soap opera has a rank larger than 1, and a Character named Emily Bishop?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_across_all_platforms" (
"rank" real,
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What soap opera has a rank larger than 1, and a Character named Emily Bishop?`:
```sql
|
SELECT MAX("rank") FROM "top_10_across_all_platforms" WHERE "years"='1960—'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Rank 1960—?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_across_all_platforms" (
"rank" real,
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Rank 1960—?`:
```sql
|
SELECT "actor" FROM "top_10_across_all_platforms" WHERE "duration"='61 years'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the actor with a duration of 61 years?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_across_all_platforms" (
"rank" real,
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the actor with a duration of 61 years?`:
```sql
|
SELECT "years" FROM "top_10_across_all_platforms" WHERE "duration"='52 years' AND "actor"='eileen derbyshire'; |
## Task
Generate a SQL query to answer the following question:
`What are the years for Eileen Derbyshire with a duration of 52 years?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_across_all_platforms" (
"rank" real,
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the years for Eileen Derbyshire with a duration of 52 years?`:
```sql
|
SELECT "soap_opera" FROM "top_10_across_all_platforms" WHERE "years"='1960–1965, 1965–1983, 1984–2010'; |
## Task
Generate a SQL query to answer the following question:
`What soap opera was on 1960–1965, 1965–1983, 1984–2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_10_across_all_platforms" (
"rank" real,
"actor" text,
"character" text,
"soap_opera" text,
"years" text,
"duration" text
);
### SQL
Given the database schema, here is the SQL query that answers `What soap opera was on 1960–1965, 1965–1983, 1984–2010?`:
```sql
|
SELECT "rowers" FROM "heat_1" WHERE "country"='australia'; |
## Task
Generate a SQL query to answer the following question:
`Who are the rowers for Australia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the rowers for Australia?`:
```sql
|
SELECT SUM("rank") FROM "heat_1" WHERE "country"='italy'; |
## Task
Generate a SQL query to answer the following question:
`What's Italy's rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's Italy's rank?`:
```sql
|
SELECT "visitor" FROM "game_log" WHERE "home"='linköpings hc' AND "round">20 AND "date"='saturday, november 22'; |
## Task
Generate a SQL query to answer the following question:
`Who is the visitor team on Saturday, November 22 when linköpings hc was the home team and there were more than 20 rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"round" real,
"date" text,
"home" text,
"result" text,
"visitor" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the visitor team on Saturday, November 22 when linköpings hc was the home team and there were more than 20 rounds?`:
```sql
|
SELECT MIN("attendance") FROM "game_log" WHERE "home"='linköpings hc' AND "date"='monday, november 10' AND "round">18; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest attendance on Monday, November 10 when linköpings hc was the home team and there were more than 18 rounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"round" real,
"date" text,
"home" text,
"result" text,
"visitor" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest attendance on Monday, November 10 when linköpings hc was the home team and there were more than 18 rounds?`:
```sql
|
SELECT "visitor" FROM "game_log" WHERE "venue"='axa sports center' AND "round"=20; |
## Task
Generate a SQL query to answer the following question:
`Who is the visitor at the axa sports center in round 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"round" real,
"date" text,
"home" text,
"result" text,
"visitor" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the visitor at the axa sports center in round 20?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "date"='november 6, 1966'; |
## Task
Generate a SQL query to answer the following question:
`What is the Attendance of the game on November 6, 1966?`
### 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 `What is the Attendance of the game on November 6, 1966?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='november 6, 1966'; |
## Task
Generate a SQL query to answer the following question:
`What is the Result of the game on November 6, 1966?`
### 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 `What is the Result of the game on November 6, 1966?`:
```sql
|
SELECT "club" FROM "women" WHERE "time"='4:03.63'; |
## Task
Generate a SQL query to answer the following question:
`Who is the club with a 4:03.63 time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"event" text,
"time" text,
"club" text,
"date" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the club with a 4:03.63 time?`:
```sql
|
SELECT "green_communist" FROM "116_seats_needed_for_a_majority" WHERE "socialist"='41.0%'; |
## Task
Generate a SQL query to answer the following question:
`What was the Green-Communist percentage in the poll in which the Socialist Party earned 41.0%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Green-Communist percentage in the poll in which the Socialist Party earned 41.0%?`:
```sql
|
SELECT "green_communist" FROM "116_seats_needed_for_a_majority" WHERE "lead"='9.7%'; |
## Task
Generate a SQL query to answer the following question:
`What is the Green-Communist percentage in the poll showing a 9.7% lead?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Green-Communist percentage in the poll showing a 9.7% lead?`:
```sql
|
SELECT "social_democratic" FROM "116_seats_needed_for_a_majority" WHERE "green_communist"='9.0%' AND "people_s_party"='10.0%' AND "socialist"='39.0%'; |
## Task
Generate a SQL query to answer the following question:
`What is the Social Democratic percentage for the poll with a Green-Communist rate of 9.0%, People's Party of 10.0%, and Socialist of 39.0%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"lead" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Social Democratic percentage for the poll with a Green-Communist rate of 9.0%, People's Party of 10.0%, and Socialist of 39.0%?`:
```sql
|
SELECT "result" FROM "international_goals" WHERE "date"='9 october 2012'; |
## Task
Generate a SQL query to answer the following question:
`what is the result on 9 october 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the result on 9 october 2012?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "venue"='stade général seyni kountché, niamey' AND "competition"='friendly' AND "date"='9 october 2012'; |
## Task
Generate a SQL query to answer the following question:
`what is the score when the venue is stade général seyni kountché, niamey, the competition is friendly and the date is 9 october 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the score when the venue is stade général seyni kountché, niamey, the competition is friendly and the date is 9 october 2012?`:
```sql
|
SELECT "result" FROM "international_goals" WHERE "venue"='stade général seyni kountché, niamey' AND "competition"='friendly' AND "date"='9 october 2012'; |
## Task
Generate a SQL query to answer the following question:
`what is the result when the venue is stade général seyni kountché, niamey, the competition is friendly and the date is 9 october 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the result when the venue is stade général seyni kountché, niamey, the competition is friendly and the date is 9 october 2012?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "date"='10 august 2011'; |
## Task
Generate a SQL query to answer the following question:
`what is the competition on 10 august 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the competition on 10 august 2011?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "venue"='stade général seyni kountché , niamey'; |
## Task
Generate a SQL query to answer the following question:
`what is the date when the venue is stade général seyni kountché , niamey?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date when the venue is stade général seyni kountché , niamey?`:
```sql
|
SELECT "place" FROM "top_all_time_athletes_50_metres_men" WHERE "athlete"='manfred kokot'; |
## Task
Generate a SQL query to answer the following question:
`What place has manfred kokot as the athlete?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_all_time_athletes_50_metres_men" (
"rank" real,
"time" text,
"athlete" text,
"date" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What place has manfred kokot as the athlete?`:
```sql
|
SELECT "athlete" FROM "top_all_time_athletes_50_metres_men" WHERE "place"='reno'; |
## Task
Generate a SQL query to answer the following question:
`What athlete has reno as the place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_all_time_athletes_50_metres_men" (
"rank" real,
"time" text,
"athlete" text,
"date" text,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What athlete has reno as the place?`:
```sql
|
SELECT "campus" FROM "campuses" WHERE "year_opened"='1970'; |
## Task
Generate a SQL query to answer the following question:
`What campus opened in 1970?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campuses" (
"campus" text,
"year_opened" text,
"students" text,
"size" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What campus opened in 1970?`:
```sql
|
SELECT "year_opened" FROM "campuses" WHERE "students"='na' AND "size"='10 acres'; |
## Task
Generate a SQL query to answer the following question:
`What year was the school opened that has a size of 10 acres and students of na?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campuses" (
"campus" text,
"year_opened" text,
"students" text,
"size" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the school opened that has a size of 10 acres and students of na?`:
```sql
|
SELECT "location" FROM "campuses" WHERE "size"='245 acres'; |
## Task
Generate a SQL query to answer the following question:
`What location was the campus that has a size of 245 acres?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campuses" (
"campus" text,
"year_opened" text,
"students" text,
"size" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location was the campus that has a size of 245 acres?`:
```sql
|
SELECT "campus" FROM "campuses" WHERE "year_opened"='1977'; |
## Task
Generate a SQL query to answer the following question:
`What campus was opened in 1977?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campuses" (
"campus" text,
"year_opened" text,
"students" text,
"size" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What campus was opened in 1977?`:
```sql
|
SELECT "location" FROM "campuses" WHERE "students"='na' AND "year_opened"='2005'; |
## Task
Generate a SQL query to answer the following question:
`What location was the campus opened in 2005 with students listed as na?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campuses" (
"campus" text,
"year_opened" text,
"students" text,
"size" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location was the campus opened in 2005 with students listed as na?`:
```sql
|
SELECT "type" FROM "largest_generating_stations" WHERE "rank"<70 AND "province"='british columbia' AND "capacity_mw">'2,480'; |
## Task
Generate a SQL query to answer the following question:
`what is the type when the rank is smaller than 70, the province is british columbia and the capacity (mw) is more than 2,480?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_generating_stations" (
"rank" real,
"name" text,
"capacity_mw" real,
"province" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the type when the rank is smaller than 70, the province is british columbia and the capacity (mw) is more than 2,480?`:
```sql
|
SELECT MIN("capacity_mw") FROM "largest_generating_stations" WHERE "rank"<46 AND "province"='newfoundland and labrador'; |
## Task
Generate a SQL query to answer the following question:
`what is the least capacity (mw) when the rank is less than 46 and the province is newfoundland and labrador?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_generating_stations" (
"rank" real,
"name" text,
"capacity_mw" real,
"province" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the least capacity (mw) when the rank is less than 46 and the province is newfoundland and labrador?`:
```sql
|
SELECT MIN("rank") FROM "largest_generating_stations" WHERE "type"='hydro' AND "name"='grand rapids generating station' AND "capacity_mw">479; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest rank when the type is hydro, the name is grand rapids generating station and the capacity (mw) is more than 479?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_generating_stations" (
"rank" real,
"name" text,
"capacity_mw" real,
"province" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the lowest rank when the type is hydro, the name is grand rapids generating station and the capacity (mw) is more than 479?`:
```sql
|
SELECT "province" FROM "largest_generating_stations" WHERE "rank">24 AND "name"='laforge-2'; |
## Task
Generate a SQL query to answer the following question:
`what is the province when the rank is higher than 24 and the name is laforge-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_generating_stations" (
"rank" real,
"name" text,
"capacity_mw" real,
"province" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the province when the rank is higher than 24 and the name is laforge-2?`:
```sql
|
SELECT "name" FROM "largest_generating_stations" WHERE "type"='hydro' AND "capacity_mw"<478 AND "rank">85 AND "province"='quebec'; |
## Task
Generate a SQL query to answer the following question:
`what is the name when the type is hydro, the capacity (mw) is less than 478, the rank is more than 85 and the province is quebec?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_generating_stations" (
"rank" real,
"name" text,
"capacity_mw" real,
"province" text,
"type" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name when the type is hydro, the capacity (mw) is less than 478, the rank is more than 85 and the province is quebec?`:
```sql
|
SELECT COUNT("year") FROM "complete_24_hours_of_le_mans_results" WHERE "team"='toyota team tom''s' AND "laps">64; |
## Task
Generate a SQL query to answer the following question:
`How many years have toyota team tom's as the team, with Laps greater than 64?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "complete_24_hours_of_le_mans_results" (
"year" real,
"class" text,
"tyres" text,
"team" text,
"co_drivers" text,
"laps" real,
"pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years have toyota team tom's as the team, with Laps greater than 64?`:
```sql
|
SELECT "round" FROM "anglo_italian_cup" WHERE "date"='11/11/1992'; |
## Task
Generate a SQL query to answer the following question:
`What round was on 11/11/1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anglo_italian_cup" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What round was on 11/11/1992?`:
```sql
|
SELECT SUM("against") FROM "anglo_italian_cup" WHERE "date"='08/12/1992'; |
## Task
Generate a SQL query to answer the following question:
`What is the total against on 08/12/1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anglo_italian_cup" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total against on 08/12/1992?`:
```sql
|
SELECT "venue" FROM "anglo_italian_cup" WHERE "date"='24/11/1992'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue of 24/11/1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anglo_italian_cup" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue of 24/11/1992?`:
```sql
|
SELECT "round" FROM "anglo_italian_cup" WHERE "against"<1; |
## Task
Generate a SQL query to answer the following question:
`What round has less than 1 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "anglo_italian_cup" (
"opposing_team" text,
"against" real,
"date" text,
"venue" text,
"round" text
);
### SQL
Given the database schema, here is the SQL query that answers `What round has less than 1 against?`:
```sql
|
SELECT COUNT("gold") FROM "medal_table" WHERE "nation"='germany (ger)' AND "rank"<15; |
## Task
Generate a SQL query to answer the following question:
`How many gold medals for germany (GER) having a rank less than 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many gold medals for germany (GER) having a rank less than 15?`:
```sql
|
SELECT MAX("silver") FROM "medal_table" WHERE "rank">5 AND "bronze">2; |
## Task
Generate a SQL query to answer the following question:
`How many silver medals when the bronze is more than 2 and having a rank more than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many silver medals when the bronze is more than 2 and having a rank more than 5?`:
```sql
|
SELECT AVG("silver") FROM "medal_table" WHERE "bronze"<0; |
## Task
Generate a SQL query to answer the following question:
`What's the average number of silver medals when bronze is less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average number of silver medals when bronze is less than 0?`:
```sql
|
SELECT AVG("silver") FROM "medal_table" WHERE "nation"='germany (ger)' AND "bronze">3; |
## Task
Generate a SQL query to answer the following question:
`What's the average number of silver medals for germany (GER) having more than 3 bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average number of silver medals for germany (GER) having more than 3 bronze?`:
```sql
|
SELECT "notes" FROM "semifinal_a_b_1" WHERE "time"='6:31.16'; |
## Task
Generate a SQL query to answer the following question:
`What are the notes for 6:31.16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the notes for 6:31.16?`:
```sql
|
SELECT "rowers" FROM "semifinal_a_b_1" WHERE "time"='6:29.56'; |
## Task
Generate a SQL query to answer the following question:
`What rowers have a 6:29.56 time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rowers have a 6:29.56 time?`:
```sql
|
SELECT "time" FROM "semifinal_a_b_1" WHERE "notes"='fb' AND "country"='canada'; |
## Task
Generate a SQL query to answer the following question:
`What is the time with FB notes for Canada?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time with FB notes for Canada?`:
```sql
|
SELECT "country" FROM "semifinal_a_b_1" WHERE "time"='6:49.28'; |
## Task
Generate a SQL query to answer the following question:
`What country has a time of 6:49.28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a time of 6:49.28?`:
```sql
|
SELECT AVG("tries_for") FROM "pool_3" WHERE "points_against">87 AND "tries_against"<28 AND "points_diff"='+63'; |
## Task
Generate a SQL query to answer the following question:
`Which Tries for has Points against larger than 87, and Tries against smaller than 28, and Points diff of +63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_3" (
"team" text,
"tries_for" real,
"tries_against" real,
"try_diff" text,
"points_for" real,
"points_against" real,
"points_diff" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Tries for has Points against larger than 87, and Tries against smaller than 28, and Points diff of +63?`:
```sql
|
SELECT MIN("points_for") FROM "pool_3" WHERE "points_against"<93 AND "tries_for">25; |
## Task
Generate a SQL query to answer the following question:
`Which Points for has Points against smaller than 93, and Tries for larger than 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_3" (
"team" text,
"tries_for" real,
"tries_against" real,
"try_diff" text,
"points_for" real,
"points_against" real,
"points_diff" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Points for has Points against smaller than 93, and Tries for larger than 25?`:
```sql
|
SELECT MAX("tries_for") FROM "pool_3" WHERE "points_against"<124 AND "points_for"<241 AND "tries_against"<11; |
## Task
Generate a SQL query to answer the following question:
`Which Tries for has Points against smaller than 124, and Points for smaller than 241, and Tries against smaller than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_3" (
"team" text,
"tries_for" real,
"tries_against" real,
"try_diff" text,
"points_for" real,
"points_against" real,
"points_diff" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Tries for has Points against smaller than 124, and Points for smaller than 241, and Tries against smaller than 11?`:
```sql
|
SELECT COUNT("tries_against") FROM "pool_3" WHERE "team"='dinamo bucureşti' AND "tries_for"<19; |
## Task
Generate a SQL query to answer the following question:
`How many Tries against have a Team of dinamo bucureşti, and Tries for smaller than 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_3" (
"team" text,
"tries_for" real,
"tries_against" real,
"try_diff" text,
"points_for" real,
"points_against" real,
"points_diff" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Tries against have a Team of dinamo bucureşti, and Tries for smaller than 19?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "attendance"='48,667'; |
## Task
Generate a SQL query to answer the following question:
`What week had attendance of 48,667?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What week had attendance of 48,667?`:
```sql
|
SELECT "song" FROM "results_of_heat_1" WHERE "draw"<4 AND "percentage"='32.22%'; |
## Task
Generate a SQL query to answer the following question:
`What Song has a Draw of less than 4 with a Percentage of 32.22%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_heat_1" (
"draw" real,
"artist" text,
"song" text,
"percentage" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Song has a Draw of less than 4 with a Percentage of 32.22%?`:
```sql
|
SELECT "artist" FROM "results_of_heat_1" WHERE "place"<3 AND "percentage"='38.60%'; |
## Task
Generate a SQL query to answer the following question:
`What Artist has a Place of 3 or less with a Percentage of 38.60%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_heat_1" (
"draw" real,
"artist" text,
"song" text,
"percentage" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Artist has a Place of 3 or less with a Percentage of 38.60%?`:
```sql
|
SELECT AVG("place") FROM "results_of_heat_1" WHERE "artist"='monika kirovska' AND "draw"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the Place of Draw 1 by Artist Monika Kirovska?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_heat_1" (
"draw" real,
"artist" text,
"song" text,
"percentage" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Place of Draw 1 by Artist Monika Kirovska?`:
```sql
|
SELECT MAX("byes") FROM "2009_ladder" WHERE "wins">11 AND "against">1118 AND "hampden_fl"='terang-mortlake'; |
## Task
Generate a SQL query to answer the following question:
`What were the most byes of Terang-Mortlake when they had more than 11 wins and more than 1118 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_ladder" (
"hampden_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the most byes of Terang-Mortlake when they had more than 11 wins and more than 1118 against?`:
```sql
|
SELECT AVG("wins") FROM "2009_ladder" WHERE "hampden_fl"='south warrambool'; |
## Task
Generate a SQL query to answer the following question:
`How many wins did South Warrambool have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_ladder" (
"hampden_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins did South Warrambool have?`:
```sql
|
SELECT AVG("byes") FROM "2009_ladder" WHERE "wins">16; |
## Task
Generate a SQL query to answer the following question:
`How many byes when there are more than 16 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_ladder" (
"hampden_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many byes when there are more than 16 wins?`:
```sql
|
SELECT MIN("byes") FROM "2009_ladder" WHERE "against"=1946 AND "wins">2; |
## Task
Generate a SQL query to answer the following question:
`What is the least amount of Byes when there are more than 2 wins and 1946 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_ladder" (
"hampden_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of Byes when there are more than 2 wins and 1946 against?`:
```sql
|
SELECT AVG("wins") FROM "2009_ladder" WHERE "draws"<1 AND "losses">4; |
## Task
Generate a SQL query to answer the following question:
`How many wins when the draws are less than 1 and more than 4 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_ladder" (
"hampden_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins when the draws are less than 1 and more than 4 losses?`:
```sql
|
SELECT MIN("pop_2010") FROM "s" WHERE "geo_id"=3805373380 AND "water_sqmi"<5.729; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest population of the GEO ID 3805373380 and the water square mileage smaller than 5.729?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest population of the GEO ID 3805373380 and the water square mileage smaller than 5.729?`:
```sql
|
SELECT MIN("geo_id") FROM "s" WHERE "longitude"=-102.158045 AND "water_sqmi">0.979; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest GEO ID for the longitude of -102.158045 and the water in square miles larger than 0.979?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest GEO ID for the longitude of -102.158045 and the water in square miles larger than 0.979?`:
```sql
|
SELECT AVG("ansi_code") FROM "s" WHERE "township"='sherman' AND "water_sqmi"<0.005; |
## Task
Generate a SQL query to answer the following question:
`What is the average ANSI code for the town of Sherman and the smaller of the water area in square miles than 0.005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average ANSI code for the town of Sherman and the smaller of the water area in square miles than 0.005?`:
```sql
|
SELECT AVG("longitude") FROM "s" WHERE "water_sqmi"=0.093 AND "geo_id">3808174460; |
## Task
Generate a SQL query to answer the following question:
`What is the average longitude for the water area of 0.093 and has a GEO ID tag larger than 3808174460?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average longitude for the water area of 0.093 and has a GEO ID tag larger than 3808174460?`:
```sql
|
SELECT "country" FROM "references" WHERE "author"='based on sophocles and euripides'; |
## Task
Generate a SQL query to answer the following question:
`Which Country's Author is based on Sophocles and Euripides?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Country's Author is based on Sophocles and Euripides?`:
```sql
|
SELECT "author" FROM "references" WHERE "company"='ruth kanner theatre group'; |
## Task
Generate a SQL query to answer the following question:
`Which Author's Company is Ruth Kanner Theatre Group?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Author's Company is Ruth Kanner Theatre Group?`:
```sql
|
SELECT "play" FROM "references" WHERE "country"='cyprus' AND "company"='magdalena zira theatre'; |
## Task
Generate a SQL query to answer the following question:
`Which Play is from Cyprus, from the Company Magdalena Zira Theatre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Play is from Cyprus, from the Company Magdalena Zira Theatre?`:
```sql
|
SELECT "country" FROM "references" WHERE "play"='electra and orestes, the trial'; |
## Task
Generate a SQL query to answer the following question:
`Which Country is the Play Electra and Orestes, The Trial from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"play" text,
"author" text,
"company" text,
"base" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Country is the Play Electra and Orestes, The Trial from?`:
```sql
|
SELECT COUNT("time") FROM "semifinal_3" WHERE "lane"=4; |
## Task
Generate a SQL query to answer the following question:
`How much total time was in lane 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_3" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much total time was in lane 4?`:
```sql
|
SELECT MAX("rank") FROM "semifinal_3" WHERE "react">0.20400000000000001 AND "time">45.56; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Reaction time larger than 0.20400000000000001, and a Time larger than 45.56?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_3" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Reaction time larger than 0.20400000000000001, and a Time larger than 45.56?`:
```sql
|
SELECT SUM("rank") FROM "semifinal_3" WHERE "lane">7 AND "athlete"='michael mathieu' AND "react">0.203; |
## Task
Generate a SQL query to answer the following question:
`How many ranks have more than 7 lanes, and an Athlete of michael mathieu, and a Reaction time larger than 0.203?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_3" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many ranks have more than 7 lanes, and an Athlete of michael mathieu, and a Reaction time larger than 0.203?`:
```sql
|
SELECT SUM("time") FROM "semifinal_3" WHERE "react"<0.20400000000000001 AND "rank"=1; |
## Task
Generate a SQL query to answer the following question:
`Which Time has a Reaction smaller than 0.20400000000000001, and a Rank of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_3" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Time has a Reaction smaller than 0.20400000000000001, and a Rank of 1?`:
```sql
|
SELECT AVG("top_25") FROM "summary" WHERE "events"<12 AND "top_5">0; |
## Task
Generate a SQL query to answer the following question:
`What's the average Top-25, that has an Events that's smaller than 12, and has a Top-5 that is larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average Top-25, that has an Events that's smaller than 12, and has a Top-5 that is larger than 0?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.