output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MAX("heat") FROM "heats" WHERE "nationality"='poland' AND "lane"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the highest heat when the nationality is poland, and the lane is smaller than 6?`
### 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 heat when the nationality is poland, and the lane is smaller than 6?`:
```sql
|
SELECT SUM("lead_pitch_mm") FROM "type_ii" WHERE "body_width_mm">10.16; |
## Task
Generate a SQL query to answer the following question:
`Which Lead Pitch/mm has a Body Width/mm larger than 10.16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "type_ii" (
"part_number" text,
"pins" text,
"body_width_mm" real,
"body_length_mm" real,
"lead_pitch_mm" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lead Pitch/mm has a Body Width/mm larger than 10.16?`:
```sql
|
SELECT SUM("body_width_mm") FROM "type_ii" WHERE "part_number"='tsop40/44' AND "body_length_mm"<18.42; |
## Task
Generate a SQL query to answer the following question:
`How much Body Width/mm has a Part Number of tsop40/44, and a Body Length/mm smaller than 18.42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "type_ii" (
"part_number" text,
"pins" text,
"body_width_mm" real,
"body_length_mm" real,
"lead_pitch_mm" real
);
### SQL
Given the database schema, here is the SQL query that answers `How much Body Width/mm has a Part Number of tsop40/44, and a Body Length/mm smaller than 18.42?`:
```sql
|
SELECT MAX("lead_pitch_mm") FROM "type_ii" WHERE "part_number"='tsop24/28'; |
## Task
Generate a SQL query to answer the following question:
`Which Lead Pitch/mm has a Part Number of tsop24/28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "type_ii" (
"part_number" text,
"pins" text,
"body_width_mm" real,
"body_length_mm" real,
"lead_pitch_mm" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lead Pitch/mm has a Part Number of tsop24/28?`:
```sql
|
SELECT MAX("silver") FROM "medal_table" WHERE "gold"=1 AND "bronze">0; |
## Task
Generate a SQL query to answer the following question:
`What is the highest amount of silver when gold is 1 and bronze larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest amount of silver when gold is 1 and bronze larger than 0?`:
```sql
|
SELECT SUM("time") FROM "final" WHERE "reaction_time"=0.164; |
## Task
Generate a SQL query to answer the following question:
`What is the Time of the Athlete with a Reaction time of 0.164?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"reaction_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Time of the Athlete with a Reaction time of 0.164?`:
```sql
|
SELECT COUNT("time") FROM "final" WHERE "lane"=4; |
## Task
Generate a SQL query to answer the following question:
`What is the Time of the Athlete in Lane 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"reaction_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Time of the Athlete in Lane 4?`:
```sql
|
SELECT SUM("lane") FROM "final" WHERE "reaction_time"<0.218 AND "time">44.74 AND "nationality"='great britain'; |
## Task
Generate a SQL query to answer the following question:
`What is the Lane of the Athlete from Great Britain with a Reaction time of less than 0.218 and a Time larger than 44.74?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final" (
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"reaction_time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Lane of the Athlete from Great Britain with a Reaction time of less than 0.218 and a Time larger than 44.74?`:
```sql
|
SELECT "tv_time" FROM "schedule" WHERE "week"=3; |
## Task
Generate a SQL query to answer the following question:
`What is the time in week 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time in week 3?`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "attendance"='73,572'; |
## Task
Generate a SQL query to answer the following question:
`What is the week with attendance of 73,572?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the week with attendance of 73,572?`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "opponent"='san diego chargers'; |
## Task
Generate a SQL query to answer the following question:
`What week was the opponent the San Diego Chargers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week was the opponent the San Diego Chargers?`:
```sql
|
SELECT MAX("week") FROM "schedule" WHERE "result"='l 38β21'; |
## Task
Generate a SQL query to answer the following question:
`What week was the result of l 38β21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What week was the result of l 38β21?`:
```sql
|
SELECT SUM("rank") FROM "single_game" WHERE "county"='galway' AND "total">13; |
## Task
Generate a SQL query to answer the following question:
`What's the total of Rank for the County of Galway and has a Total that's larger than 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total of Rank for the County of Galway and has a Total that's larger than 13?`:
```sql
|
SELECT "county" FROM "single_game" WHERE "opposition"='antrim' AND "player"='bernie forde'; |
## Task
Generate a SQL query to answer the following question:
`What County has an Opposition of Antrim and the Player Bernie Forde?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What County has an Opposition of Antrim and the Player Bernie Forde?`:
```sql
|
SELECT MAX("rank") FROM "single_game" WHERE "county"='offaly' AND "player"='mark corrigan' AND "total"<8; |
## Task
Generate a SQL query to answer the following question:
`What's the highest Rank for the County of Offaly, the Player of Mark Corrigan, and the Total that is smaller than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest Rank for the County of Offaly, the Player of Mark Corrigan, and the Total that is smaller than 8?`:
```sql
|
SELECT "channel" FROM "schedule" WHERE "opponent"='washington redskins'; |
## Task
Generate a SQL query to answer the following question:
`Which Channel has an Opponent of washington redskins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"channel" text,
"stadium" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Channel has an Opponent of washington redskins?`:
```sql
|
SELECT "attendance" FROM "schedule" WHERE "channel"='espn' AND "date"='september 5, 2002'; |
## Task
Generate a SQL query to answer the following question:
`Which attendance has a Channel of espn, and a Date of september 5, 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"channel" text,
"stadium" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which attendance has a Channel of espn, and a Date of september 5, 2002?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "result"='w 27β20'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Result of w 27β20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"channel" text,
"stadium" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Result of w 27β20?`:
```sql
|
SELECT "week" FROM "schedule" WHERE "attendance"='63,447'; |
## Task
Generate a SQL query to answer the following question:
`Which Week has an Attendance of 63,447?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"channel" text,
"stadium" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Week has an Attendance of 63,447?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "stadium"='giants stadium' AND "week"<13 AND "opponent"='seattle seahawks'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Stadium of giants stadium, and a Week smaller than 13, and an Opponent of seattle seahawks?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"channel" text,
"stadium" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Stadium of giants stadium, and a Week smaller than 13, and an Opponent of seattle seahawks?`:
```sql
|
SELECT "athlete" FROM "heat_2" WHERE "react"=0.185; |
## Task
Generate a SQL query to answer the following question:
`Who was the athlete with react of 0.185?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the athlete with react of 0.185?`:
```sql
|
SELECT MIN("react") FROM "heat_2" WHERE "lane">3 AND "time"<20.3 AND "nationality"='zimbabwe' AND "rank">1; |
## Task
Generate a SQL query to answer the following question:
`What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3?`:
```sql
|
SELECT COUNT("white_both_hispanic_and_non_hispanic") FROM "racial_composition" WHERE "black_both_hispanic_and_non_hispanic"=9.9 AND "hispanic_of_any_race"<99.5; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of white (Hispanic/Non-Hispanic) having a black (Hispanic/Non-Hispanic) of 9.9 and Hispanic under 99.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of white (Hispanic/Non-Hispanic) having a black (Hispanic/Non-Hispanic) of 9.9 and Hispanic under 99.5?`:
```sql
|
SELECT AVG("black_both_hispanic_and_non_hispanic") FROM "racial_composition" WHERE "white_both_hispanic_and_non_hispanic"<61.9 AND "multiracial_both_hispanic_and_non_hispanic"<12.5 AND "hispanic_of_any_race"<99.4; |
## Task
Generate a SQL query to answer the following question:
`What is the average black value (Hispanic/Non-Hispanic) having a white (Hispanic/Non-Hispanic) under 61.9, Multiracial (Hispanic/Non-Hispanic) under 12.5 and Hispanic under 99.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average black value (Hispanic/Non-Hispanic) having a white (Hispanic/Non-Hispanic) under 61.9, Multiracial (Hispanic/Non-Hispanic) under 12.5 and Hispanic under 99.4?`:
```sql
|
SELECT MAX("amerindian_both_hispanic_and_non_hispanic") FROM "racial_composition" WHERE "black_both_hispanic_and_non_hispanic"=15.7 AND "white_both_hispanic_and_non_hispanic">69.5; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Amerindian (Hispanic/Non-Hispanic) value having a Black (Hispanic/Non-Hispanic) of 15.7 and White (Hispanic/Non-Hispanic) over 69.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Amerindian (Hispanic/Non-Hispanic) value having a Black (Hispanic/Non-Hispanic) of 15.7 and White (Hispanic/Non-Hispanic) over 69.5?`:
```sql
|
SELECT "black_both_hispanic_and_non_hispanic" FROM "racial_composition" WHERE "white_both_hispanic_and_non_hispanic"<80.6 AND "n_asia_both_hispanic_and_non_hispanic"=0.1 AND "amerindian_both_hispanic_and_non_hispanic"<0.6000000000000001 AND "municipality_2010"='vega baja'; |
## Task
Generate a SQL query to answer the following question:
`What is the Black (Hispanic/Non-Hispanic) value having a white (Hispanic/Non-Hispanic) under 80.6, Asian (Hispanic/Non-Hispanic) of 0.1, Amerindian (Hispanic/Non-Hispanic) under 0.6000000000000001, and municipality of Vega Baja?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Black (Hispanic/Non-Hispanic) value having a white (Hispanic/Non-Hispanic) under 80.6, Asian (Hispanic/Non-Hispanic) of 0.1, Amerindian (Hispanic/Non-Hispanic) under 0.6000000000000001, and municipality of Vega Baja?`:
```sql
|
SELECT "season" FROM "season_by_season_records" WHERE "pos"='3rd' AND "pld"='36' AND "div"='bbl'; |
## Task
Generate a SQL query to answer the following question:
`What season had 3rd position, a 36 pld, and a bbl div?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season had 3rd position, a 36 pld, and a bbl div?`:
```sql
|
SELECT "season" FROM "season_by_season_records" WHERE "pld"='36' AND "div"='bbl' AND "pos"='6th'; |
## Task
Generate a SQL query to answer the following question:
`What season has 36 pld, a bbl div, and 6th position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season has 36 pld, a bbl div, and 6th position?`:
```sql
|
SELECT "season" FROM "season_by_season_records" WHERE "pos"='6th' AND "pts"='36'; |
## Task
Generate a SQL query to answer the following question:
`What season had 6th position and 36 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season had 6th position and 36 points?`:
```sql
|
SELECT "season" FROM "season_by_season_records" WHERE "pos"='1st' AND "pld"='33' AND "pts"='58'; |
## Task
Generate a SQL query to answer the following question:
`What season had 1st position, 33 pld, and 58 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season had 1st position, 33 pld, and 58 points?`:
```sql
|
SELECT "player" FROM "wales" WHERE "cross_code_debut"='rl test v france' AND "year">1955 AND "int_l_debut"='ru test v ireland'; |
## Task
Generate a SQL query to answer the following question:
`Which player had a Cross Code Debut of the RL test v France, International Debut of RU Test v Ireland in years after 1955?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wales" (
"player" text,
"int_l_debut" text,
"year" real,
"cross_code_debut" text,
"date" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player had a Cross Code Debut of the RL test v France, International Debut of RU Test v Ireland in years after 1955?`:
```sql
|
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='generals'; |
## Task
Generate a SQL query to answer the following question:
`Which School has a Mascot of generals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which School has a Mascot of generals?`:
```sql
|
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aaa' AND "mascot"='saints'; |
## Task
Generate a SQL query to answer the following question:
`Which School has an IHSAA Class of aaa, and a Mascot of saints?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which School has an IHSAA Class of aaa, and a Mascot of saints?`:
```sql
|
SELECT MAX("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "location"='lagrange' AND "mascot"='panthers'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest enrollment in Lagrange where the mascot is panthers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest enrollment in Lagrange where the mascot is panthers?`:
```sql
|
SELECT AVG("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "school"='hamilton community'; |
## Task
Generate a SQL query to answer the following question:
`What is the enrollment at the school of Hamilton community?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the enrollment at the school of Hamilton community?`:
```sql
|
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aa' AND "location"='butler'; |
## Task
Generate a SQL query to answer the following question:
`What school that has a IHSAA Class of AA, in Butler?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school that has a IHSAA Class of AA, in Butler?`:
```sql
|
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "school"='hamilton community'; |
## Task
Generate a SQL query to answer the following question:
`What is the mascot at Hamilton Community?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mascot at Hamilton Community?`:
```sql
|
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "location"='lagrange' AND "ihsaa_class"='aaa'; |
## Task
Generate a SQL query to answer the following question:
`What school is in Lagrange, with an IHSAA Class of aaa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school is in Lagrange, with an IHSAA Class of aaa?`:
```sql
|
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "location"='ligonier'; |
## Task
Generate a SQL query to answer the following question:
`What school is in Ligonier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school is in Ligonier?`:
```sql
|
SELECT SUM("total") FROM "list_of_most_olympic_medals_over_career" WHERE "years"='2000β2012' AND "silver">2 AND "bronze"=0 AND "rank"<70; |
## Task
Generate a SQL query to answer the following question:
`What is the total in 2000β2012, with more than 2 silver, 0 Bronze, and a Rank smaller than 70?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_most_olympic_medals_over_career" (
"rank" real,
"nation" text,
"sport" text,
"years" text,
"games" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total in 2000β2012, with more than 2 silver, 0 Bronze, and a Rank smaller than 70?`:
```sql
|
SELECT "nation" FROM "list_of_most_olympic_medals_over_career" WHERE "sport"='shooting' AND "total"=7 AND "years"='1920'; |
## Task
Generate a SQL query to answer the following question:
`What nation scored 7 in shooting in 1920?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_most_olympic_medals_over_career" (
"rank" real,
"nation" text,
"sport" text,
"years" text,
"games" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What nation scored 7 in shooting in 1920?`:
```sql
|
SELECT AVG("round") FROM "amateur_draft" WHERE "player"='pete laframboise'; |
## Task
Generate a SQL query to answer the following question:
`What's the average Round of Pete Laframboise?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "amateur_draft" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average Round of Pete Laframboise?`:
```sql
|
SELECT "nationality" FROM "amateur_draft" WHERE "pick"=100; |
## Task
Generate a SQL query to answer the following question:
`What country is Pick 100?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "amateur_draft" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country is Pick 100?`:
```sql
|
SELECT "rowers" FROM "heat_2" WHERE "country"='great britain'; |
## Task
Generate a SQL query to answer the following question:
`Who were the rowers for Great britain?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the rowers for Great britain?`:
```sql
|
SELECT "country" FROM "heat_2" WHERE "rank"<3 AND "time"='7:28.66'; |
## Task
Generate a SQL query to answer the following question:
`What country has a time of 7:28.66 and a rank less than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a time of 7:28.66 and a rank less than 3?`:
```sql
|
SELECT "notes" FROM "heat_2" WHERE "rank">1 AND "time"='7:42.92'; |
## Task
Generate a SQL query to answer the following question:
`What are the notes when the time was 7:42.92 and the rank is more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "heat_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the notes when the time was 7:42.92 and the rank is more than 1?`:
```sql
|
SELECT "score" FROM "fourth_round_proper" WHERE "tie_no"='11'; |
## Task
Generate a SQL query to answer the following question:
`What's the score of Tie number 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_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's the score of Tie number 11?`:
```sql
|
SELECT "tie_no" FROM "fourth_round_proper" WHERE "away_team"='mansfield town'; |
## Task
Generate a SQL query to answer the following question:
`What's the tie number when the away team was Mansfield Town?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_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's the tie number when the away team was Mansfield Town?`:
```sql
|
SELECT "date" FROM "fourth_round_proper" WHERE "away_team"='newcastle united'; |
## Task
Generate a SQL query to answer the following question:
`What date was Newcastle United the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_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 date was Newcastle United the away team?`:
```sql
|
SELECT "away_team" FROM "fourth_round_proper" WHERE "home_team"='brighton & hove albion'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team when Brighton & Hove Albion was home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the away team when Brighton & Hove Albion was home?`:
```sql
|
SELECT "tie_no" FROM "fourth_round_proper" WHERE "home_team"='chelsea'; |
## Task
Generate a SQL query to answer the following question:
`What's the tie number of Chelsea when they were home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_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's the tie number of Chelsea when they were home?`:
```sql
|
SELECT "score" FROM "fourth_round_proper" WHERE "home_team"='orient'; |
## Task
Generate a SQL query to answer the following question:
`What's the score when Orient was home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fourth_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's the score when Orient was home?`:
```sql
|
SELECT "designer" FROM "season_4" WHERE "restaurant_name"='the citizen'; |
## Task
Generate a SQL query to answer the following question:
`What designer has a restaurant named The Citizen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
### SQL
Given the database schema, here is the SQL query that answers `What designer has a restaurant named The Citizen?`:
```sql
|
SELECT "original_name" FROM "season_4" WHERE "designer"='glen peloso' AND "location"='n/a'; |
## Task
Generate a SQL query to answer the following question:
`What is the original name of the place by designer Glen Peloso with a Location of n/a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the original name of the place by designer Glen Peloso with a Location of n/a?`:
```sql
|
SELECT "chef" FROM "season_4" WHERE "location"='toronto, on' AND "original_name"='n/a' AND "restaurant_name"='bagel world'; |
## Task
Generate a SQL query to answer the following question:
`What chef that has a location in Toronto, ON, that has n/a as the original name, and a Restaurant Name of Bagel World?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
### SQL
Given the database schema, here is the SQL query that answers `What chef that has a location in Toronto, ON, that has n/a as the original name, and a Restaurant Name of Bagel World?`:
```sql
|
SELECT "restaurant_name" FROM "season_4" WHERE "original_name"='essence'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the restaurant originally named Essence?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the restaurant originally named Essence?`:
```sql
|
SELECT "designer" FROM "season_4" WHERE "restaurant_name"='cork & cabbage'; |
## Task
Generate a SQL query to answer the following question:
`What designer has a restaurant named of Cork & Cabbage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
### SQL
Given the database schema, here is the SQL query that answers `What designer has a restaurant named of Cork & Cabbage?`:
```sql
|
SELECT "athlete" FROM "players_who_have_tested_positive_for_ban" WHERE "punishment"='six month suspension from iihf'; |
## Task
Generate a SQL query to answer the following question:
`Which athlete had a six month suspension from IIHF?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_who_have_tested_positive_for_ban" (
"athlete" text,
"nation" text,
"olympics" real,
"substance" text,
"punishment" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which athlete had a six month suspension from IIHF?`:
```sql
|
SELECT "bronze" FROM "world_championships_total_medals" WHERE "total"<3 AND "silver">0; |
## Task
Generate a SQL query to answer the following question:
`How many bronze medals did the team have with 0 total silver and less than 3 total medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championships_total_medals" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many bronze medals did the team have with 0 total silver and less than 3 total medals?`:
```sql
|
SELECT COUNT("bronze") FROM "world_championships_total_medals" WHERE "silver">4 AND "nation"='total' AND "gold"<30; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of bronze medals for the team with more than 4 silver and less than 30 gold medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championships_total_medals" (
"rank" text,
"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 total number of bronze medals for the team with more than 4 silver and less than 30 gold medals?`:
```sql
|
SELECT MIN("penalty_points") FROM "dressage" WHERE "judge_e"='72.22'; |
## Task
Generate a SQL query to answer the following question:
`what is the least penalty points when the judge e is 72.22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the least penalty points when the judge e is 72.22?`:
```sql
|
SELECT "judge_e" FROM "dressage" WHERE "judge_c"='56.67' AND "rider"='dag albert'; |
## Task
Generate a SQL query to answer the following question:
`what is the judge e when judge c is 56.67 and the rider is dag albert?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the judge e when judge c is 56.67 and the rider is dag albert?`:
```sql
|
SELECT "nation" FROM "dressage" WHERE "penalty_points"<40.2 AND "judge_e"='82.22'; |
## Task
Generate a SQL query to answer the following question:
`what is the nation when the penalty points is less than 40.2 and judge e is 82.22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the nation when the penalty points is less than 40.2 and judge e is 82.22?`:
```sql
|
SELECT "rank" FROM "dressage" WHERE "judge_m"='65.93' AND "judge_e"='65.56'; |
## Task
Generate a SQL query to answer the following question:
`what is the rank when judge m is 65.93 and judge e is 65.56?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the rank when judge m is 65.93 and judge e is 65.56?`:
```sql
|
SELECT "horse" FROM "dressage" WHERE "rank"='69'; |
## Task
Generate a SQL query to answer the following question:
`what is the horse that ranked 69?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the horse that ranked 69?`:
```sql
|
SELECT "production_number" FROM "1941" WHERE "director"='friz freleng' AND "title"='wacky worm, the'; |
## Task
Generate a SQL query to answer the following question:
`Name the Production Number with a Director of friz freleng, and a Title of wacky worm, the?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Production Number with a Director of friz freleng, and a Title of wacky worm, the?`:
```sql
|
SELECT "series" FROM "1941" WHERE "production_number"='95, br 1254'; |
## Task
Generate a SQL query to answer the following question:
`Name the Series with Production Number of 95, br 1254?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Series with Production Number of 95, br 1254?`:
```sql
|
SELECT "reissue" FROM "1941" WHERE "production_number"='9853'; |
## Task
Generate a SQL query to answer the following question:
`Which reissue has a Production Number of 9853?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which reissue has a Production Number of 9853?`:
```sql
|
SELECT "series" FROM "1941" WHERE "title"='elmer''s pet rabbit'; |
## Task
Generate a SQL query to answer the following question:
`Name the Series with a Title of elmer's pet rabbit?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Series with a Title of elmer's pet rabbit?`:
```sql
|
SELECT "boarding_day" FROM "houses" WHERE "type"='old' AND "house"='saunderites'; |
## Task
Generate a SQL query to answer the following question:
`What is the Boarding/Day value for a type of old and house of Saunderites?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Boarding/Day value for a type of old and house of Saunderites?`:
```sql
|
SELECT "house" FROM "houses" WHERE "abbr"='g'; |
## Task
Generate a SQL query to answer the following question:
`Which house has an abbreviation of G?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which house has an abbreviation of G?`:
```sql
|
SELECT "house" FROM "houses" WHERE "boarding_day"='day'; |
## Task
Generate a SQL query to answer the following question:
`Which house has a Boarding/Day value of Day?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which house has a Boarding/Day value of Day?`:
```sql
|
SELECT "house" FROM "houses" WHERE "abbr"='d'; |
## Task
Generate a SQL query to answer the following question:
`Which house has an abbreviation of D?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which house has an abbreviation of D?`:
```sql
|
SELECT "type" FROM "houses" WHERE "boarding_day"='boarding' AND "abbr"='b'; |
## Task
Generate a SQL query to answer the following question:
`Which type has an abbreviation of B and Boarding/Day value of Boarding?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which type has an abbreviation of B and Boarding/Day value of Boarding?`:
```sql
|
SELECT "type" FROM "houses" WHERE "colour"='dark blue'; |
## Task
Generate a SQL query to answer the following question:
`Which type has a color of Dark Blue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which type has a color of Dark Blue?`:
```sql
|
SELECT "total_tackles" FROM "statistics" WHERE "games"='16' AND "solo"='88'; |
## Task
Generate a SQL query to answer the following question:
`what is the total tackles when the games is 16 and solo is 88?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" real,
"team" text,
"league" text,
"games" text,
"total_tackles" text,
"solo" text,
"tfl" text,
"sacks" text,
"int" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total tackles when the games is 16 and solo is 88?`:
```sql
|
SELECT "team" FROM "statistics" WHERE "sacks"='0' AND "season"<1998; |
## Task
Generate a SQL query to answer the following question:
`what is the team when sacks is 0 and the season is earlier than 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" real,
"team" text,
"league" text,
"games" text,
"total_tackles" text,
"solo" text,
"tfl" text,
"sacks" text,
"int" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the team when sacks is 0 and the season is earlier than 1998?`:
```sql
|
SELECT "solo" FROM "statistics" WHERE "total_tackles"='6'; |
## Task
Generate a SQL query to answer the following question:
`what is solo when total tackles is 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "statistics" (
"season" real,
"team" text,
"league" text,
"games" text,
"total_tackles" text,
"solo" text,
"tfl" text,
"sacks" text,
"int" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is solo when total tackles is 6?`:
```sql
|
SELECT MIN("fa_cup_goals") FROM "appearances_and_goals" WHERE "name"='dick taylor' AND "league_goals"<0; |
## Task
Generate a SQL query to answer the following question:
`How many FA cup goals did dick taylor score in the year that he had 0 league goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many FA cup goals did dick taylor score in the year that he had 0 league goals?`:
```sql
|
SELECT COUNT("total_goals") FROM "appearances_and_goals" WHERE "league_cup_apps"='2' AND "fa_cup_goals"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the goals number of goals for the player who had 2 league cup apps and 0 FA cup goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the goals number of goals for the player who had 2 league cup apps and 0 FA cup goals?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week"=11; |
## Task
Generate a SQL query to answer the following question:
`What was the result of week 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of week 11?`:
```sql
|
SELECT COUNT("time") FROM "semifinal_1" WHERE "name"='lisbeth trickett'; |
## Task
Generate a SQL query to answer the following question:
`What is Lisbeth Trickett's time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Lisbeth Trickett's time?`:
```sql
|
SELECT AVG("rank") FROM "semifinal_1" WHERE "time"<57.05; |
## Task
Generate a SQL query to answer the following question:
`What is the average rank for 57.05 time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rank for 57.05 time?`:
```sql
|
SELECT COUNT("lane") FROM "semifinal_1" WHERE "nationality"='great britain' AND "time">57.78; |
## Task
Generate a SQL query to answer the following question:
`What lane is from Great Britain and a 57.78 time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What lane is from Great Britain and a 57.78 time?`:
```sql
|
SELECT "owner" FROM "analogue_terrestrial_television" WHERE "broadcasting_area"='sanam pao'; |
## Task
Generate a SQL query to answer the following question:
`Who's the owner of Sanam Pao as the broadcasting area?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the owner of Sanam Pao as the broadcasting area?`:
```sql
|
SELECT "owner" FROM "analogue_terrestrial_television" WHERE "broadcasting_hours"='24-hours' AND "channel_bkk"='3/32 (vhf/uhf)'; |
## Task
Generate a SQL query to answer the following question:
`Who's the owner of channel 3/32 (vhf/uhf) broadcasting 24-hours?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the owner of channel 3/32 (vhf/uhf) broadcasting 24-hours?`:
```sql
|
SELECT "owner" FROM "analogue_terrestrial_television" WHERE "name"='thai pbs'; |
## Task
Generate a SQL query to answer the following question:
`Who's the owner of Thai PBS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who's the owner of Thai PBS?`:
```sql
|
SELECT "network" FROM "analogue_terrestrial_television" WHERE "name"='bbtv channel 7'; |
## Task
Generate a SQL query to answer the following question:
`What's the network of BBTV Channel 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the network of BBTV Channel 7?`:
```sql
|
SELECT "name" FROM "analogue_terrestrial_television" WHERE "channel_bkk"='29 (uhf)'; |
## Task
Generate a SQL query to answer the following question:
`What's the name of Channel 29 (UHF)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the name of Channel 29 (UHF)?`:
```sql
|
SELECT "broadcasting_hours" FROM "analogue_terrestrial_television" WHERE "network"='nbt'; |
## Task
Generate a SQL query to answer the following question:
`What's the broadcasting hours of NBT?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the broadcasting hours of NBT?`:
```sql
|
SELECT "runner_s_up" FROM "lpga_tour_wins_13" WHERE "date"='may 26, 1996'; |
## Task
Generate a SQL query to answer the following question:
`Who were the runners-up in the tournament on May 26, 1996?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the runners-up in the tournament on May 26, 1996?`:
```sql
|
SELECT "tournament" FROM "lpga_tour_wins_13" WHERE "runner_s_up"='val skinner'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament had a runner-up of Val Skinner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament had a runner-up of Val Skinner?`:
```sql
|
SELECT "winning_score" FROM "lpga_tour_wins_13" WHERE "date"='apr 29, 2001'; |
## Task
Generate a SQL query to answer the following question:
`What was Rosie's winning score on Apr 29, 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Rosie's winning score on Apr 29, 2001?`:
```sql
|
SELECT "release_date" FROM "1947" WHERE "production_number"='1018, br 1352'; |
## Task
Generate a SQL query to answer the following question:
`What was the release date of the feature with a production number of 1018, BR 1352?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1947" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the release date of the feature with a production number of 1018, BR 1352?`:
```sql
|
SELECT "reissue" FROM "1947" WHERE "title"='catch as cats can'; |
## Task
Generate a SQL query to answer the following question:
`What is the reissue value for the feature titled "Catch as Cats Can"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1947" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the reissue value for the feature titled "Catch as Cats Can"?`:
```sql
|
SELECT "name" FROM "assembly_segments" WHERE "constituency_number"='150'; |
## Task
Generate a SQL query to answer the following question:
`what is the name when the constituency number is 150?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the name when the constituency number is 150?`:
```sql
|
SELECT COUNT("number_of_electorates_2009") FROM "assembly_segments" WHERE "name"='govindpura'; |
## Task
Generate a SQL query to answer the following question:
`what is the total number of electorates (2009) when the name is govindpura?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total number of electorates (2009) when the name is govindpura?`:
```sql
|
SELECT COUNT("rank") FROM "top_ten_medals" WHERE "province"='si sa ket' AND "bronze"<14; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of Si Sa Ket province with less than 14 bronze medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_ten_medals" (
"rank" real,
"province" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of Si Sa Ket province with less than 14 bronze medals?`:
```sql
|
SELECT MAX("total") FROM "top_ten_medals" WHERE "silver"<40 AND "rank"=3; |
## Task
Generate a SQL query to answer the following question:
`How many total medals does rank 3 with less than 40 silver medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_ten_medals" (
"rank" real,
"province" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total medals does rank 3 with less than 40 silver medals?`:
```sql
|
SELECT AVG("gold") FROM "top_ten_medals" WHERE "bronze"=25 AND "rank"<9; |
## Task
Generate a SQL query to answer the following question:
`How many average gold medals for provinces higher than rank 9 with 25 bronzes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_ten_medals" (
"rank" real,
"province" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many average gold medals for provinces higher than rank 9 with 25 bronzes?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.