output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "points" FROM "results" WHERE "draw">7 AND "artist"='sabahudin kurt'; |
## Task
Generate a SQL query to answer the following question:
`How many Points were awarded to Sabahudin Kurt with a Draw is greater than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"place" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Points were awarded to Sabahudin Kurt with a Draw is greater than 7?`:
```sql
|
SELECT COUNT("converted") FROM "great_eastern_section" WHERE "number"='35' AND "withdrawn"<1952; |
## Task
Generate a SQL query to answer the following question:
`How much Converted has a Number of 35, and a Withdrawn smaller than 1952?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "great_eastern_section" (
"number" text,
"previous_number_s" real,
"previous_class" text,
"converted" real,
"withdrawn" real,
"disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much Converted has a Number of 35, and a Withdrawn smaller than 1952?`:
```sql
|
SELECT SUM("withdrawn") FROM "great_eastern_section" WHERE "number"='42' AND "previous_number_s">68178; |
## Task
Generate a SQL query to answer the following question:
`How much Withdrawn has a Number of 42, and a Previous Number(s) larger than 68178?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "great_eastern_section" (
"number" text,
"previous_number_s" real,
"previous_class" text,
"converted" real,
"withdrawn" real,
"disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `How much Withdrawn has a Number of 42, and a Previous Number(s) larger than 68178?`:
```sql
|
SELECT MAX("withdrawn") FROM "great_eastern_section" WHERE "previous_class"='j69' AND "previous_number_s"<68532 AND "converted">1959; |
## Task
Generate a SQL query to answer the following question:
`Which Withdrawn has a Previous Class of j69, and a Previous Number(s) smaller than 68532, and a Converted larger than 1959?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "great_eastern_section" (
"number" text,
"previous_number_s" real,
"previous_class" text,
"converted" real,
"withdrawn" real,
"disposal" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Withdrawn has a Previous Class of j69, and a Previous Number(s) smaller than 68532, and a Converted larger than 1959?`:
```sql
|
SELECT AVG("latitude") FROM "r" WHERE "water_sqmi"<2.106 AND "county"='dickey' AND "pop_2010"<95; |
## Task
Generate a SQL query to answer the following question:
`What is the average latitude for townships in Dickey county with water under 2.106 sqmi and population under 95?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average latitude for townships in Dickey county with water under 2.106 sqmi and population under 95?`:
```sql
|
SELECT MAX("geo_id") FROM "r" WHERE "land_sqmi">38.117 AND "water_sqmi">2.065; |
## Task
Generate a SQL query to answer the following question:
`What is the highest GEO ID for land masses over 38.117 sq mi and over 2.065 sq mi of water?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest GEO ID for land masses over 38.117 sq mi and over 2.065 sq mi of water?`:
```sql
|
SELECT COUNT("geo_id") FROM "r" WHERE "water_sqmi">0.587 AND "township"='riggin' AND "ansi_code">1759257; |
## Task
Generate a SQL query to answer the following question:
`What is the number of GEO IDs for areas in Riggin township with water area over 0.587 sq mi and ANSI codes over 1759257?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of GEO IDs for areas in Riggin township with water area over 0.587 sq mi and ANSI codes over 1759257?`:
```sql
|
SELECT "class" FROM "s_rebroadcaster_of_cbf_fm" WHERE "identifier"='cbf-fm-14'; |
## Task
Generate a SQL query to answer the following question:
`What's the class when the identifier is cbf-fm-14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbf_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the class when the identifier is cbf-fm-14?`:
```sql
|
SELECT "frequency" FROM "s_rebroadcaster_of_cbf_fm" WHERE "identifier"='cbf-fm-9'; |
## Task
Generate a SQL query to answer the following question:
`What's the frequency when the identifier is cbf-fm-9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbf_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the frequency when the identifier is cbf-fm-9?`:
```sql
|
SELECT "rec_net" FROM "s_rebroadcaster_of_cbf_fm" WHERE "identifier"='cbf-fm-20'; |
## Task
Generate a SQL query to answer the following question:
`What's the RECNet when the identifier is cbf-fm-20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbf_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the RECNet when the identifier is cbf-fm-20?`:
```sql
|
SELECT "rec_net" FROM "s_rebroadcaster_of_cbf_fm" WHERE "power"='199 watts'; |
## Task
Generate a SQL query to answer the following question:
`What's the RECNet when the power is 199 watts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbf_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the RECNet when the power is 199 watts?`:
```sql
|
SELECT "frequency" FROM "s_rebroadcaster_of_cbf_fm" WHERE "class"='a' AND "identifier"='cbf-fm-14'; |
## Task
Generate a SQL query to answer the following question:
`What's the frequency when the identifier is cbf-fm-14 having a class of A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cbf_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the frequency when the identifier is cbf-fm-14 having a class of A?`:
```sql
|
SELECT "a_g" FROM "digital_television" WHERE "d3_4"='46' AND "transmitter"='seaham'; |
## Task
Generate a SQL query to answer the following question:
`What is the A.G. value associated with D3&4 of 46 and transmitter of Seaham?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_television" (
"transmitter" text,
"bbca" real,
"bbcb" text,
"d3_4" text,
"arqa" text,
"arqb" text,
"pol" text,
"a_g" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the A.G. value associated with D3&4 of 46 and transmitter of Seaham?`:
```sql
|
SELECT "a_g" FROM "digital_television" WHERE "d3_4"='41'; |
## Task
Generate a SQL query to answer the following question:
`What is the AG value associated with a D3&4 of 41?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_television" (
"transmitter" text,
"bbca" real,
"bbcb" text,
"d3_4" text,
"arqa" text,
"arqb" text,
"pol" text,
"a_g" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the AG value associated with a D3&4 of 41?`:
```sql
|
SELECT "billboard_hot_100" FROM "singles" WHERE "album"='bust a nut' AND "title"='\"need your lovin'' (re-release)\"'; |
## Task
Generate a SQL query to answer the following question:
`What was the billboard hot 100 with an album bust a nut, and the title of "need your lovin' (re-release)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"year" real,
"title" text,
"billboard_hot_100" text,
"uk_singles_chart" text,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the billboard hot 100 with an album bust a nut, and the title of "need your lovin' (re-release)"?`:
```sql
|
SELECT "uk_singles_chart" FROM "singles" WHERE "album"='psychotic supper' AND "year"=1992 AND "title"='\"song & emotion\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the UK singles chart for the album psychotic supper, in the year 1992, with a title of "song & emotion"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"year" real,
"title" text,
"billboard_hot_100" text,
"uk_singles_chart" text,
"album" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the UK singles chart for the album psychotic supper, in the year 1992, with a title of "song & emotion"?`:
```sql
|
SELECT "label" FROM "guest_appearances" WHERE "date"='15 december 1992'; |
## Task
Generate a SQL query to answer the following question:
`which Label is in 15 december 1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "guest_appearances" (
"artist" text,
"album" text,
"track_s" text,
"date" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `which Label is in 15 december 1992?`:
```sql
|
SELECT "album" FROM "guest_appearances" WHERE "artist"='various artists (compilation)' AND "label"='laface'; |
## Task
Generate a SQL query to answer the following question:
`Which Album has an Artist of various artists (compilation), and a Label of laface?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "guest_appearances" (
"artist" text,
"album" text,
"track_s" text,
"date" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Album has an Artist of various artists (compilation), and a Label of laface?`:
```sql
|
SELECT "date" FROM "guest_appearances" WHERE "album"='l''un n''empêche pas l''autre'; |
## Task
Generate a SQL query to answer the following question:
`When has an Album of l'un n'empêche pas l'autre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "guest_appearances" (
"artist" text,
"album" text,
"track_s" text,
"date" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `When has an Album of l'un n'empêche pas l'autre?`:
```sql
|
SELECT "track_s" FROM "guest_appearances" WHERE "date"='18 november 1985'; |
## Task
Generate a SQL query to answer the following question:
`Which Track(s) is on 18 november 1985?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "guest_appearances" (
"artist" text,
"album" text,
"track_s" text,
"date" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Track(s) is on 18 november 1985?`:
```sql
|
SELECT "artist" FROM "guest_appearances" WHERE "track_s"='\" evilmainya \"'; |
## Task
Generate a SQL query to answer the following question:
`Which Artist has a Track(s) of " evilmainya "?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "guest_appearances" (
"artist" text,
"album" text,
"track_s" text,
"date" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Artist has a Track(s) of " evilmainya "?`:
```sql
|
SELECT "label" FROM "guest_appearances" WHERE "album"='so red the rose'; |
## Task
Generate a SQL query to answer the following question:
`Which Label that has an Album of so red the rose?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "guest_appearances" (
"artist" text,
"album" text,
"track_s" text,
"date" text,
"label" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Label that has an Album of so red the rose?`:
```sql
|
SELECT MIN("lane") FROM "semifinal_2" WHERE "name"='natalie coughlin' AND "rank">1; |
## Task
Generate a SQL query to answer the following question:
`What is the least lane number that Natalie Coughlin was in when she was ranked greater than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least lane number that Natalie Coughlin was in when she was ranked greater than 1?`:
```sql
|
SELECT "athlete" FROM "semifinal_a_b_1" WHERE "time"='6:36.05'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Athlete with a rowing Time of 6:36.05?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Athlete with a rowing Time of 6:36.05?`:
```sql
|
SELECT "song" FROM "main_setlist" WHERE "artist"='sex pistols'; |
## Task
Generate a SQL query to answer the following question:
`What song was made by the sex pistols?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_setlist" (
"year" real,
"song" text,
"artist" text,
"genre" text,
"band_tour_venue" text,
"exportable" text
);
### SQL
Given the database schema, here is the SQL query that answers `What song was made by the sex pistols?`:
```sql
|
SELECT "song" FROM "main_setlist" WHERE "band_tour_venue"='6. tool (usa) encore'; |
## Task
Generate a SQL query to answer the following question:
`What song has the band tour vnue of 6. tool (usa) encore?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "main_setlist" (
"year" real,
"song" text,
"artist" text,
"genre" text,
"band_tour_venue" text,
"exportable" text
);
### SQL
Given the database schema, here is the SQL query that answers `What song has the band tour vnue of 6. tool (usa) encore?`:
```sql
|
SELECT "total" FROM "qualified_competitors" WHERE "a_score"<6.6 AND "b_score"=8.925; |
## Task
Generate a SQL query to answer the following question:
`What is the total when the A score was less than 6.6, and the B score was 8.925?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total when the A score was less than 6.6, and the B score was 8.925?`:
```sql
|
SELECT AVG("total") FROM "qualified_competitors" WHERE "position"<4 AND "b_score">9.125 AND "a_score"<6.6; |
## Task
Generate a SQL query to answer the following question:
`What total has a position smaller than 4, a B score higher than 9.125, and an A score less than 6.6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualified_competitors" (
"position" real,
"gymnast" text,
"a_score" real,
"b_score" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What total has a position smaller than 4, a B score higher than 9.125, and an A score less than 6.6?`:
```sql
|
SELECT "score" FROM "second_round_proper" WHERE "away_team"='watford'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when watford was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when watford was the away team?`:
```sql
|
SELECT "score" FROM "second_round_proper" WHERE "home_team"='york city'; |
## Task
Generate a SQL query to answer the following question:
`What is the score when york city was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score when york city was the home team?`:
```sql
|
SELECT "score" FROM "regular_season" WHERE "game">29 AND "record"='24-6'; |
## Task
Generate a SQL query to answer the following question:
`What score has a game greater than 29, with 24-6 as the record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What score has a game greater than 29, with 24-6 as the record?`:
```sql
|
SELECT "record" FROM "regular_season" WHERE "opponent"='@ detroit'; |
## Task
Generate a SQL query to answer the following question:
`What record has @ detroit as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What record has @ detroit as the opponent?`:
```sql
|
SELECT "high_assists" FROM "regular_season" WHERE "high_points"='mcwilliams-franklin (22)'; |
## Task
Generate a SQL query to answer the following question:
`What high assists have McWilliams-franklin (22) as the high points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What high assists have McWilliams-franklin (22) as the high points?`:
```sql
|
SELECT "high_assists" FROM "regular_season" WHERE "location_attendance"='uic pavilion 3,520'; |
## Task
Generate a SQL query to answer the following question:
`What high assists have uic pavilion 3,520 as the location/attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What high assists have uic pavilion 3,520 as the location/attendance?`:
```sql
|
SELECT "game" FROM "regular_season" WHERE "high_rebounds"='jones (10)'; |
## Task
Generate a SQL query to answer the following question:
`What game has jones (10) as the high rebounds?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What game has jones (10) as the high rebounds?`:
```sql
|
SELECT "cores" FROM "ivy_bridge_quad_core_22_nm" WHERE "release_price_usd"='$426'; |
## Task
Generate a SQL query to answer the following question:
`How many cores does the processor with a release price of $426 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ivy_bridge_quad_core_22_nm" (
"model_number" text,
"s_spec_number" text,
"cores" text,
"frequency" text,
"turbo" text,
"l2_cache" text,
"l3_cache" text,
"gpu_model" text,
"gpu_frequency" text,
"socket" text,
"i_o_bus" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many cores does the processor with a release price of $426 have?`:
```sql
|
SELECT "frequency" FROM "ivy_bridge_quad_core_22_nm" WHERE "model_number"='core i7-3610qe'; |
## Task
Generate a SQL query to answer the following question:
`What was the frequency of the Core i7-3610QE?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ivy_bridge_quad_core_22_nm" (
"model_number" text,
"s_spec_number" text,
"cores" text,
"frequency" text,
"turbo" text,
"l2_cache" text,
"l3_cache" text,
"gpu_model" text,
"gpu_frequency" text,
"socket" text,
"i_o_bus" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the frequency of the Core i7-3610QE?`:
```sql
|
SELECT "cores" FROM "ivy_bridge_quad_core_22_nm" WHERE "release_date"='april 2012' AND "release_price_usd"='$393' AND "part_number_s"='av8063801117503'; |
## Task
Generate a SQL query to answer the following question:
`How many cores does the processor released in April 2012 with a price of $393 and part number av8063801117503 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ivy_bridge_quad_core_22_nm" (
"model_number" text,
"s_spec_number" text,
"cores" text,
"frequency" text,
"turbo" text,
"l2_cache" text,
"l3_cache" text,
"gpu_model" text,
"gpu_frequency" text,
"socket" text,
"i_o_bus" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many cores does the processor released in April 2012 with a price of $393 and part number av8063801117503 have?`:
```sql
|
SELECT "area_km" FROM "most_densely_populated_islands_over_1_00" WHERE "country"='japan'; |
## Task
Generate a SQL query to answer the following question:
`What is Japan's Area km²?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_densely_populated_islands_over_1_00" (
"island" text,
"country" text,
"population" text,
"area_km" text,
"density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Japan's Area km²?`:
```sql
|
SELECT "island" FROM "most_densely_populated_islands_over_1_00" WHERE "density_per_km"='1,368'; |
## Task
Generate a SQL query to answer the following question:
`Which island has a density (per km²) of 1,368?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_densely_populated_islands_over_1_00" (
"island" text,
"country" text,
"population" text,
"area_km" text,
"density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which island has a density (per km²) of 1,368?`:
```sql
|
SELECT "country" FROM "most_densely_populated_islands_over_1_00" WHERE "density_per_km"='6,814'; |
## Task
Generate a SQL query to answer the following question:
`Which country has a density (per km²) of 6,814?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_densely_populated_islands_over_1_00" (
"island" text,
"country" text,
"population" text,
"area_km" text,
"density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which country has a density (per km²) of 6,814?`:
```sql
|
SELECT "island" FROM "most_densely_populated_islands_over_1_00" WHERE "population"='9,520 (2000)'; |
## Task
Generate a SQL query to answer the following question:
`Which island has a population of 9,520 (2000)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_densely_populated_islands_over_1_00" (
"island" text,
"country" text,
"population" text,
"area_km" text,
"density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which island has a population of 9,520 (2000)?`:
```sql
|
SELECT "area_km" FROM "most_densely_populated_islands_over_1_00" WHERE "population"='99,685 (2008)'; |
## Task
Generate a SQL query to answer the following question:
`What is the area km² for a population of 99,685 (2008)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_densely_populated_islands_over_1_00" (
"island" text,
"country" text,
"population" text,
"area_km" text,
"density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area km² for a population of 99,685 (2008)?`:
```sql
|
SELECT "island" FROM "most_densely_populated_islands_over_1_00" WHERE "country"='united kingdom'; |
## Task
Generate a SQL query to answer the following question:
`Which island is in the United Kingdom?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_densely_populated_islands_over_1_00" (
"island" text,
"country" text,
"population" text,
"area_km" text,
"density_per_km" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which island is in the United Kingdom?`:
```sql
|
SELECT "pitcher" FROM "pitchers" WHERE "location"='kingdome' AND "season"='1983'; |
## Task
Generate a SQL query to answer the following question:
`Who is the pitcher from the 1983 season in location Kingdome?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pitchers" (
"season" text,
"pitcher" text,
"decision" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the pitcher from the 1983 season in location Kingdome?`:
```sql
|
SELECT "pitcher" FROM "pitchers" WHERE "opponent"='cleveland indians' AND "season"='1994'; |
## Task
Generate a SQL query to answer the following question:
`Who is the pitcher from the 1994 season that had the Cleveland Indians as an opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pitchers" (
"season" text,
"pitcher" text,
"decision" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the pitcher from the 1994 season that had the Cleveland Indians as an opponent?`:
```sql
|
SELECT "opponent" FROM "pitchers" WHERE "decision"='w' AND "season"='2011'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent for the 2011 season with a decision of W?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pitchers" (
"season" text,
"pitcher" text,
"decision" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent for the 2011 season with a decision of W?`:
```sql
|
SELECT "season" FROM "pitchers" WHERE "location"='safeco field' AND "decision"='l' AND "opponent"='boston red sox'; |
## Task
Generate a SQL query to answer the following question:
`What season was played at Safeco Field, against the Boston Red Sox, with a decision of L?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pitchers" (
"season" text,
"pitcher" text,
"decision" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season was played at Safeco Field, against the Boston Red Sox, with a decision of L?`:
```sql
|
SELECT "decision" FROM "pitchers" WHERE "opponent"='new york yankees' AND "season"='1983'; |
## Task
Generate a SQL query to answer the following question:
`What was the decision for the 1983 season for the game played against the New York Yankees?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pitchers" (
"season" text,
"pitcher" text,
"decision" text,
"opponent" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the decision for the 1983 season for the game played against the New York Yankees?`:
```sql
|
SELECT "encoding" FROM "common_floppy_disk_formats_logical_chara" WHERE "tracks_side"='80' AND "sectors_track"='11'; |
## Task
Generate a SQL query to answer the following question:
`what is the encoding when the tracks/side is 80 and sectors/track is 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "common_floppy_disk_formats_logical_chara" (
"platform" text,
"size" text,
"density" text,
"bytes_sector" real,
"sectors_track" text,
"tracks_side" text,
"sides" real,
"capacity" text,
"encoding" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the encoding when the tracks/side is 80 and sectors/track is 11?`:
```sql
|
SELECT MAX("bronze") FROM "medal_table" WHERE "total"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the highest bronze for less than 2 total trophies?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest bronze for less than 2 total trophies?`:
```sql
|
SELECT MAX("total") FROM "made_the_cut" WHERE "finish"='t64' AND "year_won">2006; |
## Task
Generate a SQL query to answer the following question:
`Which Total has a Finish of t64, and a Year won larger than 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_won" real,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total has a Finish of t64, and a Year won larger than 2006?`:
```sql
|
SELECT AVG("year_won") FROM "made_the_cut" WHERE "finish"='t24' AND "country"='england'; |
## Task
Generate a SQL query to answer the following question:
`Which year won has a Finish of t24, and a Country of england?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_won" real,
"total" real,
"to_par" text,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which year won has a Finish of t24, and a Country of england?`:
```sql
|
SELECT MIN("bronze") FROM "medals_table" WHERE "total">2 AND "silver"<1 AND "rank">10 AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest bronze value for countries with totals over 2, golds of 0, silvers under 1, and ranks over 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest bronze value for countries with totals over 2, golds of 0, silvers under 1, and ranks over 10?`:
```sql
|
SELECT "school" FROM "membership" WHERE "previous_conference"='lost river' AND "enrollment"='a'; |
## Task
Generate a SQL query to answer the following question:
`Which school has an enrollment of A and had lost river as their previous conference?`
### 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" real,
"enrollment" text,
"ihsaa_class" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which school has an enrollment of A and had lost river as their previous conference?`:
```sql
|
SELECT AVG("year_joined") FROM "membership" WHERE "county"=277; |
## Task
Generate a SQL query to answer the following question:
`What is the average year joined of the 277 county?`
### 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" real,
"enrollment" text,
"ihsaa_class" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year joined of the 277 county?`:
```sql
|
SELECT "ihsaa_class" FROM "membership" WHERE "county"<228; |
## Task
Generate a SQL query to answer the following question:
`What is the IHSAA class of the county that is less than 228?`
### 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" real,
"enrollment" text,
"ihsaa_class" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the IHSAA class of the county that is less than 228?`:
```sql
|
SELECT "engine" FROM "engineering" WHERE "transmission"='4-speed automatic' AND "acceleration_0_100km_h_0_62mph"='10.4 s'; |
## Task
Generate a SQL query to answer the following question:
`What is the engine when the transmission was 4-speed automatic, and acceleration 0–100km/h (0–62mph) was 10.4 s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engineering" (
"engine" text,
"production" text,
"transmission" text,
"power" text,
"torque" text,
"acceleration_0_100km_h_0_62mph" text,
"top_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the engine when the transmission was 4-speed automatic, and acceleration 0–100km/h (0–62mph) was 10.4 s?`:
```sql
|
SELECT "power" FROM "engineering" WHERE "acceleration_0_100km_h_0_62mph"='9.1 s'; |
## Task
Generate a SQL query to answer the following question:
`What is the Power when the acceleration 0–100km/h (0–62mph) is 9.1 s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engineering" (
"engine" text,
"production" text,
"transmission" text,
"power" text,
"torque" text,
"acceleration_0_100km_h_0_62mph" text,
"top_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Power when the acceleration 0–100km/h (0–62mph) is 9.1 s?`:
```sql
|
SELECT "transmission" FROM "engineering" WHERE "engine"='2.0l' AND "acceleration_0_100km_h_0_62mph"='10.5 s'; |
## Task
Generate a SQL query to answer the following question:
`What is the transmission when the engine is 2.0l, and acceleration 0–100km/h (0–62mph) is 10.5 s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engineering" (
"engine" text,
"production" text,
"transmission" text,
"power" text,
"torque" text,
"acceleration_0_100km_h_0_62mph" text,
"top_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the transmission when the engine is 2.0l, and acceleration 0–100km/h (0–62mph) is 10.5 s?`:
```sql
|
SELECT "production" FROM "engineering" WHERE "engine"='2.7l' AND "acceleration_0_100km_h_0_62mph"='8.5 s'; |
## Task
Generate a SQL query to answer the following question:
`What is the production when engine is 2.7l, and acceleration 0–100km/h (0–62mph) is 8.5 s?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engineering" (
"engine" text,
"production" text,
"transmission" text,
"power" text,
"torque" text,
"acceleration_0_100km_h_0_62mph" text,
"top_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the production when engine is 2.7l, and acceleration 0–100km/h (0–62mph) is 8.5 s?`:
```sql
|
SELECT "transmission" FROM "engineering" WHERE "production"='2002-2005'; |
## Task
Generate a SQL query to answer the following question:
`What is the transmission when the production was 2002-2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engineering" (
"engine" text,
"production" text,
"transmission" text,
"power" text,
"torque" text,
"acceleration_0_100km_h_0_62mph" text,
"top_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the transmission when the production was 2002-2005?`:
```sql
|
SELECT "acceleration_0_100km_h_0_62mph" FROM "engineering" WHERE "transmission"='5-speed manual'; |
## Task
Generate a SQL query to answer the following question:
`What is the acceleration 0–100km/h (0–62mph) when the transmission is 5-speed manual?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engineering" (
"engine" text,
"production" text,
"transmission" text,
"power" text,
"torque" text,
"acceleration_0_100km_h_0_62mph" text,
"top_speed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the acceleration 0–100km/h (0–62mph) when the transmission is 5-speed manual?`:
```sql
|
SELECT MAX("year") FROM "giant_bomb" WHERE "developer_s"='bethesda game studios'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest year for the Bethesda Game Studios Developer?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "giant_bomb" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest year for the Bethesda Game Studios Developer?`:
```sql
|
SELECT MIN("year") FROM "giant_bomb" WHERE "game"='the elder scrolls v: skyrim'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest year for the game called The Elder Scrolls v: Skyrim?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "giant_bomb" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest year for the game called The Elder Scrolls v: Skyrim?`:
```sql
|
SELECT "genre" FROM "giant_bomb" WHERE "developer_s"='naughty dog'; |
## Task
Generate a SQL query to answer the following question:
`What game was developed by Naughty Dog?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "giant_bomb" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What game was developed by Naughty Dog?`:
```sql
|
SELECT "imed_avicenna_listed" FROM "current_medical_schools_in_the_caribbean" WHERE "regional_offshore"='offshore' AND "country_territory"='saint kitts and nevis' AND "degree"='md' AND "established"<2000; |
## Task
Generate a SQL query to answer the following question:
`What is the imed/avicenna listed for a medical school offshore in saint kitts and nevis which was established before 2000 and will give you an MD?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_medical_schools_in_the_caribbean" (
"country_territory" text,
"established" real,
"degree" text,
"regional_offshore" text,
"imed_avicenna_listed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the imed/avicenna listed for a medical school offshore in saint kitts and nevis which was established before 2000 and will give you an MD?`:
```sql
|
SELECT "country_territory" FROM "current_medical_schools_in_the_caribbean" WHERE "imed_avicenna_listed"='both' AND "established"=1969; |
## Task
Generate a SQL query to answer the following question:
`What country has a medical school established in 1969 with both an IMED and avicenna?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_medical_schools_in_the_caribbean" (
"country_territory" text,
"established" real,
"degree" text,
"regional_offshore" text,
"imed_avicenna_listed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a medical school established in 1969 with both an IMED and avicenna?`:
```sql
|
SELECT AVG("established") FROM "current_medical_schools_in_the_caribbean" WHERE "country_territory"='dominican republic'; |
## Task
Generate a SQL query to answer the following question:
`What is the average year that the medical school in dominican republic was established?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_medical_schools_in_the_caribbean" (
"country_territory" text,
"established" real,
"degree" text,
"regional_offshore" text,
"imed_avicenna_listed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average year that the medical school in dominican republic was established?`:
```sql
|
SELECT MAX("wins") FROM "2010_ladder" WHERE "against"=1637 AND "byes">0; |
## Task
Generate a SQL query to answer the following question:
`What are the most wins with byes more than 0 and 1637 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the most wins with byes more than 0 and 1637 against?`:
```sql
|
SELECT COUNT("byes") FROM "2010_ladder" WHERE "losses">4 AND "sunrayia_fl"='red cliffs' AND "against">2422; |
## Task
Generate a SQL query to answer the following question:
`What are the total byes for the Red Cliffs with more than 4 losses and more than 2422 against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the total byes for the Red Cliffs with more than 4 losses and more than 2422 against?`:
```sql
|
SELECT COUNT("wins") FROM "2010_ladder" WHERE "sunrayia_fl"='wentworth' AND "byes"<0; |
## Task
Generate a SQL query to answer the following question:
`What's the total wins for Wentworth with less than 0 byes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2010_ladder" (
"sunrayia_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total wins for Wentworth with less than 0 byes?`:
```sql
|
SELECT "venue" FROM "fa_premier_league" WHERE "opponent"='sunderland' AND "result"='1-1'; |
## Task
Generate a SQL query to answer the following question:
`Which venue had an opponent of Sunderland and a result of a 1-1 draw?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fa_premier_league" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue had an opponent of Sunderland and a result of a 1-1 draw?`:
```sql
|
SELECT COUNT("attendance") FROM "fa_premier_league" WHERE "opponent"='middlesbrough' AND "result"='3-1'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of attendance values for ties having an opponent of Middlesbrough and result of 3-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fa_premier_league" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of attendance values for ties having an opponent of Middlesbrough and result of 3-1?`:
```sql
|
SELECT "venue" FROM "fa_premier_league" WHERE "result"='3-0'; |
## Task
Generate a SQL query to answer the following question:
`Which venue ended in a 3-0 result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fa_premier_league" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue ended in a 3-0 result?`:
```sql
|
SELECT "venue" FROM "football_league_first_division" WHERE "result"='0-5'; |
## Task
Generate a SQL query to answer the following question:
`Where was a 0-5 game played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "football_league_first_division" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Where was a 0-5 game played?`:
```sql
|
SELECT AVG("rank") FROM "season" WHERE "matches"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank of a player with fewer than 3 matches?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"matches" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank of a player with fewer than 3 matches?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "date"='april 21'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent on April 21?`
### 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 on April 21?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "location_attendance"='the omni' AND "date"='april 12'; |
## Task
Generate a SQL query to answer the following question:
`What's the record on April 12 when the location was The Omni?`
### 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 `What's the record on April 12 when the location was The Omni?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "score"='score'; |
## Task
Generate a SQL query to answer the following question:
`What date was the score "score"?`
### 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 `What date was the score "score"?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "date"='april 12'; |
## Task
Generate a SQL query to answer the following question:
`What was the score on April 12?`
### 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 `What was the score on April 12?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "game"='77'; |
## Task
Generate a SQL query to answer the following question:
`What's the score of game 77?`
### 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 `What's the score of game 77?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='43-34'; |
## Task
Generate a SQL query to answer the following question:
`What date had a record of 43-34?`
### 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 `What date had a record of 43-34?`:
```sql
|
SELECT "artist" FROM "results_of_heat_2" WHERE "percentage"='17.14%'; |
## Task
Generate a SQL query to answer the following question:
`What Artist had a Percentage of 17.14%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_heat_2" (
"draw" real,
"artist" text,
"song" text,
"percentage" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Artist had a Percentage of 17.14%?`:
```sql
|
SELECT "percentage" FROM "results_of_heat_2" WHERE "place"=5; |
## Task
Generate a SQL query to answer the following question:
`What Percentage has a Place of 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results_of_heat_2" (
"draw" real,
"artist" text,
"song" text,
"percentage" text,
"place" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Percentage has a Place of 5?`:
```sql
|
SELECT "br_number" FROM "references" WHERE "lms_number">14768; |
## Task
Generate a SQL query to answer the following question:
`Which BR number has an LMS number over 14768?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "references" (
"hr_number" real,
"name" text,
"lms_number" real,
"br_number" text,
"withdrawn" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which BR number has an LMS number over 14768?`:
```sql
|
SELECT "frequency" FROM "s_rebroadcaster_of_cjbc" WHERE "city_of_license"='belleville'; |
## Task
Generate a SQL query to answer the following question:
`what is the frequency when the city of license is belleville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cjbc" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the frequency when the city of license is belleville?`:
```sql
|
SELECT "class" FROM "s_rebroadcaster_of_cjbc" WHERE "power"='22500 watts'; |
## Task
Generate a SQL query to answer the following question:
`what is the class when the power is 22500 watts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cjbc" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the class when the power is 22500 watts?`:
```sql
|
SELECT "class" FROM "s_rebroadcaster_of_cjbc" WHERE "identifier"='cjbc-1-fm'; |
## Task
Generate a SQL query to answer the following question:
`what is the class when the identifier is cjbc-1-fm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cjbc" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the class when the identifier is cjbc-1-fm?`:
```sql
|
SELECT "rec_net" FROM "s_rebroadcaster_of_cjbc" WHERE "city_of_license"='peterborough'; |
## Task
Generate a SQL query to answer the following question:
`what is the recnet when the city of license is peterborough?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cjbc" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the recnet when the city of license is peterborough?`:
```sql
|
SELECT "power" FROM "s_rebroadcaster_of_cjbc" WHERE "city_of_license"='belleville'; |
## Task
Generate a SQL query to answer the following question:
`what is the power when the city of license is belleville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cjbc" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the power when the city of license is belleville?`:
```sql
|
SELECT "identifier" FROM "s_rebroadcaster_of_cjbc" WHERE "power"='22500 watts'; |
## Task
Generate a SQL query to answer the following question:
`what is the identifier when the power is 22500 watts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "s_rebroadcaster_of_cjbc" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the identifier when the power is 22500 watts?`:
```sql
|
SELECT MIN("opponents") FROM "schedule" WHERE "date"='nov. 25'; |
## Task
Generate a SQL query to answer the following question:
`What is the Opponents in the game with a Date of nov. 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"dolphins_points" real,
"opponents" real,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Opponents in the game with a Date of nov. 25?`:
```sql
|
SELECT "games" FROM "all_time_records" WHERE "name"='leandro love'; |
## Task
Generate a SQL query to answer the following question:
`How many games does leandro love have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_records" (
"name" text,
"games" text,
"a_league" text,
"finals" text,
"goals" real,
"assists" real,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many games does leandro love have?`:
```sql
|
SELECT MIN("goals") FROM "all_time_records" WHERE "years"='2007/08' AND "name"='joe keenan' AND "assists">1; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of goals joe keenan, who has more than 1 assists, had in 2007/08?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_records" (
"name" text,
"games" text,
"a_league" text,
"finals" text,
"goals" real,
"assists" real,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of goals joe keenan, who has more than 1 assists, had in 2007/08?`:
```sql
|
SELECT MIN("goals") FROM "all_time_records" WHERE "games"='9 (0)' AND "assists"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of goals of the player with 9 (0) games and less than 0 assists?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_records" (
"name" text,
"games" text,
"a_league" text,
"finals" text,
"goals" real,
"assists" real,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of goals of the player with 9 (0) games and less than 0 assists?`:
```sql
|
SELECT "finals" FROM "all_time_records" WHERE "goals">0 AND "assists"=8; |
## Task
Generate a SQL query to answer the following question:
`How many finals had more than 0 goals and 8 assists?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_records" (
"name" text,
"games" text,
"a_league" text,
"finals" text,
"goals" real,
"assists" real,
"years" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many finals had more than 0 goals and 8 assists?`:
```sql
|
SELECT MIN("rank") FROM "heats" WHERE "nationality"='united states' AND "time"='58.06' AND "heat">5; |
## Task
Generate a SQL query to answer the following question:
`When the nationality is united states, and the time is 58.06, and the heat is larger than 5 what is the lowest rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the nationality is united states, and the time is 58.06, and the heat is larger than 5 what is the lowest rank?`:
```sql
|
SELECT MAX("rank") FROM "heats" WHERE "lane">6 AND "heat"=3 AND "nationality"='colombia'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank when the lane is larger than 6, and the heat is 3, and the nationality is colombia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank when the lane is larger than 6, and the heat is 3, and the nationality is colombia?`:
```sql
|
SELECT COUNT("lane") FROM "heats" WHERE "heat">7; |
## Task
Generate a SQL query to answer the following question:
`What is the total lane for a heat larger than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total lane for a heat larger than 7?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.