output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT AVG("attendance") FROM "schedule" WHERE "date"='september 21, 1980'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the September 21, 1980 game?`
### 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 `How many people attended the September 21, 1980 game?`:
```sql
|
SELECT MAX("doubles") FROM "feast_days" WHERE "total">176 AND "date"<1907 AND "doubles_i_class"<21; |
## Task
Generate a SQL query to answer the following question:
`Which Doubles have a Total larger than 176, and a Date smaller than 1907, and Doubles, I Class smaller than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "feast_days" (
"date" real,
"doubles_i_class" real,
"doubles_ii_class" real,
"greater_doubles" real,
"doubles" real,
"semidoubles" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Doubles have a Total larger than 176, and a Date smaller than 1907, and Doubles, I Class smaller than 21?`:
```sql
|
SELECT MAX("total") FROM "feast_days" WHERE "date"=1602 AND "greater_doubles"<16; |
## Task
Generate a SQL query to answer the following question:
`Which Total has a Date of 1602, and Greater Doubles smaller than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "feast_days" (
"date" real,
"doubles_i_class" real,
"doubles_ii_class" real,
"greater_doubles" real,
"doubles" real,
"semidoubles" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total has a Date of 1602, and Greater Doubles smaller than 16?`:
```sql
|
SELECT COUNT("total") FROM "feast_days" WHERE "semidoubles"<78 AND "doubles_ii_class"<17; |
## Task
Generate a SQL query to answer the following question:
`How much Total has Semidoubles smaller than 78, and Doubles, II Class smaller than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "feast_days" (
"date" real,
"doubles_i_class" real,
"doubles_ii_class" real,
"greater_doubles" real,
"doubles" real,
"semidoubles" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Total has Semidoubles smaller than 78, and Doubles, II Class smaller than 17?`:
```sql
|
SELECT AVG("greater_doubles") FROM "feast_days" WHERE "doubles_ii_class"<17; |
## Task
Generate a SQL query to answer the following question:
`Which Greater Doubles have Doubles, II Class smaller than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "feast_days" (
"date" real,
"doubles_i_class" real,
"doubles_ii_class" real,
"greater_doubles" real,
"doubles" real,
"semidoubles" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Greater Doubles have Doubles, II Class smaller than 17?`:
```sql
|
SELECT COUNT("total") FROM "feast_days" WHERE "doubles"=45 AND "doubles_ii_class">18; |
## Task
Generate a SQL query to answer the following question:
`How much Total has Doubles of 45, and Doubles, II Class larger than 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "feast_days" (
"date" real,
"doubles_i_class" real,
"doubles_ii_class" real,
"greater_doubles" real,
"doubles" real,
"semidoubles" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Total has Doubles of 45, and Doubles, II Class larger than 18?`:
```sql
|
SELECT MAX("rank") FROM "semifinal_1" WHERE "2nd_run"='1:17.170 (8)'; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a 2nd run of 1:17.170 (8)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"name" text,
"1st_run" text,
"2nd_run" text,
"3rd_run" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a 2nd run of 1:17.170 (8)?`:
```sql
|
SELECT MAX("rank") FROM "semifinal_1" WHERE "total"<10 AND "3rd_run"='36.457 (2)'; |
## Task
Generate a SQL query to answer the following question:
`Which Rank has a Total smaller than 10, and a 3rd run of 36.457 (2)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"name" text,
"1st_run" text,
"2nd_run" text,
"3rd_run" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Rank has a Total smaller than 10, and a 3rd run of 36.457 (2)?`:
```sql
|
SELECT "name" FROM "semifinal_1" WHERE "3rd_run"='36.200 (1)'; |
## Task
Generate a SQL query to answer the following question:
`Which Name has a 3rd run of 36.200 (1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"name" text,
"1st_run" text,
"2nd_run" text,
"3rd_run" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Name has a 3rd run of 36.200 (1)?`:
```sql
|
SELECT COUNT("size_steps") FROM "size_of_intervals_in_15_equal_temperamen" WHERE "just_ratio"='10:9' AND "size_cents">160; |
## Task
Generate a SQL query to answer the following question:
`What is the value of the size (steps) that has just ratio 10:9 and a size (cents) more than 160`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "size_of_intervals_in_15_equal_temperamen" (
"interval_name" text,
"size_steps" real,
"size_cents" real,
"just_ratio" text,
"just_cents" real,
"error" text,
"audio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the value of the size (steps) that has just ratio 10:9 and a size (cents) more than 160`:
```sql
|
SELECT "audio" FROM "size_of_intervals_in_15_equal_temperamen" WHERE "just_ratio"='21:20'; |
## Task
Generate a SQL query to answer the following question:
`what is the value of the audio with a just ratio 21:20`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "size_of_intervals_in_15_equal_temperamen" (
"interval_name" text,
"size_steps" real,
"size_cents" real,
"just_ratio" text,
"just_cents" real,
"error" text,
"audio" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the value of the audio with a just ratio 21:20`:
```sql
|
SELECT "error" FROM "size_of_intervals_in_15_equal_temperamen" WHERE "size_steps">5 AND "just_cents"=536.95; |
## Task
Generate a SQL query to answer the following question:
`What is the error that has a size (steps) more than 5 and a just (cents) value 536.95`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "size_of_intervals_in_15_equal_temperamen" (
"interval_name" text,
"size_steps" real,
"size_cents" real,
"just_ratio" text,
"just_cents" real,
"error" text,
"audio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the error that has a size (steps) more than 5 and a just (cents) value 536.95`:
```sql
|
SELECT AVG("size_cents") FROM "size_of_intervals_in_15_equal_temperamen" WHERE "interval_name"='major third' AND "size_steps">5; |
## Task
Generate a SQL query to answer the following question:
`What is the average size (cents) with an interval of major third and size (steps) more than 5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "size_of_intervals_in_15_equal_temperamen" (
"interval_name" text,
"size_steps" real,
"size_cents" real,
"just_ratio" text,
"just_cents" real,
"error" text,
"audio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average size (cents) with an interval of major third and size (steps) more than 5`:
```sql
|
SELECT AVG("points") FROM "semi_final_1_31_january_2009" WHERE "place">7 AND "draw"=4; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of points for places over 7 and having a draw order of 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_1_31_january_2009" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of points for places over 7 and having a draw order of 4?`:
```sql
|
SELECT SUM("place") FROM "semi_final_1_31_january_2009" WHERE "song"='\"tavo spalvos\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of placings for the song "Tavo Spalvos"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semi_final_1_31_january_2009" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of placings for the song "Tavo Spalvos"?`:
```sql
|
SELECT COUNT("league_goals") FROM "appearances_and_goals" WHERE "fa_cup_goals"=0 AND "league_apps"='10'; |
## Task
Generate a SQL query to answer the following question:
`How many league goals did the player with 10 league apps and 0 FA cup goals have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many league goals did the player with 10 league apps and 0 FA cup goals have?`:
```sql
|
SELECT SUM("league_goals") FROM "appearances_and_goals" WHERE "total_goals"=8 AND "league_cup_goals">0; |
## Task
Generate a SQL query to answer the following question:
`What was the sum of league goals where the toal was 8 and league cup goals were larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the sum of league goals where the toal was 8 and league cup goals were larger than 0?`:
```sql
|
SELECT "average_ratings" FROM "2006_summer_season" WHERE "episodes"=11 AND "japanese_title"='サプリ'; |
## Task
Generate a SQL query to answer the following question:
`For the Japanese title サプリ that had 11 episodes, what is the average ratings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the Japanese title サプリ that had 11 episodes, what is the average ratings?`:
```sql
|
SELECT AVG("episodes") FROM "2006_summer_season" WHERE "average_ratings"='10.3%'; |
## Task
Generate a SQL query to answer the following question:
`When the average ratings is 10.3%, what is the average episodes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the average ratings is 10.3%, what is the average episodes?`:
```sql
|
SELECT MIN("episodes") FROM "2006_summer_season" WHERE "romaji_title"='regatta~kimi to ita eien~'; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest episodes with the Romaji title Regatta~Kimi to Ita Eien~?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest episodes with the Romaji title Regatta~Kimi to Ita Eien~?`:
```sql
|
SELECT "japanese_title" FROM "2006_summer_season" WHERE "romaji_title"='hanayome wa yakudoshi!'; |
## Task
Generate a SQL query to answer the following question:
`With the Romaji title of Hanayome Wa Yakudoshi!, what is the Japanese title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `With the Romaji title of Hanayome Wa Yakudoshi!, what is the Japanese title?`:
```sql
|
SELECT "japanese_title" FROM "2006_summer_season" WHERE "episodes"<11 AND "romaji_title"='regatta~kimi to ita eien~'; |
## Task
Generate a SQL query to answer the following question:
`For what Japanese title is there less than 11 episodes and the Romaji title is Regatta~Kimi to Ita Eien~?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `For what Japanese title is there less than 11 episodes and the Romaji title is Regatta~Kimi to Ita Eien~?`:
```sql
|
SELECT MAX("episodes") FROM "2006_fall_season" WHERE "average_ratings"='18.8%'; |
## Task
Generate a SQL query to answer the following question:
`what is the most episodes when the average ratings is 18.8%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_fall_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the most episodes when the average ratings is 18.8%?`:
```sql
|
SELECT "episodes" FROM "2006_fall_season" WHERE "tv_station"='ntv' AND "japanese_title"='たったひとつの恋'; |
## Task
Generate a SQL query to answer the following question:
`How many episodes when the tv station is ntv and the japanese title is たったひとつの恋?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_fall_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes when the tv station is ntv and the japanese title is たったひとつの恋?`:
```sql
|
SELECT "tv_station" FROM "2006_fall_season" WHERE "romaji_title"='kazoku~tsuma no fuzai・otto no sonzai~'; |
## Task
Generate a SQL query to answer the following question:
`what is the tv station when the romaji title is kazoku~tsuma no fuzai・otto no sonzai~?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_fall_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tv station when the romaji title is kazoku~tsuma no fuzai・otto no sonzai~?`:
```sql
|
SELECT "tv_station" FROM "2006_fall_season" WHERE "average_ratings"='19.5%'; |
## Task
Generate a SQL query to answer the following question:
`what is the tv station when the average ratings is 19.5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_fall_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tv station when the average ratings is 19.5%?`:
```sql
|
SELECT AVG("year_joined") FROM "membership" WHERE "year_left"<2003; |
## Task
Generate a SQL query to answer the following question:
`Of all the schools that left before 2003, what is the average year joined?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"county" text,
"year_joined" real,
"previous_conference" text,
"year_left" real,
"conference_joined" text
);
### SQL
Given the database schema, here is the SQL query that answers `Of all the schools that left before 2003, what is the average year joined?`:
```sql
|
SELECT COUNT("year_joined") FROM "membership" WHERE "mascot"='ingots' AND "year_left">2007; |
## Task
Generate a SQL query to answer the following question:
`What year did the Ingots, who left after 2007, join?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "membership" (
"school" text,
"location" text,
"mascot" text,
"county" text,
"year_joined" real,
"previous_conference" text,
"year_left" real,
"conference_joined" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did the Ingots, who left after 2007, join?`:
```sql
|
SELECT "original_release" FROM "track_listing" WHERE "writer_s"='dallas frazier'; |
## Task
Generate a SQL query to answer the following question:
`What is the original Release date of the Track written by Dallas Frazier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"track" text,
"song_title" text,
"writer_s" text,
"original_artist" text,
"original_release" real,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original Release date of the Track written by Dallas Frazier?`:
```sql
|
SELECT "original_artist" FROM "track_listing" WHERE "length"='2:38'; |
## Task
Generate a SQL query to answer the following question:
`What is the Original Artis of the Track with a Length of 2:38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"track" text,
"song_title" text,
"writer_s" text,
"original_artist" text,
"original_release" real,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Original Artis of the Track with a Length of 2:38?`:
```sql
|
SELECT "song_title" FROM "track_listing" WHERE "length"='2:50'; |
## Task
Generate a SQL query to answer the following question:
`What Song has a Length of 2:50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "track_listing" (
"track" text,
"song_title" text,
"writer_s" text,
"original_artist" text,
"original_release" real,
"length" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Song has a Length of 2:50?`:
```sql
|
SELECT "title" FROM "television_series" WHERE "year"<2011 AND "network"='kbs2' AND "genre"='drama'; |
## Task
Generate a SQL query to answer the following question:
`What's the title when the genre is drama and network of KBS2 happening before 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "television_series" (
"year" real,
"title" text,
"hangul_japanese" text,
"role" text,
"network" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the title when the genre is drama and network of KBS2 happening before 2011?`:
```sql
|
SELECT "title" FROM "television_series" WHERE "genre"='drama' AND "network"='kbs2' AND "year"=2011; |
## Task
Generate a SQL query to answer the following question:
`What's the title when the genre is drama with a network of KBS2 happening in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "television_series" (
"year" real,
"title" text,
"hangul_japanese" text,
"role" text,
"network" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the title when the genre is drama with a network of KBS2 happening in 2011?`:
```sql
|
SELECT "network" FROM "television_series" WHERE "year"=2011; |
## Task
Generate a SQL query to answer the following question:
`What's the network in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "television_series" (
"year" real,
"title" text,
"hangul_japanese" text,
"role" text,
"network" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the network in 2011?`:
```sql
|
SELECT "hangul_japanese" FROM "television_series" WHERE "year"<2014 AND "role"='baek seung-jo'; |
## Task
Generate a SQL query to answer the following question:
`What's the Hangul/Japanese that happened before 2014 having a role of Baek Seung-Jo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "television_series" (
"year" real,
"title" text,
"hangul_japanese" text,
"role" text,
"network" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Hangul/Japanese that happened before 2014 having a role of Baek Seung-Jo?`:
```sql
|
SELECT "hangul_japanese" FROM "television_series" WHERE "genre"='drama' AND "title"='boys over flowers'; |
## Task
Generate a SQL query to answer the following question:
`What's the Hangul/Japanese of Boys Over Flowers that's drama?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "television_series" (
"year" real,
"title" text,
"hangul_japanese" text,
"role" text,
"network" text,
"genre" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Hangul/Japanese of Boys Over Flowers that's drama?`:
```sql
|
SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "location"='monon'; |
## Task
Generate a SQL query to answer the following question:
`What is the IHSAA class in monon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the IHSAA class in monon?`:
```sql
|
SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "enrollment"=395; |
## Task
Generate a SQL query to answer the following question:
`What is the IHSAA class with 395 in enrollment?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the IHSAA class with 395 in enrollment?`:
```sql
|
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='rebels'; |
## Task
Generate a SQL query to answer the following question:
`What school has rebels as their mascot?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school has rebels as their mascot?`:
```sql
|
SELECT COUNT("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aa'; |
## Task
Generate a SQL query to answer the following question:
`What is the total enrollment of the aa IHSAA class?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total enrollment of the aa IHSAA class?`:
```sql
|
SELECT MIN("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "school"='pioneer'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest enrollment at the pioneer school?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest enrollment at the pioneer school?`:
```sql
|
SELECT AVG("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='a' AND "location"='wolcott'; |
## Task
Generate a SQL query to answer the following question:
`What is the average enrollment of the IHSAA A class in wolcott?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average enrollment of the IHSAA A class in wolcott?`:
```sql
|
SELECT MAX("shirt_no") FROM "team_roster_season_2011_2012" WHERE "height"<190 AND "player"='henry bell cisnero'; |
## Task
Generate a SQL query to answer the following question:
`What is the Shirt No for Henry Bell Cisnero whose height is less than 190?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team_roster_season_2011_2012" (
"shirt_no" real,
"nationality" text,
"player" text,
"birth_date" text,
"height" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Shirt No for Henry Bell Cisnero whose height is less than 190?`:
```sql
|
SELECT SUM("shirt_no") FROM "team_roster_season_2011_2012" WHERE "height"=188; |
## Task
Generate a SQL query to answer the following question:
`What is the Shirt No for the person whose height is 188?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team_roster_season_2011_2012" (
"shirt_no" real,
"nationality" text,
"player" text,
"birth_date" text,
"height" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Shirt No for the person whose height is 188?`:
```sql
|
SELECT MAX("height") FROM "team_roster_season_2011_2012" WHERE "position"='libero'; |
## Task
Generate a SQL query to answer the following question:
`What is the height of the person whose position is Libero?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "team_roster_season_2011_2012" (
"shirt_no" real,
"nationality" text,
"player" text,
"birth_date" text,
"height" real,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height of the person whose position is Libero?`:
```sql
|
SELECT SUM("total") FROM "final" WHERE "free"=47.667 AND "technical"<47.417; |
## Task
Generate a SQL query to answer the following question:
`What is the total for the person with free of 47.667, and technical less than 47.417?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"country" text,
"athlete" text,
"technical" real,
"free" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total for the person with free of 47.667, and technical less than 47.417?`:
```sql
|
SELECT MAX("technical") FROM "final" WHERE "athlete"='jiang tingting & jiang wenwen' AND "total">96.334; |
## Task
Generate a SQL query to answer the following question:
`What is the technical number for Jiang Tingting & Jiang Wenwen, and the total was more than 96.334?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"country" text,
"athlete" text,
"technical" real,
"free" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the technical number for Jiang Tingting & Jiang Wenwen, and the total was more than 96.334?`:
```sql
|
SELECT MIN("free") FROM "final" WHERE "athlete"='apolline dreyfuss & lila meesseman-bakir' AND "total">90.333; |
## Task
Generate a SQL query to answer the following question:
`What is the free of Apolline Dreyfuss & Lila Meesseman-Bakir, when the total was larger than 90.333?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"country" text,
"athlete" text,
"technical" real,
"free" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the free of Apolline Dreyfuss & Lila Meesseman-Bakir, when the total was larger than 90.333?`:
```sql
|
SELECT AVG("drawn") FROM "first_round" WHERE "played">14; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of games drawn among teams that played over 14 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of games drawn among teams that played over 14 games?`:
```sql
|
SELECT COUNT("points") FROM "first_round" WHERE "played">14; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of points combined from the teams that played over 14 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of points combined from the teams that played over 14 games?`:
```sql
|
SELECT SUM("points") FROM "first_round" WHERE "lost">3 AND "name"='esc riverrats geretsried'; |
## Task
Generate a SQL query to answer the following question:
`How many points did the ESC Riverrats Geretsried, who lost more than 3 games, score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did the ESC Riverrats Geretsried, who lost more than 3 games, score?`:
```sql
|
SELECT AVG("drawn") FROM "first_round" WHERE "lost">13; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of games drawn among the teams that lost over 13 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of games drawn among the teams that lost over 13 games?`:
```sql
|
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "manner_of_departure"='sacked' AND "team"='nejapa'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of vacancy when the manner of departure is sacked and the team is nejapa?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of vacancy when the manner of departure is sacked and the team is nejapa?`:
```sql
|
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "date_of_appointment"='1 january 2009'; |
## Task
Generate a SQL query to answer the following question:
`what is the date of vacancy when the date of appointment is 1 january 2009?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date of vacancy when the date of appointment is 1 january 2009?`:
```sql
|
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "position_in_table"='10th' AND "team"='balboa'; |
## Task
Generate a SQL query to answer the following question:
`what is the date of vacancy when the position in table is 10th and the team is balboa?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date of vacancy when the position in table is 10th and the team is balboa?`:
```sql
|
SELECT "replaced_by" FROM "managerial_changes" WHERE "position_in_table"='5th'; |
## Task
Generate a SQL query to answer the following question:
`Who replaced when the position in table is 5th?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who replaced when the position in table is 5th?`:
```sql
|
SELECT "outgoing_manager" FROM "managerial_changes" WHERE "replaced_by"='pablo centrone'; |
## Task
Generate a SQL query to answer the following question:
`Who is the outgoing manager when they were replaced by pablo centrone?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the outgoing manager when they were replaced by pablo centrone?`:
```sql
|
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "team"='firpo' AND "replaced_by"='oscar benitez'; |
## Task
Generate a SQL query to answer the following question:
`what is the date of vacancy when the team is firpo and replaced by is oscar benitez?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date of vacancy when the team is firpo and replaced by is oscar benitez?`:
```sql
|
SELECT "country" FROM "heat_2" WHERE "notes"='qs' AND "rank"=8; |
## Task
Generate a SQL query to answer the following question:
`Which country was ranked 8 and noted as qs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"athletes" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which country was ranked 8 and noted as qs?`:
```sql
|
SELECT "notes" FROM "heat_2" WHERE "rank"=1; |
## Task
Generate a SQL query to answer the following question:
`What are the notes for the contestants that were ranked #1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"athletes" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the notes for the contestants that were ranked #1?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "date"='12/21/1973'; |
## Task
Generate a SQL query to answer the following question:
`Who did the Hawks play on 12/21/1973?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Hawks play on 12/21/1973?`:
```sql
|
SELECT "rank" FROM "qualifying_round" WHERE "name"='tricia flores'; |
## Task
Generate a SQL query to answer the following question:
`What rank does Tricia Flores have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_round" (
"rank" text,
"group" text,
"name" text,
"nationality" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank does Tricia Flores have?`:
```sql
|
SELECT "name" FROM "qualifying_round" WHERE "group"='b' AND "mark"='6.33'; |
## Task
Generate a SQL query to answer the following question:
`Who is in group B and has a mark of 6.33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_round" (
"rank" text,
"group" text,
"name" text,
"nationality" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is in group B and has a mark of 6.33?`:
```sql
|
SELECT "mark" FROM "qualifying_round" WHERE "group"='a' AND "nationality"='grenada'; |
## Task
Generate a SQL query to answer the following question:
`What is the mark for Grenada in group A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_round" (
"rank" text,
"group" text,
"name" text,
"nationality" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mark for Grenada in group A?`:
```sql
|
SELECT "name" FROM "qualifying_round" WHERE "group"='b' AND "mark"='6.17'; |
## Task
Generate a SQL query to answer the following question:
`Who has a mark of 6.17 in group B?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_round" (
"rank" text,
"group" text,
"name" text,
"nationality" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who has a mark of 6.17 in group B?`:
```sql
|
SELECT "rank" FROM "qualifying_round" WHERE "name"='tatyana lebedeva'; |
## Task
Generate a SQL query to answer the following question:
`What rank does Tatyana Lebedeva have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_round" (
"rank" text,
"group" text,
"name" text,
"nationality" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank does Tatyana Lebedeva have?`:
```sql
|
SELECT "rank" FROM "qualifying_round" WHERE "mark"='nm' AND "nationality"='india'; |
## Task
Generate a SQL query to answer the following question:
`What rank has a mark of NM and is from India?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying_round" (
"rank" text,
"group" text,
"name" text,
"nationality" text,
"mark" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank has a mark of NM and is from India?`:
```sql
|
SELECT SUM("total") FROM "single_game" WHERE "rank"<3 AND "tally"='2-5'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of totals for ranks under 3 with tallies of 2-5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of totals for ranks under 3 with tallies of 2-5?`:
```sql
|
SELECT "player" FROM "single_game" WHERE "rank"=8 AND "tally"='1-5'; |
## Task
Generate a SQL query to answer the following question:
`Which player had a rank of 8 and tally of 1-5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player had a rank of 8 and tally of 1-5?`:
```sql
|
SELECT SUM("no_in_series") FROM "episodes" WHERE "written_by"='sam meikle' AND "no_in_season"=21; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the numbers in series written by sam meikle, which have 21 numbers in the season?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "episodes" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the numbers in series written by sam meikle, which have 21 numbers in the season?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "location_attendance"='alexander memorial coliseum' AND "record"='0-1'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the game played in Alexander Memorial Coliseum when the record was 0-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the game played in Alexander Memorial Coliseum when the record was 0-1?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "location_attendance"='seattle center coliseum'; |
## Task
Generate a SQL query to answer the following question:
`When was the game played that was at the Seattle Center Coliseum?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the game played that was at the Seattle Center Coliseum?`:
```sql
|
SELECT MIN("game") FROM "game_log" WHERE "location_attendance"='alexander memorial coliseum' AND "date"='october 16'; |
## Task
Generate a SQL query to answer the following question:
`What is the least game that was played in Alexander Memorial Coliseum on October 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least game that was played in Alexander Memorial Coliseum on October 16?`:
```sql
|
SELECT AVG("game") FROM "game_log" WHERE "date"='october 16'; |
## Task
Generate a SQL query to answer the following question:
`What average game was played on October 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What average game was played on October 16?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "game"=2; |
## Task
Generate a SQL query to answer the following question:
`On what day was game 2 played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what day was game 2 played?`:
```sql
|
SELECT AVG("tourism_receipts_2011_millions_of_us") FROM "performance_indicators_for_international" WHERE "tourist_arrivals_2011_millions"<1.141 AND "tourism_receipts_2011_us_per_arrival">'1,449'; |
## Task
Generate a SQL query to answer the following question:
`What is the average tourism receipts in millions of US dollars in 2011 with less than 1.141 million of 2011 tourist arrivals and more than 1,449 tourism receipts in 2011 US dollars per arrival?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_indicators_for_international" (
"country" text,
"tourist_arrivals_2011_millions" real,
"tourism_receipts_2011_millions_of_us" real,
"tourism_receipts_2011_us_per_arrival" real,
"tourism_receipts_2011_us_per_capita" real,
"tourism_receipts_2003_as_pct_of_gdp" text,
"tourism_receipts_2003_as_pct_of_exports" text,
"tourism_competitiveness_2011_ttci" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average tourism receipts in millions of US dollars in 2011 with less than 1.141 million of 2011 tourist arrivals and more than 1,449 tourism receipts in 2011 US dollars per arrival?`:
```sql
|
SELECT "tourism_competitiveness_2011_ttci" FROM "performance_indicators_for_international" WHERE "country"='venezuela'; |
## Task
Generate a SQL query to answer the following question:
`What is the tourism competitiveness in 2011 of venezuela?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_indicators_for_international" (
"country" text,
"tourist_arrivals_2011_millions" real,
"tourism_receipts_2011_millions_of_us" real,
"tourism_receipts_2011_us_per_arrival" real,
"tourism_receipts_2011_us_per_capita" real,
"tourism_receipts_2003_as_pct_of_gdp" text,
"tourism_receipts_2003_as_pct_of_exports" text,
"tourism_competitiveness_2011_ttci" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the tourism competitiveness in 2011 of venezuela?`:
```sql
|
SELECT MAX("tourism_receipts_2011_us_per_capita") FROM "performance_indicators_for_international" WHERE "tourism_receipts_2003_as_pct_of_gdp"='19.4' AND "tourism_receipts_2011_us_per_arrival"<655; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of tourism receipts in 2011 US $ per capita with 19.4 % of GDP in 2003 tourism receipts and less than 655 US $ per arrival in 2011 tourism receipts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_indicators_for_international" (
"country" text,
"tourist_arrivals_2011_millions" real,
"tourism_receipts_2011_millions_of_us" real,
"tourism_receipts_2011_us_per_arrival" real,
"tourism_receipts_2011_us_per_capita" real,
"tourism_receipts_2003_as_pct_of_gdp" text,
"tourism_receipts_2003_as_pct_of_exports" text,
"tourism_competitiveness_2011_ttci" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of tourism receipts in 2011 US $ per capita with 19.4 % of GDP in 2003 tourism receipts and less than 655 US $ per arrival in 2011 tourism receipts?`:
```sql
|
SELECT MIN("tourist_arrivals_2011_millions") FROM "performance_indicators_for_international" WHERE "tourism_receipts_2011_us_per_arrival"=507 AND "tourism_receipts_2011_millions_of_us"<'11,869'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest tourism arrivals in 2011 in millions with 507 US $ per arrival in 2011 tourism receipts and less than 11,869 million of US $ in 2011 tourism receipts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_indicators_for_international" (
"country" text,
"tourist_arrivals_2011_millions" real,
"tourism_receipts_2011_millions_of_us" real,
"tourism_receipts_2011_us_per_arrival" real,
"tourism_receipts_2011_us_per_capita" real,
"tourism_receipts_2003_as_pct_of_gdp" text,
"tourism_receipts_2003_as_pct_of_exports" text,
"tourism_competitiveness_2011_ttci" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest tourism arrivals in 2011 in millions with 507 US $ per arrival in 2011 tourism receipts and less than 11,869 million of US $ in 2011 tourism receipts?`:
```sql
|
SELECT MAX("tourist_arrivals_2011_millions") FROM "performance_indicators_for_international" WHERE "tourism_competitiveness_2011_ttci"='3.82' AND "tourism_receipts_2011_us_per_arrival">'1,102'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest tourism arrivals in 2011 in millions with a 3.82 tourism competitiveness in 2011 and more than 1,102 US$ per arrival in 2011 tourism receipts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_indicators_for_international" (
"country" text,
"tourist_arrivals_2011_millions" real,
"tourism_receipts_2011_millions_of_us" real,
"tourism_receipts_2011_us_per_arrival" real,
"tourism_receipts_2011_us_per_capita" real,
"tourism_receipts_2003_as_pct_of_gdp" text,
"tourism_receipts_2003_as_pct_of_exports" text,
"tourism_competitiveness_2011_ttci" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest tourism arrivals in 2011 in millions with a 3.82 tourism competitiveness in 2011 and more than 1,102 US$ per arrival in 2011 tourism receipts?`:
```sql
|
SELECT "year" FROM "national_championships" WHERE "runner_up"='wisconsin'; |
## Task
Generate a SQL query to answer the following question:
`In what year was Wisconsin the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_championships" (
"year" real,
"champion" text,
"score" text,
"runner_up" text,
"city" text,
"arena" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was Wisconsin the runner-up?`:
```sql
|
SELECT "arena" FROM "national_championships" WHERE "runner_up"='north dakota'; |
## Task
Generate a SQL query to answer the following question:
`In what arena was the North Dakota the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_championships" (
"year" real,
"champion" text,
"score" text,
"runner_up" text,
"city" text,
"arena" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what arena was the North Dakota the runner-up?`:
```sql
|
SELECT "score" FROM "national_championships" WHERE "arena"='broadmoor arena'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game at the Broadmoor Arena?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_championships" (
"year" real,
"champion" text,
"score" text,
"runner_up" text,
"city" text,
"arena" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game at the Broadmoor Arena?`:
```sql
|
SELECT "runner_up" FROM "national_championships" WHERE "year"<2008 AND "arena"='broadmoor arena'; |
## Task
Generate a SQL query to answer the following question:
`Who was the runner-up at the Broadmoor Arena before 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_championships" (
"year" real,
"champion" text,
"score" text,
"runner_up" text,
"city" text,
"arena" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the runner-up at the Broadmoor Arena before 2008?`:
```sql
|
SELECT "year" FROM "national_championships" WHERE "arena"='pepsi arena'; |
## Task
Generate a SQL query to answer the following question:
`In what year was the competition at the Pepsi Arena?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_championships" (
"year" real,
"champion" text,
"score" text,
"runner_up" text,
"city" text,
"arena" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was the competition at the Pepsi Arena?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='53-24'; |
## Task
Generate a SQL query to answer the following question:
`Which opponent has a 53-24 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponent has a 53-24 record?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "game"='73'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent for game 73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent for game 73?`:
```sql
|
SELECT "replaced_by" FROM "managerial_changes" WHERE "team"='milton keynes dons'; |
## Task
Generate a SQL query to answer the following question:
`who is the replacement when the team is milton keynes dons?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the replacement when the team is milton keynes dons?`:
```sql
|
SELECT "team" FROM "managerial_changes" WHERE "position_in_table"='24th' AND "date_of_appointment"='15 september 2008'; |
## Task
Generate a SQL query to answer the following question:
`what is the team with the position in table of 24th and the date of appointment 15 september 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the team with the position in table of 24th and the date of appointment 15 september 2008?`:
```sql
|
SELECT "position_in_table" FROM "managerial_changes" WHERE "team"='hartlepool united'; |
## Task
Generate a SQL query to answer the following question:
`what is the position in table when the team is hartlepool united?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the position in table when the team is hartlepool united?`:
```sql
|
SELECT "team" FROM "managerial_changes" WHERE "replaced_by"='geraint williams'; |
## Task
Generate a SQL query to answer the following question:
`what is the team geraint williams is the replacement?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the team geraint williams is the replacement?`:
```sql
|
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "position_in_table"='16th' AND "outgoing_manager"='russell slade'; |
## Task
Generate a SQL query to answer the following question:
`what is the date of vacancy when the position in table is 16th and the outgoing manager is russell slade?`
### 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,
"manner_of_departure" text,
"date_of_vacancy" text,
"replaced_by" text,
"date_of_appointment" text,
"position_in_table" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date of vacancy when the position in table is 16th and the outgoing manager is russell slade?`:
```sql
|
SELECT "years" FROM "most_number_of_appearances" WHERE "finals"='10 (0)'; |
## Task
Generate a SQL query to answer the following question:
`What years have 10 (0) in the finals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_number_of_appearances" (
"name" text,
"years" text,
"a_league" text,
"finals" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What years have 10 (0) in the finals?`:
```sql
|
SELECT "a_league" FROM "most_number_of_appearances" WHERE "finals"='6 (1)' AND "name"='leigh broxham'; |
## Task
Generate a SQL query to answer the following question:
`What A-League has 6 (1) for the finals, and leigh broxham as the name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_number_of_appearances" (
"name" text,
"years" text,
"a_league" text,
"finals" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What A-League has 6 (1) for the finals, and leigh broxham as the name?`:
```sql
|
SELECT "finals" FROM "most_number_of_appearances" WHERE "name"='grant brebner'; |
## Task
Generate a SQL query to answer the following question:
`What finals have grant brebner as the name?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_number_of_appearances" (
"name" text,
"years" text,
"a_league" text,
"finals" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What finals have grant brebner as the name?`:
```sql
|
SELECT "years" FROM "most_number_of_appearances" WHERE "finals"='9 (0)' AND "a_league"='133 (1)'; |
## Task
Generate a SQL query to answer the following question:
`What years have 9 (0) as the finals and 133 (1) as the A-League?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_number_of_appearances" (
"name" text,
"years" text,
"a_league" text,
"finals" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What years have 9 (0) as the finals and 133 (1) as the A-League?`:
```sql
|
SELECT "years" FROM "most_number_of_appearances" WHERE "finals"='9 (3)'; |
## Task
Generate a SQL query to answer the following question:
`What years have 9 (3) as the finals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_number_of_appearances" (
"name" text,
"years" text,
"a_league" text,
"finals" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What years have 9 (3) as the finals?`:
```sql
|
SELECT "years" FROM "most_number_of_appearances" WHERE "total"='101 (16)'; |
## Task
Generate a SQL query to answer the following question:
`What years have 101 (16) as the total?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_number_of_appearances" (
"name" text,
"years" text,
"a_league" text,
"finals" text,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What years have 101 (16) as the total?`:
```sql
|
SELECT "athlete" FROM "quarterfinal_2" WHERE "notes"='sc/d' AND "time"='7:26.85'; |
## Task
Generate a SQL query to answer the following question:
`Who has a time of 7:26.85 and notes of sc/d?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who has a time of 7:26.85 and notes of sc/d?`:
```sql
|
SELECT "notes" FROM "quarterfinal_2" WHERE "rank"<6 AND "athlete"='ioannis christou'; |
## Task
Generate a SQL query to answer the following question:
`Ioannis Christou with a rank smaller than 6 has what notes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "quarterfinal_2" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Ioannis Christou with a rank smaller than 6 has what notes?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.