output
stringlengths 27
479
| instruction
stringlengths 407
1.39k
|
|---|---|
SELECT "country_or_territory_with_flag" FROM "table1_14098_1" WHERE "capital"='Santiago';
|
## Task
Generate a SQL query to answer the following question:
`What country'c capital is santiago?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_14098_1" (
"country_or_territory_with_flag" text,
"area_km_per_sqmi" text,
"population_july_2009_est" real,
"population_density_per_km" text,
"capital" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country'c capital is santiago?`:
```sql
|
SELECT "voice_actor_english_1998_pioneer" FROM "cast" WHERE "voice_actor_english_1997_saban"='Alec Willows' AND "voice_actor_english_2006_fu_nimation"='Andy McAvin';
|
## Task
Generate a SQL query to answer the following question:
`who is the the voice actor (englbeingh 1998 / pioneer) with voice actor (englbeingh 1997 / saban) being alec willows and voice actor (englbeingh 2006 / funimation) being andy mcavin`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the the voice actor (englbeingh 1998 / pioneer) with voice actor (englbeingh 1997 / saban) being alec willows and voice actor (englbeingh 2006 / funimation) being andy mcavin`:
```sql
|
SELECT "character_name" FROM "cast" WHERE "voice_actor_english_1997_saban"='Ian James Corlett';
|
## Task
Generate a SQL query to answer the following question:
`what's the character name with voice actor (englbeingh 1997 / saban) being ian james corlett`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the character name with voice actor (englbeingh 1997 / saban) being ian james corlett`:
```sql
|
SELECT "character_name" FROM "cast" WHERE "voice_actor_english_1998_pioneer"='Paul Dobson';
|
## Task
Generate a SQL query to answer the following question:
`what's the character name with voice actor (englbeingh 1998 / pioneer) being paul dobson`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the character name with voice actor (englbeingh 1998 / pioneer) being paul dobson`:
```sql
|
SELECT COUNT("voice_actor_english_1998_pioneer") FROM "cast" WHERE "voice_actor_japanese"='Shinobu Satouchi';
|
## Task
Generate a SQL query to answer the following question:
` how many voice actor (englbeingh 1998 / pioneer) with voice actor (japanese) being shinobu satouchi`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
### SQL
Given the database schema, here is the SQL query that answers ` how many voice actor (englbeingh 1998 / pioneer) with voice actor (japanese) being shinobu satouchi`:
```sql
|
SELECT "voice_actor_japanese" FROM "cast" WHERE "character_name"='Goku';
|
## Task
Generate a SQL query to answer the following question:
`who is the the voice actor (japanese) with character name being goku`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the the voice actor (japanese) with character name being goku`:
```sql
|
SELECT COUNT("national_titles") FROM "college_sports" WHERE "school"='Peru State College';
|
## Task
Generate a SQL query to answer the following question:
`how many big wins does peru state college have`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `how many big wins does peru state college have`:
```sql
|
SELECT "school" FROM "college_sports" WHERE "national_titles"=14;
|
## Task
Generate a SQL query to answer the following question:
`which school has 14 large championships`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `which school has 14 large championships`:
```sql
|
SELECT MIN("national_titles") FROM "college_sports" WHERE "school"='Concordia University';
|
## Task
Generate a SQL query to answer the following question:
`how many overall championships does concordia university have`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `how many overall championships does concordia university have`:
```sql
|
SELECT "duration" FROM "use" WHERE "mission"='STS-87';
|
## Task
Generate a SQL query to answer the following question:
`what's the duration with mission being sts-87`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the duration with mission being sts-87`:
```sql
|
SELECT "edo_flight" FROM "use" WHERE "duration"='17 days, 15 hours, 53 minutes, 18 seconds';
|
## Task
Generate a SQL query to answer the following question:
`what's the edo flight with duration being 17 days, 15 hours, 53 minutes, 18 seconds`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the edo flight with duration being 17 days, 15 hours, 53 minutes, 18 seconds`:
```sql
|
SELECT "primary_payload_s" FROM "use" WHERE "launch_date"='July 8, 1994';
|
## Task
Generate a SQL query to answer the following question:
`what's the primary payload(s) with launch date being july 8, 1994`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the primary payload(s) with launch date being july 8, 1994`:
```sql
|
SELECT "mission" FROM "use" WHERE "primary_payload_s"='Spacelab Life Sciences-2';
|
## Task
Generate a SQL query to answer the following question:
`what's the mission with primary payload(s) being spacelab life sciences-2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the mission with primary payload(s) being spacelab life sciences-2`:
```sql
|
SELECT "shuttle" FROM "use" WHERE "primary_payload_s"='United States Microgravity Laboratory-1';
|
## Task
Generate a SQL query to answer the following question:
`what's the shuttle with primary payload(s) being united states microgravity laboratory-1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the shuttle with primary payload(s) being united states microgravity laboratory-1`:
```sql
|
SELECT COUNT("primary_payload_s") FROM "use" WHERE "shuttle"='Columbia' AND "duration"='13 days, 19 hours, 30 minutes, 4 seconds';
|
## Task
Generate a SQL query to answer the following question:
` how many primary payload(s) with shuttle being columbia and duration being 13 days, 19 hours, 30 minutes, 4 seconds`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
### SQL
Given the database schema, here is the SQL query that answers ` how many primary payload(s) with shuttle being columbia and duration being 13 days, 19 hours, 30 minutes, 4 seconds`:
```sql
|
SELECT "pts" FROM "by_seasons_and_teams" WHERE "team"='Kopron Team Scot';
|
## Task
Generate a SQL query to answer the following question:
`what's the pts with team being kopron team scot`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the pts with team being kopron team scot`:
```sql
|
SELECT "pts" FROM "by_seasons_and_teams" WHERE "position"='NC';
|
## Task
Generate a SQL query to answer the following question:
`what's the pts with position being nc`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the pts with position being nc`:
```sql
|
SELECT "pts" FROM "by_seasons_and_teams" WHERE "poles"<1.0 AND "motorcycle"='Aprilia' AND "class"='250cc';
|
## Task
Generate a SQL query to answer the following question:
`what's the pts with poles being smaller than 1.0 and motorcycle being aprilia and class being 250cc`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the pts with poles being smaller than 1.0 and motorcycle being aprilia and class being 250cc`:
```sql
|
SELECT "poles" FROM "by_seasons_and_teams" WHERE "pts"='81';
|
## Task
Generate a SQL query to answer the following question:
`what's the poles with pts being 81`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the poles with pts being 81`:
```sql
|
SELECT COUNT("class") FROM "by_seasons_and_teams" WHERE "poles">1.0;
|
## Task
Generate a SQL query to answer the following question:
` how many class with poles being bigger than 1.0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers ` how many class with poles being bigger than 1.0`:
```sql
|
SELECT "position" FROM "by_seasons_and_teams" WHERE "team"='Skilled Racing Team';
|
## Task
Generate a SQL query to answer the following question:
`what's the position with team being skilled racing team`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the position with team being skilled racing team`:
```sql
|
SELECT "defensive" FROM "weekly_awards" WHERE "month"='February' AND "rookie"='Rhys Duch';
|
## Task
Generate a SQL query to answer the following question:
`Who was the defensive award winner in February when the rookie award was given to Rhys Duch?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the defensive award winner in February when the rookie award was given to Rhys Duch?`:
```sql
|
SELECT "offensive" FROM "weekly_awards" WHERE "overall"='Bob Watson';
|
## Task
Generate a SQL query to answer the following question:
`Who was the offensive award winner the week when Bob Watson was given the overall award?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the offensive award winner the week when Bob Watson was given the overall award?`:
```sql
|
SELECT "defensive" FROM "weekly_awards" WHERE "rookie"='Daryl Veltman' AND "offensive"='Mark Steenhuis';
|
## Task
Generate a SQL query to answer the following question:
`Who was the defensive award winner when the rookie award was given to Daryl Veltman and the offensive award was given to Mark Steenhuis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the defensive award winner when the rookie award was given to Daryl Veltman and the offensive award was given to Mark Steenhuis?`:
```sql
|
SELECT "rookie" FROM "weekly_awards" WHERE "transition"='Brodie Merrill' AND "offensive"='Pat Maddalena';
|
## Task
Generate a SQL query to answer the following question:
`Who won the rookie award the week the transition award was given to Brodie Merrill and the offensive award was given to Pat Maddalena?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the rookie award the week the transition award was given to Brodie Merrill and the offensive award was given to Pat Maddalena?`:
```sql
|
SELECT MIN("enrollment") FROM "high_schools_grades_9_12" WHERE "wiaa_classification"='3A';
|
## Task
Generate a SQL query to answer the following question:
`What is the lowest enrollment value out of the enrollment values I'd the schools with a 3A WIAA clarification? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest enrollment value out of the enrollment values I'd the schools with a 3A WIAA clarification? `:
```sql
|
SELECT "wiaa_classification" FROM "high_schools_grades_9_12" WHERE "high_school"='Oakland Alternative';
|
## Task
Generate a SQL query to answer the following question:
`What is the WIAA classification of Oakland Alternative High School? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the WIAA classification of Oakland Alternative High School? `:
```sql
|
SELECT MAX("established") FROM "high_schools_grades_9_12" WHERE "high_school"='Mount Tahoma';
|
## Task
Generate a SQL query to answer the following question:
`When was Mount Tahoma established? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Mount Tahoma established? `:
```sql
|
SELECT "notes" FROM "high_schools_grades_9_12" WHERE "established"=1973;
|
## Task
Generate a SQL query to answer the following question:
`What's the note about the school established in the year of 1973?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the note about the school established in the year of 1973?`:
```sql
|
SELECT "4th_district" FROM "supervisors" WHERE "year"=1924;
|
## Task
Generate a SQL query to answer the following question:
`Who was in the 4th district in 1924?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "supervisors" (
"year" real,
"1st_district" text,
"2nd_district" text,
"3rd_district" text,
"4th_district" text,
"5th_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in the 4th district in 1924?`:
```sql
|
SELECT "year" FROM "supervisors" WHERE "2nd_district"='David L. Baker' AND "1st_district"='Cecil M. Featherly';
|
## Task
Generate a SQL query to answer the following question:
`List all the years with Cecil M. Featherly in the 1st district and David L. Baker in the 2nd district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "supervisors" (
"year" real,
"1st_district" text,
"2nd_district" text,
"3rd_district" text,
"4th_district" text,
"5th_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all the years with Cecil M. Featherly in the 1st district and David L. Baker in the 2nd district?`:
```sql
|
SELECT MAX("year") FROM "supervisors" WHERE "5th_district"='Howard A. Wassum';
|
## Task
Generate a SQL query to answer the following question:
`What is the last year that Howard A. Wassum was in the 5th district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "supervisors" (
"year" real,
"1st_district" text,
"2nd_district" text,
"3rd_district" text,
"4th_district" text,
"5th_district" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the last year that Howard A. Wassum was in the 5th district?`:
```sql
|
SELECT "fte_teachers" FROM "schools" WHERE "school_level"='Middle' AND "city"='Sunnyvale';
|
## Task
Generate a SQL query to answer the following question:
`List all FTE middle school teachers in Sunnyvale.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schools" (
"school_name" text,
"city" text,
"students" real,
"fte_teachers" text,
"pupil_teacher_ratio" text,
"school_level" text,
"low_grade" text,
"high_grade" text
);
### SQL
Given the database schema, here is the SQL query that answers `List all FTE middle school teachers in Sunnyvale.`:
```sql
|
SELECT MAX("students") FROM "schools" WHERE "pupil_teacher_ratio"='20.8';
|
## Task
Generate a SQL query to answer the following question:
`What is the highest number of students with a teacher:student ratio of 20.8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schools" (
"school_name" text,
"city" text,
"students" real,
"fte_teachers" text,
"pupil_teacher_ratio" text,
"school_level" text,
"low_grade" text,
"high_grade" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of students with a teacher:student ratio of 20.8?`:
```sql
|
SELECT "fte_teachers" FROM "schools" WHERE "pupil_teacher_ratio"='19';
|
## Task
Generate a SQL query to answer the following question:
`How many FTE teachers are there when the student:teacher ration is 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schools" (
"school_name" text,
"city" text,
"students" real,
"fte_teachers" text,
"pupil_teacher_ratio" text,
"school_level" text,
"low_grade" text,
"high_grade" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many FTE teachers are there when the student:teacher ration is 19?`:
```sql
|
SELECT "congress" FROM "table1_14158567_1" WHERE "member_elect"='Richard P. Giles';
|
## Task
Generate a SQL query to answer the following question:
`What edition of congress for member-elect richard p. giles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_14158567_1" (
"member_elect" text,
"party" text,
"district" text,
"election_date" text,
"congress" text,
"reason_for_non_seating" text
);
### SQL
Given the database schema, here is the SQL query that answers `What edition of congress for member-elect richard p. giles?`:
```sql
|
SELECT COUNT("mean_elevation") FROM "table1_1416612_1" WHERE "lowest_point"='Gulf of Mexico' AND "state"='Texas';
|
## Task
Generate a SQL query to answer the following question:
` how many mean elevation with lowest point being gulf of mexico and state being texas`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
### SQL
Given the database schema, here is the SQL query that answers ` how many mean elevation with lowest point being gulf of mexico and state being texas`:
```sql
|
SELECT "highest_point" FROM "table1_1416612_1" WHERE "lowest_point"='Belle Fourche River at South Dakota border';
|
## Task
Generate a SQL query to answer the following question:
`what's the highest point with lowest point being belle fourche river at south dakota border`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the highest point with lowest point being belle fourche river at south dakota border`:
```sql
|
SELECT "lowest_elevation" FROM "table1_1416612_1" WHERE "highest_point"='Charles Mound';
|
## Task
Generate a SQL query to answer the following question:
`what's the lowest elevation with highest point being charles mound`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the lowest elevation with highest point being charles mound`:
```sql
|
SELECT "lowest_point" FROM "table1_1416612_1" WHERE "highest_point"='Mount Greylock';
|
## Task
Generate a SQL query to answer the following question:
`what's the lowest point with highest point being mount greylock`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the lowest point with highest point being mount greylock`:
```sql
|
SELECT "state" FROM "table1_1416612_1" WHERE "highest_point"='Mount Katahdin';
|
## Task
Generate a SQL query to answer the following question:
`what's the state with highest point being mount katahdin`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the state with highest point being mount katahdin`:
```sql
|
SELECT "language" FROM "european_version" WHERE "genre"='Glam';
|
## Task
Generate a SQL query to answer the following question:
`What language for the glam genre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_version" (
"song_title" text,
"artist" text,
"language" text,
"decade" text,
"genre" text,
"exportable" text,
"family_friendly" text
);
### SQL
Given the database schema, here is the SQL query that answers `What language for the glam genre?`:
```sql
|
SELECT "exportable" FROM "european_version" WHERE "decade"='1980s';
|
## Task
Generate a SQL query to answer the following question:
`What game allow the 1980s to be exportable?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_version" (
"song_title" text,
"artist" text,
"language" text,
"decade" text,
"genre" text,
"exportable" text,
"family_friendly" text
);
### SQL
Given the database schema, here is the SQL query that answers `What game allow the 1980s to be exportable?`:
```sql
|
SELECT COUNT("family_friendly") FROM "european_version" WHERE "decade"='1990s';
|
## Task
Generate a SQL query to answer the following question:
`How many family friendly games are in the 1990s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "european_version" (
"song_title" text,
"artist" text,
"language" text,
"decade" text,
"genre" text,
"exportable" text,
"family_friendly" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many family friendly games are in the 1990s?`:
```sql
|
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "aggregate"='0-1';
|
## Task
Generate a SQL query to answer the following question:
`When 0-1 is the aggregate what are the home (1st leg)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 0-1 is the aggregate what are the home (1st leg)?`:
```sql
|
SELECT "home_2nd_leg" FROM "losers_knockout" WHERE "1st_leg"='2-0';
|
## Task
Generate a SQL query to answer the following question:
`When 2-0 is the 1st leg what are the home (2nd leg)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When 2-0 is the 1st leg what are the home (2nd leg)?`:
```sql
|
SELECT "home_2nd_leg" FROM "losers_knockout" WHERE "home_1st_leg"='Belgrano';
|
## Task
Generate a SQL query to answer the following question:
`When belgrano is the home (1st leg) what is the home (2nd leg)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When belgrano is the home (1st leg) what is the home (2nd leg)?`:
```sql
|
SELECT "2nd_leg" FROM "losers_knockout" WHERE "home_2nd_leg"='Platense';
|
## Task
Generate a SQL query to answer the following question:
`When platense is the home (2nd leg) what is the 2nd leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When platense is the home (2nd leg) what is the 2nd leg?`:
```sql
|
SELECT COUNT("1st_leg") FROM "losers_knockout" WHERE "home_1st_leg"='Altos Hornos Zapla';
|
## Task
Generate a SQL query to answer the following question:
`When altos hornos zapla is the home (1st leg) what is overall amount of 1st leg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When altos hornos zapla is the home (1st leg) what is overall amount of 1st leg?`:
```sql
|
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "home_2nd_leg"='Temperley';
|
## Task
Generate a SQL query to answer the following question:
`When temperley is the home (2nd leg) what is the home (1st leg)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When temperley is the home (2nd leg) what is the home (1st leg)?`:
```sql
|
SELECT COUNT("2nd_leg") FROM "winners_knockout" WHERE "aggregate"='2-4';
|
## Task
Generate a SQL query to answer the following question:
`How many 2nd legs had an aggregate of 2-4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many 2nd legs had an aggregate of 2-4?`:
```sql
|
SELECT COUNT("home_2nd_leg") FROM "winners_knockout" WHERE "1st_leg"='1-1';
|
## Task
Generate a SQL query to answer the following question:
`How many home (2nd leg) had a 1st leg 1-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many home (2nd leg) had a 1st leg 1-1?`:
```sql
|
SELECT "2nd_leg" FROM "winners_knockout" WHERE "home_1st_leg"='Independiente';
|
## Task
Generate a SQL query to answer the following question:
`How many 2nd legs are there where home (1st leg) is Independiente?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many 2nd legs are there where home (1st leg) is Independiente?`:
```sql
|
SELECT "home_2nd_leg" FROM "winners_knockout" WHERE "home_1st_leg"='Talleres';
|
## Task
Generate a SQL query to answer the following question:
`Who was in home (2nd leg) when Talleres was in home (1st leg)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in home (2nd leg) when Talleres was in home (1st leg)`:
```sql
|
SELECT "2nd_leg" FROM "winners_knockout" WHERE "home_1st_leg"='Boca Juniors';
|
## Task
Generate a SQL query to answer the following question:
`Who was in 2nd leg when Boca Juniors was in home (1st leg)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in 2nd leg when Boca Juniors was in home (1st leg)?`:
```sql
|
SELECT "1968_bbc" FROM "2000_version" WHERE "1957_bbc"='Anneke Wills';
|
## Task
Generate a SQL query to answer the following question:
`Name the 1968 bbc for 1957 bbc anneke wills`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 1968 bbc for 1957 bbc anneke wills`:
```sql
|
SELECT "2000_carlton_television" FROM "2000_version" WHERE "1951_bbc"='John Stuart';
|
## Task
Generate a SQL query to answer the following question:
`Name the 2000 carlton television for 1951 bbc john stuart`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2000 carlton television for 1951 bbc john stuart`:
```sql
|
SELECT "cast" FROM "2000_version" WHERE "1957_bbc"='Jean Anderson';
|
## Task
Generate a SQL query to answer the following question:
`Name the cast for 1957 bcc for jean anderson`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the cast for 1957 bcc for jean anderson`:
```sql
|
SELECT "1970_film" FROM "2000_version" WHERE "1951_bbc"='Michael Croudson';
|
## Task
Generate a SQL query to answer the following question:
`Name the 1970 film when 1951 bbc is michael croudson`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 1970 film when 1951 bbc is michael croudson`:
```sql
|
SELECT "cast" FROM "2000_version" WHERE "1951_bbc"='Carole Lorimer';
|
## Task
Generate a SQL query to answer the following question:
`Name the cast for 1951 bbc being carole lorimer`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the cast for 1951 bbc being carole lorimer`:
```sql
|
SELECT "1970_film" FROM "2000_version" WHERE "1968_bbc"='Neil McDermott';
|
## Task
Generate a SQL query to answer the following question:
`Name the 1970 film for when 1968 being neil mcdermott`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 1970 film for when 1968 being neil mcdermott`:
```sql
|
SELECT "playoffs" FROM "year_by_year" WHERE "open_cup"='2nd Round';
|
## Task
Generate a SQL query to answer the following question:
`Name the playoffs for 2nd round open cup`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"division" real,
"league" text,
"regular_season" text,
"playoffs" text,
"open_cup" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the playoffs for 2nd round open cup`:
```sql
|
SELECT "reg_season" FROM "year_by_year" WHERE "playoffs"='Conference Semifinals' AND "us_open_cup"='Did not qualify';
|
## Task
Generate a SQL query to answer the following question:
`What was the regular season standings for the year when the playoffs reached the conference semifinals and the team did not qualify for the US Open Cup?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year" (
"year" real,
"league" text,
"reg_season" text,
"playoffs" text,
"us_open_cup" text,
"avg_attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the regular season standings for the year when the playoffs reached the conference semifinals and the team did not qualify for the US Open Cup?`:
```sql
|
SELECT "population_1931_in_1_000s" FROM "administrative_division" WHERE "voivodeship_or_city"='lubelskie';
|
## Task
Generate a SQL query to answer the following question:
`Name the population in 1931 for lubelskie`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the population in 1931 for lubelskie`:
```sql
|
SELECT "s_car_plate_starting_1937" FROM "administrative_division" WHERE "area_1930_in_1_000skm_2"='16.5';
|
## Task
Generate a SQL query to answer the following question:
`Name the s car starting 1937 when area 1930 is 16.5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the s car starting 1937 when area 1930 is 16.5`:
```sql
|
SELECT "population_1931_in_1_000s" FROM "administrative_division" WHERE "capital"='Tarnopol';
|
## Task
Generate a SQL query to answer the following question:
`Name the population when the capital is tarnopol`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the population when the capital is tarnopol`:
```sql
|
SELECT "s_car_plate_starting_1937" FROM "administrative_division" WHERE "area_1930_in_1_000skm_2"='22.2';
|
## Task
Generate a SQL query to answer the following question:
`Name the s car plate starting 1937 for area 1930 being 22.2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the s car plate starting 1937 for area 1930 being 22.2`:
```sql
|
SELECT MIN("bits_14_12") FROM "table1_14249278_1" WHERE "description"='Output from accumulator to character bus';
|
## Task
Generate a SQL query to answer the following question:
`Name the most bits 14-12 for output from accumulator to character bus`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_14249278_1" (
"bit_15" real,
"bits_14_12" real,
"bits_11_0" text,
"mnemonic" text,
"description" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most bits 14-12 for output from accumulator to character bus`:
```sql
|
SELECT MIN("number_in_fleet") FROM "table1_1425948_1" WHERE "chassis_manufacturer"='Scania' AND "fleet_numbers"='3230';
|
## Task
Generate a SQL query to answer the following question:
`what is smallest number in fleet for chassis manufacturer Scania and fleet numbers is 3230?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1425948_1" (
"chassis_manufacturer" text,
"chassis_model" text,
"body_model" text,
"number_in_fleet" real,
"fleet_numbers" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is smallest number in fleet for chassis manufacturer Scania and fleet numbers is 3230?`:
```sql
|
SELECT "chassis_manufacturer" FROM "table1_1425948_1" WHERE "fleet_numbers"='2530-2558';
|
## Task
Generate a SQL query to answer the following question:
`Which chassis manufacturer is for fleet numbers range 2530-2558`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1425948_1" (
"chassis_manufacturer" text,
"chassis_model" text,
"body_model" text,
"number_in_fleet" real,
"fleet_numbers" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which chassis manufacturer is for fleet numbers range 2530-2558`:
```sql
|
SELECT MIN("number_in_fleet") FROM "table1_1425948_1" WHERE "chassis_model"='Scania K360UA';
|
## Task
Generate a SQL query to answer the following question:
`Chassis model Scania K360ua has what minimum number in fleet?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1425948_1" (
"chassis_manufacturer" text,
"chassis_model" text,
"body_model" text,
"number_in_fleet" real,
"fleet_numbers" text
);
### SQL
Given the database schema, here is the SQL query that answers `Chassis model Scania K360ua has what minimum number in fleet?`:
```sql
|
SELECT "channels" FROM "module_specifications" WHERE "designation"='PC700';
|
## Task
Generate a SQL query to answer the following question:
`Name the channels when designation is pc700`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the channels when designation is pc700`:
```sql
|
SELECT MAX("clock_rate_m_hz") FROM "module_specifications";
|
## Task
Generate a SQL query to answer the following question:
`Name the maximum clock rate mhz`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the maximum clock rate mhz`:
```sql
|
SELECT "bus_width_bits" FROM "module_specifications" WHERE "bandwidth_mb_s"=3200;
|
## Task
Generate a SQL query to answer the following question:
`Name the bus width bits when bandwidth mb/s is 3200`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the bus width bits when bandwidth mb/s is 3200`:
```sql
|
SELECT MIN("clock_rate_m_hz") FROM "module_specifications";
|
## Task
Generate a SQL query to answer the following question:
`Name the least clock rate mhz`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least clock rate mhz`:
```sql
|
SELECT MIN("clock_rate_m_hz") FROM "module_specifications" WHERE "designation"='RIMM 4200';
|
## Task
Generate a SQL query to answer the following question:
`Name the least clock rate mhz when designation is rimm 4200`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least clock rate mhz when designation is rimm 4200`:
```sql
|
SELECT COUNT("clock_rate_m_hz") FROM "module_specifications" WHERE "bandwidth_mb_s"=2400;
|
## Task
Generate a SQL query to answer the following question:
`Name the number of clock rate mhz when bandwidth mb/s is 2400`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of clock rate mhz when bandwidth mb/s is 2400`:
```sql
|
SELECT "elementary_schools" FROM "elementary_schools_grades_k_6" WHERE "principal_2013_2014"='Cort Monroe';
|
## Task
Generate a SQL query to answer the following question:
`Which elementary schools list Cort Monroe as the principal from 2013 to 2014?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elementary_schools_grades_k_6" (
"elementary_schools" text,
"mascot" text,
"address" text,
"principal_2013_2014" text,
"assistant_principal_2013_2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which elementary schools list Cort Monroe as the principal from 2013 to 2014?`:
```sql
|
SELECT "assistant_principal_2013_2014" FROM "elementary_schools_grades_k_6" WHERE "principal_2013_2014"='Cort Monroe';
|
## Task
Generate a SQL query to answer the following question:
`Who are all the assistant principals that served from 2013-2014 under the principal Cort Monroe?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "elementary_schools_grades_k_6" (
"elementary_schools" text,
"mascot" text,
"address" text,
"principal_2013_2014" text,
"assistant_principal_2013_2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are all the assistant principals that served from 2013-2014 under the principal Cort Monroe?`:
```sql
|
SELECT "opponent" FROM "table1_14263158_3" WHERE "result"='0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5';
|
## Task
Generate a SQL query to answer the following question:
`Who played in the series that resulted in matches with the following scores: 0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_14263158_3" (
"competition" text,
"stage" text,
"result" text,
"opponent" text,
"position" text,
"scorers" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who played in the series that resulted in matches with the following scores: 0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5?`:
```sql
|
SELECT "name" FROM "references" WHERE "pct_change"='6.5';
|
## Task
Generate a SQL query to answer the following question:
`Where was there a change of 6.5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where was there a change of 6.5%?`:
```sql
|
SELECT "density_pop_km" FROM "references" WHERE "pct_change"='8.8';
|
## Task
Generate a SQL query to answer the following question:
`When the change is 8.8%, what is the density (pop/km²)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the change is 8.8%, what is the density (pop/km²)?`:
```sql
|
SELECT COUNT("2011_census") FROM "references" WHERE "density_pop_km"='91.8';
|
## Task
Generate a SQL query to answer the following question:
`How many locations had a density (pop/km²) of 91.8 in the 2011 census?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many locations had a density (pop/km²) of 91.8 in the 2011 census?`:
```sql
|
SELECT COUNT("density_pop_km") FROM "references" WHERE "2006_census"=422204;
|
## Task
Generate a SQL query to answer the following question:
`When the 2006 census had a population of 422204, what was the density (pop/km²) ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the 2006 census had a population of 422204, what was the density (pop/km²) ?`:
```sql
|
SELECT MIN("population_rank") FROM "references" WHERE "pct_change"='8.4';
|
## Task
Generate a SQL query to answer the following question:
`When the % change is 8.4, what is the population rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the % change is 8.4, what is the population rank?`:
```sql
|
SELECT "pct_change" FROM "references" WHERE "population_rank"=34;
|
## Task
Generate a SQL query to answer the following question:
`When the population rank is 34, what the is % change?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the population rank is 34, what the is % change?`:
```sql
|
SELECT COUNT("team") FROM "all_time_results_record" WHERE "points_for"=38;
|
## Task
Generate a SQL query to answer the following question:
`How many teams scored exactly 38 points`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many teams scored exactly 38 points`:
```sql
|
SELECT MIN("first_played") FROM "all_time_results_record" WHERE "team"='Italy';
|
## Task
Generate a SQL query to answer the following question:
`In what year did Italy begin playing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what year did Italy begin playing?`:
```sql
|
SELECT MIN("win") FROM "all_time_results_record" WHERE "played"=5;
|
## Task
Generate a SQL query to answer the following question:
`For teams that played 5 games, what was the smallest number of wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
### SQL
Given the database schema, here is the SQL query that answers `For teams that played 5 games, what was the smallest number of wins?`:
```sql
|
SELECT COUNT("played") FROM "all_time_results_record" WHERE "first_played"=2011 AND "points_for"=36;
|
## Task
Generate a SQL query to answer the following question:
`How many games did the team that began in 2011 and scored 36 points play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games did the team that began in 2011 and scored 36 points play?`:
```sql
|
SELECT "run_time" FROM "serial_details_by_episode" WHERE "viewers_in_millions"='8.2';
|
## Task
Generate a SQL query to answer the following question:
`What are all the run times with 8.2 million viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serial_details_by_episode" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are all the run times with 8.2 million viewers?`:
```sql
|
SELECT "episode" FROM "serial_details_by_episode" WHERE "run_time"='24:01';
|
## Task
Generate a SQL query to answer the following question:
`What are all the episodes with an episode run time of 24:01?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serial_details_by_episode" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are all the episodes with an episode run time of 24:01?`:
```sql
|
SELECT COUNT("broadcast_date") FROM "serial_details_by_episode" WHERE "run_time"='24:43';
|
## Task
Generate a SQL query to answer the following question:
`How many episodes had a broadcast date and run time of 24:43?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "serial_details_by_episode" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many episodes had a broadcast date and run time of 24:43?`:
```sql
|
SELECT COUNT("research_funding_000") FROM "members" WHERE "gained_university_status"=1900;
|
## Task
Generate a SQL query to answer the following question:
`How many members gained university status in 1900?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many members gained university status in 1900?`:
```sql
|
SELECT MAX("total_number_of_students") FROM "members";
|
## Task
Generate a SQL query to answer the following question:
`What is the largest number of students?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest number of students?`:
```sql
|
SELECT COUNT("total_number_of_students") FROM "members" WHERE "vice_chancellor"='Professor Edward Acton';
|
## Task
Generate a SQL query to answer the following question:
`How many members have professor edward acton as vice-chancellor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many members have professor edward acton as vice-chancellor?`:
```sql
|
SELECT MAX("established") FROM "members" WHERE "location"='Leicester';
|
## Task
Generate a SQL query to answer the following question:
`What is the year leicester was established?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year leicester was established?`:
```sql
|
SELECT "country_territory" FROM "replaced_pageants" WHERE "former_pageant"='Miss Universe Hungary';
|
## Task
Generate a SQL query to answer the following question:
`which country has miss universe Hungary as former pageant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "replaced_pageants" (
"country_territory" text,
"former_pageant" text,
"last_competed" real,
"new_pageant" text,
"franchise_since" real
);
### SQL
Given the database schema, here is the SQL query that answers `which country has miss universe Hungary as former pageant?`:
```sql
|
SELECT "former_pageant" FROM "replaced_pageants" WHERE "new_pageant"='Miss Bahamas';
|
## Task
Generate a SQL query to answer the following question:
`which is the former pageant in the country where the new pageant is miss bahamas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "replaced_pageants" (
"country_territory" text,
"former_pageant" text,
"last_competed" real,
"new_pageant" text,
"franchise_since" real
);
### SQL
Given the database schema, here is the SQL query that answers `which is the former pageant in the country where the new pageant is miss bahamas?`:
```sql
|
SELECT MAX("last_competed") FROM "replaced_pageants" WHERE "country_territory"='New Zealand';
|
## Task
Generate a SQL query to answer the following question:
`when did new zealand last compete?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "replaced_pageants" (
"country_territory" text,
"former_pageant" text,
"last_competed" real,
"new_pageant" text,
"franchise_since" real
);
### SQL
Given the database schema, here is the SQL query that answers `when did new zealand last compete?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.