output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "visitor" FROM "december" WHERE "score"='136–120'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visitor when the score was 136–120?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visitor when the score was 136–120?`:
```sql
|
SELECT "home" FROM "december" WHERE "visitor"='new york knicks'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home when the visitor was New York Knicks?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the home when the visitor was New York Knicks?`:
```sql
|
SELECT "date" FROM "december" WHERE "home"='los angeles lakers'; |
## Task
Generate a SQL query to answer the following question:
`When was the home Los Angeles Lakers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the home Los Angeles Lakers?`:
```sql
|
SELECT "visitor" FROM "december" WHERE "date"='december 15, 1976'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visitor on december 15, 1976?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visitor on december 15, 1976?`:
```sql
|
SELECT "high_points" FROM "game_log" WHERE "location_attendance"='time warner cable arena 12,096'; |
## Task
Generate a SQL query to answer the following question:
`At Time Warner Cable Arena 12,096, what was the high points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `At Time Warner Cable Arena 12,096, what was the high points?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "date"='november 2'; |
## Task
Generate a SQL query to answer the following question:
`On November 2 what was the record of the team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On November 2 what was the record of the team?`:
```sql
|
SELECT AVG("frequency_m_hz") FROM "texas" WHERE "erp_w"='62'; |
## Task
Generate a SQL query to answer the following question:
`Average frequency with ERP W of 62?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "texas" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Average frequency with ERP W of 62?`:
```sql
|
SELECT COUNT("frequency_m_hz") FROM "texas" WHERE "erp_w"='62'; |
## Task
Generate a SQL query to answer the following question:
`Total frequency with ERP W of 62?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "texas" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Total frequency with ERP W of 62?`:
```sql
|
SELECT "frequency_m_hz" FROM "texas" WHERE "call_sign"='kamy'; |
## Task
Generate a SQL query to answer the following question:
`Frequency for kamy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "texas" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" text,
"fcc_info" text
);
### SQL
Given the database schema, here is the SQL query that answers `Frequency for kamy?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "record"='23-16-1'; |
## Task
Generate a SQL query to answer the following question:
`What was the method of resolution when LaVerne Clark's record was 23-16-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the method of resolution when LaVerne Clark's record was 23-16-1?`:
```sql
|
SELECT COUNT("population") FROM "subdivisions" WHERE "english_name"='jiyang'; |
## Task
Generate a SQL query to answer the following question:
`how many subdivisions have an English Name of jiyang?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "subdivisions" (
"english_name" text,
"simplified" text,
"traditional" text,
"pinyin" text,
"area" text,
"population" real,
"density" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many subdivisions have an English Name of jiyang?`:
```sql
|
SELECT MIN("population") FROM "subdivisions" WHERE "english_name"='nanbin farm'; |
## Task
Generate a SQL query to answer the following question:
`What is the Population of the subdivision with the English Name of nanbin farm?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "subdivisions" (
"english_name" text,
"simplified" text,
"traditional" text,
"pinyin" text,
"area" text,
"population" real,
"density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Population of the subdivision with the English Name of nanbin farm?`:
```sql
|
SELECT "traditional" FROM "subdivisions" WHERE "pinyin"='hédōng qū'; |
## Task
Generate a SQL query to answer the following question:
`What is the Traditional when the Pinyin is hédōng qū?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "subdivisions" (
"english_name" text,
"simplified" text,
"traditional" text,
"pinyin" text,
"area" text,
"population" real,
"density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Traditional when the Pinyin is hédōng qū?`:
```sql
|
SELECT "traditional" FROM "subdivisions" WHERE "area"='35'; |
## Task
Generate a SQL query to answer the following question:
`What is the Traditional for area 35?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "subdivisions" (
"english_name" text,
"simplified" text,
"traditional" text,
"pinyin" text,
"area" text,
"population" real,
"density" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Traditional for area 35?`:
```sql
|
SELECT "class" FROM "german" WHERE "verb_meaning"='to run'; |
## Task
Generate a SQL query to answer the following question:
`Which class has the verb meaning of to run?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "german" (
"class" text,
"part_1" text,
"part_2" text,
"part_3" text,
"part_4" text,
"verb_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which class has the verb meaning of to run?`:
```sql
|
SELECT "part_1" FROM "german" WHERE "class"='7d'; |
## Task
Generate a SQL query to answer the following question:
`What is the entry for Part 1 for class 7d?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "german" (
"class" text,
"part_1" text,
"part_2" text,
"part_3" text,
"part_4" text,
"verb_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the entry for Part 1 for class 7d?`:
```sql
|
SELECT "part_3" FROM "german" WHERE "part_4"='giboran'; |
## Task
Generate a SQL query to answer the following question:
`What is the part 3 entry that has a part 4 entry of giboran?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "german" (
"class" text,
"part_1" text,
"part_2" text,
"part_3" text,
"part_4" text,
"verb_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the part 3 entry that has a part 4 entry of giboran?`:
```sql
|
SELECT "part_2" FROM "german" WHERE "class"='3a'; |
## Task
Generate a SQL query to answer the following question:
`What is the part 2 entry for class 3a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "german" (
"class" text,
"part_1" text,
"part_2" text,
"part_3" text,
"part_4" text,
"verb_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the part 2 entry for class 3a?`:
```sql
|
SELECT "part_4" FROM "german" WHERE "class"='7b'; |
## Task
Generate a SQL query to answer the following question:
`What is the part 4 entry for class 7b?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "german" (
"class" text,
"part_1" text,
"part_2" text,
"part_3" text,
"part_4" text,
"verb_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the part 4 entry for class 7b?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "result"='draw'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the result a draw?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the result a draw?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "competition"='2010 fifa world cup qualification' AND "result"='win'; |
## Task
Generate a SQL query to answer the following question:
`What is the score at the 2010 FIFA World Cup Qualification that results in a win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score at the 2010 FIFA World Cup Qualification that results in a win?`:
```sql
|
SELECT "power_k_w" FROM "fm_stations" WHERE "location"='cebu'; |
## Task
Generate a SQL query to answer the following question:
`What is the Power (kW) for the station located in Cebu?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Power (kW) for the station located in Cebu?`:
```sql
|
SELECT "power_k_w" FROM "fm_stations" WHERE "frequency"='95.1mhz'; |
## Task
Generate a SQL query to answer the following question:
`What is the Power (kW) for the station with a frequency of 95.1mhz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Power (kW) for the station with a frequency of 95.1mhz?`:
```sql
|
SELECT "callsign" FROM "fm_stations" WHERE "branding"='93dot5 home radio cagayan de oro'; |
## Task
Generate a SQL query to answer the following question:
`What is the Callsign for the station with the branding 93dot5 home radio Cagayan De Oro?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Callsign for the station with the branding 93dot5 home radio Cagayan De Oro?`:
```sql
|
SELECT "frequency" FROM "fm_stations" WHERE "branding"='94dot3 home radio palawan'; |
## Task
Generate a SQL query to answer the following question:
`What is the frequency for the station with the branding of 94dot3 home radio Palawan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency for the station with the branding of 94dot3 home radio Palawan?`:
```sql
|
SELECT "branding" FROM "fm_stations" WHERE "location"='zamboanga'; |
## Task
Generate a SQL query to answer the following question:
`What is the Branding for the station located in Zamboanga?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Branding for the station located in Zamboanga?`:
```sql
|
SELECT "power_k_w" FROM "fm_stations" WHERE "frequency"='98.7mhz'; |
## Task
Generate a SQL query to answer the following question:
`What is the Power (kW) for the station with the frequency of 98.7mhz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Power (kW) for the station with the frequency of 98.7mhz?`:
```sql
|
SELECT COUNT("total") FROM "medal_table" WHERE "nation"='denmark'; |
## Task
Generate a SQL query to answer the following question:
`What is the medal total of Denmark?`
### 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,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the medal total of Denmark?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "game">24 AND "date"='december 19'; |
## Task
Generate a SQL query to answer the following question:
`What is the record of the game with a game number greater than 24 on December 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of the game with a game number greater than 24 on December 19?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "high_assists"='beno udrih (4)' AND "game"=26; |
## Task
Generate a SQL query to answer the following question:
`What is the record of game 26 with beno udrih (4) as the highest assists?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of game 26 with beno udrih (4) as the highest assists?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "game"=25; |
## Task
Generate a SQL query to answer the following question:
`What is the score of game 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of game 25?`:
```sql
|
SELECT MAX("draw") FROM "result_of_national_final" WHERE "song"='u ritmu ljubavi' AND "points">87; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE DRAW FOR u ritmu ljubavi, POINTS LARGER THAN 87?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "result_of_national_final" (
"draw" real,
"song" text,
"performer" text,
"points" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE DRAW FOR u ritmu ljubavi, POINTS LARGER THAN 87?`:
```sql
|
SELECT "draw" FROM "result_of_national_final" WHERE "performer"='andrea cubric'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE DRAW FOR PERFORMER ANDREA CUBRIC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "result_of_national_final" (
"draw" real,
"song" text,
"performer" text,
"points" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE DRAW FOR PERFORMER ANDREA CUBRIC?`:
```sql
|
SELECT AVG("game") FROM "game_log" WHERE "record"='30-22'; |
## Task
Generate a SQL query to answer the following question:
`What is the game number when the record is 30-22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the game number when the record is 30-22?`:
```sql
|
SELECT "location" FROM "game_log" WHERE "score"='w 82-76'; |
## Task
Generate a SQL query to answer the following question:
`At what location was the score W 82-76?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `At what location was the score W 82-76?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "location"='rose garden'; |
## Task
Generate a SQL query to answer the following question:
`What was the record when the game was at the Rose Garden?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the record when the game was at the Rose Garden?`:
```sql
|
SELECT MAX("games") FROM "managers_test_games_only" WHERE "draws">0 AND "lost"=11; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of games with more than 0 draws and 11 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managers_test_games_only" (
"name" text,
"period" text,
"games" real,
"wins" real,
"draws" real,
"lost" real,
"win_ratio" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of games with more than 0 draws and 11 losses?`:
```sql
|
SELECT "1994" FROM "singles_performance_timeline" WHERE "1998"='2r'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1994 finish in the event that had a 1998 finish of 2R?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"career_sr" text,
"career_win_loss" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1994 finish in the event that had a 1998 finish of 2R?`:
```sql
|
SELECT "tournament" FROM "singles_performance_timeline" WHERE "1996"='a' AND "1998"='a' AND "1994"='rr'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament had a 1994 finish of RR and 1996 and 1998 finishes of A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"career_sr" text,
"career_win_loss" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament had a 1994 finish of RR and 1996 and 1998 finishes of A?`:
```sql
|
SELECT "1994" FROM "singles_performance_timeline" WHERE "1997"='qf' AND "1995"='3r'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1994 finish associated with a 1995 finish of 3R and 1997 of QF?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"career_sr" text,
"career_win_loss" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1994 finish associated with a 1995 finish of 3R and 1997 of QF?`:
```sql
|
SELECT "1999" FROM "singles_performance_timeline" WHERE "tournament"='rome'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1999 finish for the tournament in Rome?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"career_sr" text,
"career_win_loss" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1999 finish for the tournament in Rome?`:
```sql
|
SELECT "1991" FROM "singles_performance_timeline" WHERE "1993"='grand slams'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1991 finish for the 1993 Grand Slams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"career_sr" text,
"career_win_loss" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1991 finish for the 1993 Grand Slams?`:
```sql
|
SELECT "playoff_apps" FROM "appearances_and_goals" WHERE "position"='df' AND "name"='thomas heary'; |
## Task
Generate a SQL query to answer the following question:
`What was the playoff apps for Thomas Heary, that had the position df?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"squad_no" real,
"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,
"flt_apps" text,
"flt_goals" real,
"playoff_apps" text,
"playoff_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the playoff apps for Thomas Heary, that had the position df?`:
```sql
|
SELECT MIN("squad_no") FROM "appearances_and_goals" WHERE "total_goals">6 AND "league_goals"<8 AND "playoff_goals">0; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest squad number with more than 6 goals, fewer than 8 league goals, and more than 0 playoff goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"squad_no" real,
"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,
"flt_apps" text,
"flt_goals" real,
"playoff_apps" text,
"playoff_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest squad number with more than 6 goals, fewer than 8 league goals, and more than 0 playoff goals?`:
```sql
|
SELECT SUM("total_goals") FROM "appearances_and_goals" WHERE "playoff_apps"='2' AND "fa_cup_apps"='2' AND "league_cup_goals"<0; |
## Task
Generate a SQL query to answer the following question:
`How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "appearances_and_goals" (
"squad_no" real,
"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,
"flt_apps" text,
"flt_goals" real,
"playoff_apps" text,
"playoff_goals" real,
"total_apps" text,
"total_goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get?`:
```sql
|
SELECT "title" FROM "highest_grossing_films_of_1999" WHERE "rank"=9; |
## Task
Generate a SQL query to answer the following question:
`Which title had rank 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_films_of_1999" (
"rank" real,
"title" text,
"studio" text,
"director_s" text,
"worldwide_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title had rank 9?`:
```sql
|
SELECT "title" FROM "highest_grossing_films_of_1999" WHERE "rank"=7; |
## Task
Generate a SQL query to answer the following question:
`Which title placed in rank 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_films_of_1999" (
"rank" real,
"title" text,
"studio" text,
"director_s" text,
"worldwide_gross" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which title placed in rank 7?`:
```sql
|
SELECT "volume_issue" FROM "rpm_singles_chart_january_2000_november_" WHERE "artist"='santana featuring the product g&b'; |
## Task
Generate a SQL query to answer the following question:
`shows for the artist Santana featuring the product g&b?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rpm_singles_chart_january_2000_november_" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" text,
"song" text,
"artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `shows for the artist Santana featuring the product g&b?`:
```sql
|
SELECT "volume_issue" FROM "rpm_singles_chart_january_2000_november_" WHERE "weeks_on_top"='3' AND "artist"='third eye blind'; |
## Task
Generate a SQL query to answer the following question:
`What volume 3 weeks on top for Third Eye Blind?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rpm_singles_chart_january_2000_november_" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" text,
"song" text,
"artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `What volume 3 weeks on top for Third Eye Blind?`:
```sql
|
SELECT "artist" FROM "rpm_singles_chart_january_2000_november_" WHERE "song"='\" bang bang boom \"'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the artist of " bang bang boom "?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rpm_singles_chart_january_2000_november_" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" text,
"song" text,
"artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the artist of " bang bang boom "?`:
```sql
|
SELECT "song" FROM "rpm_singles_chart_january_2000_november_" WHERE "volume_issue"='70:8-9'; |
## Task
Generate a SQL query to answer the following question:
`What is the song name with a Volume:Issue was 70:8-9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rpm_singles_chart_january_2000_november_" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" text,
"song" text,
"artist" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the song name with a Volume:Issue was 70:8-9?`:
```sql
|
SELECT "music_video" FROM "music_videos" WHERE "album"='high society' AND "length"='3:50'; |
## Task
Generate a SQL query to answer the following question:
`What was the music video that was from the album High Society, with a length of 3:50?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "music_videos" (
"year" real,
"music_video" text,
"length" text,
"album" text,
"official_mv_on_you_tube" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the music video that was from the album High Society, with a length of 3:50?`:
```sql
|
SELECT "music_video" FROM "music_videos" WHERE "album"='map of the human soul'; |
## Task
Generate a SQL query to answer the following question:
`Which music video was from the album Map of the Human Soul?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "music_videos" (
"year" real,
"music_video" text,
"length" text,
"album" text,
"official_mv_on_you_tube" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which music video was from the album Map of the Human Soul?`:
```sql
|
SELECT "agg" FROM "eighth_finals" WHERE "team_2"='cementarnica'; |
## Task
Generate a SQL query to answer the following question:
`What is the agg when team 2 was Cementarnica?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighth_finals" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the agg when team 2 was Cementarnica?`:
```sql
|
SELECT COUNT("podiums") FROM "by_seasons_and_teams" WHERE "fastest_laps">4 AND "races"<149; |
## Task
Generate a SQL query to answer the following question:
`What are the total number of podiums for more than 4 laps, and less than 149 races?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_seasons_and_teams" (
"season" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What are the total number of podiums for more than 4 laps, and less than 149 races?`:
```sql
|
SELECT COUNT("score") FROM "first_round" WHERE "country"='fiji'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the golfer from the country of fiji?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the golfer from the country of fiji?`:
```sql
|
SELECT SUM("score") FROM "first_round" WHERE "to_par"='e' AND "country"='united states'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the golfer from the united states who had a To par of e?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the golfer from the united states who had a To par of e?`:
```sql
|
SELECT "player" FROM "first_round" WHERE "country"='united states' AND "place"='t10'; |
## Task
Generate a SQL query to answer the following question:
`Which united states player finished with a place of t10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which united states player finished with a place of t10?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "format"='stereo lp' AND "catalog"='scyl-934,623'; |
## Task
Generate a SQL query to answer the following question:
`What label uses the stereo LP for catalog scyl-934,623?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What label uses the stereo LP for catalog scyl-934,623?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "region"='new zealand' AND "catalog"='cy-24623'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the catalog cy-24623 for New Zealand?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the catalog cy-24623 for New Zealand?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "catalog"='scyl-934,623' AND "region"='australia'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the catalog scyl-934,623 for Australia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the catalog scyl-934,623 for Australia?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "catalog"='y8hr 1006' AND "date"='1972'; |
## Task
Generate a SQL query to answer the following question:
`Which label has a catalog of y8hr 1006 in 1972?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which label has a catalog of y8hr 1006 in 1972?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "format"='stereo compact cassette'; |
## Task
Generate a SQL query to answer the following question:
`What catalog uses the stereo compact cassette format?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What catalog uses the stereo compact cassette format?`:
```sql
|
SELECT AVG("game") FROM "game_log" WHERE "date"='december 6'; |
## Task
Generate a SQL query to answer the following question:
`What is the average game that has December 6 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average game that has December 6 as the date?`:
```sql
|
SELECT AVG("game") FROM "game_log" WHERE "date"='december 17'; |
## Task
Generate a SQL query to answer the following question:
`What is the average game that has December 17 as the date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average game that has December 17 as the date?`:
```sql
|
SELECT AVG("total") FROM "medal_table" WHERE "silver"=0 AND "rank"='6' AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the average Total that had the Silver of 0, and the Rank of 6, and the Gold smaller 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,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the average Total that had the Silver of 0, and the Rank of 6, and the Gold smaller than 0?`:
```sql
|
SELECT MAX("gold") FROM "medal_table" WHERE "bronze">3 AND "total"<24; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the highest Gold that has the Bronze larger than 3, and the Total smaller than 24?`
### 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,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the highest Gold that has the Bronze larger than 3, and the Total smaller than 24?`:
```sql
|
SELECT MAX("gold") FROM "medal_table" WHERE "bronze"<1 AND "total">4; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the highest Gold that has the Bronze smaller than 1, and the Total larger than 4?`
### 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,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the highest Gold that has the Bronze smaller than 1, and the Total larger than 4?`:
```sql
|
SELECT AVG("all_nurses") FROM "table_3_total_number_of_available_human_" WHERE "ho_population_ratio"='1:16,791'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of nurses in the region with an HO : Population Ratio of 1:16,791?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_3_total_number_of_available_human_" (
"region" text,
"physician_gp_specialist" real,
"physician_population_ratio" text,
"health_officer" real,
"ho_population_ratio" text,
"all_nurses" real,
"nurse_population_ratio" text,
"mid_wives" text,
"mid_wife_population_ratio" text,
"hew" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of nurses in the region with an HO : Population Ratio of 1:16,791?`:
```sql
|
SELECT MIN("physician_gp_specialist") FROM "table_3_total_number_of_available_human_" WHERE "all_nurses"=91; |
## Task
Generate a SQL query to answer the following question:
`What is the number of physicians in the region with an all nurses number of 91?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_3_total_number_of_available_human_" (
"region" text,
"physician_gp_specialist" real,
"physician_population_ratio" text,
"health_officer" real,
"ho_population_ratio" text,
"all_nurses" real,
"nurse_population_ratio" text,
"mid_wives" text,
"mid_wife_population_ratio" text,
"hew" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of physicians in the region with an all nurses number of 91?`:
```sql
|
SELECT "moving_from" FROM "in" WHERE "type"='transfer' AND "name"='andy webster'; |
## Task
Generate a SQL query to answer the following question:
`What is Moving, when Type is "Transfer", and when Name is "Andy Webster"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "in" (
"nat" text,
"name" text,
"moving_from" text,
"type" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Moving, when Type is "Transfer", and when Name is "Andy Webster"?`:
```sql
|
SELECT "moving_from" FROM "in" WHERE "ends"<2011; |
## Task
Generate a SQL query to answer the following question:
`What is Moving From, when Ends is before 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "in" (
"nat" text,
"name" text,
"moving_from" text,
"type" text,
"transfer_window" text,
"ends" real,
"transfer_fee" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Moving From, when Ends is before 2011?`:
```sql
|
SELECT "category" FROM "awards_and_nominations" WHERE "year"=2011; |
## Task
Generate a SQL query to answer the following question:
`What was the category that sheridan smith was nominated for in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the category that sheridan smith was nominated for in 2011?`:
```sql
|
SELECT "award" FROM "awards_and_nominations" WHERE "nominated_work"='flare path' AND "category"='best featured actress in a play'; |
## Task
Generate a SQL query to answer the following question:
`What ward was she nominated at for her work, Flare Path for the category of best featured actress in a play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What ward was she nominated at for her work, Flare Path for the category of best featured actress in a play?`:
```sql
|
SELECT "result" FROM "awards_and_nominations" WHERE "category"='best actress in a musical' AND "award"='laurence olivier award' AND "year"=2009; |
## Task
Generate a SQL query to answer the following question:
`What is the result for the nomination at the Laurence Olivier award in 2009 for best actress in a musical?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nominated_work" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result for the nomination at the Laurence Olivier award in 2009 for best actress in a musical?`:
```sql
|
SELECT MIN("week") FROM "schedule" WHERE "opponent"='atlanta falcons'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest attendance when the Atlanta Falcons were the opponent?`
### 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 is the lowest attendance when the Atlanta Falcons were the opponent?`:
```sql
|
SELECT "date_departed" FROM "escorts" WHERE "class"='grimsby class sloop'; |
## Task
Generate a SQL query to answer the following question:
`What's the departed date for Grimsby Class Sloop?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "escorts" (
"name" text,
"class" text,
"navy" text,
"date_joined" text,
"date_departed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the departed date for Grimsby Class Sloop?`:
```sql
|
SELECT "date_departed" FROM "escorts" WHERE "navy"='royal navy' AND "name"='hms leith'; |
## Task
Generate a SQL query to answer the following question:
`What's the departed date that the HMS Leith of the Royal Navy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "escorts" (
"name" text,
"class" text,
"navy" text,
"date_joined" text,
"date_departed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the departed date that the HMS Leith of the Royal Navy?`:
```sql
|
SELECT "class" FROM "escorts" WHERE "name"='hms fowey'; |
## Task
Generate a SQL query to answer the following question:
`What's the class of the HMS Fowey?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "escorts" (
"name" text,
"class" text,
"navy" text,
"date_joined" text,
"date_departed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the class of the HMS Fowey?`:
```sql
|
SELECT "class" FROM "escorts" WHERE "name"='hms heartsease'; |
## Task
Generate a SQL query to answer the following question:
`What's the class of the HMS Heartsease?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "escorts" (
"name" text,
"class" text,
"navy" text,
"date_joined" text,
"date_departed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the class of the HMS Heartsease?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "game">15 AND "opponent"='edmonton oilers'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Record that has the Game larger than 15, and the Opponent of edmonton oilers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Record that has the Game larger than 15, and the Opponent of edmonton oilers?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "date"='11/17/1979'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Score that has the Date of 11/17/1979?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Score that has the Date of 11/17/1979?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "record"='7-7-1'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Opponent that has the Record of 7-7-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Opponent that has the Record of 7-7-1?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "opponent"='at edmonton oilers'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Score that has the Opponent of at edmonton oilers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Score that has the Opponent of at edmonton oilers?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='9-10-2'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Date thay has the Reocrd of 9-10-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Can you tell me the Date thay has the Reocrd of 9-10-2?`:
```sql
|
SELECT "fin_pos" FROM "classification" WHERE "grid"='3'; |
## Task
Generate a SQL query to answer the following question:
`What is the finishing position for the person who had a grid of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_retired" text,
"grid" text,
"laps_led" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the finishing position for the person who had a grid of 3?`:
```sql
|
SELECT "team" FROM "classification" WHERE "car_no"='15'; |
## Task
Generate a SQL query to answer the following question:
`Which team had car number 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_retired" text,
"grid" text,
"laps_led" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team had car number 15?`:
```sql
|
SELECT "laps" FROM "classification" WHERE "grid"='10'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of laps completed by the car in grid 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_retired" text,
"grid" text,
"laps_led" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of laps completed by the car in grid 10?`:
```sql
|
SELECT "driver" FROM "classification" WHERE "team"='andretti green' AND "points"='32'; |
## Task
Generate a SQL query to answer the following question:
`Which driver earned 32 points from the Andretti Green team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_retired" text,
"grid" text,
"laps_led" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver earned 32 points from the Andretti Green team?`:
```sql
|
SELECT "date" FROM "launch_history" WHERE "serial"='10b'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for the 10b serial?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "launch_history" (
"date" text,
"time_gmt" text,
"serial" text,
"apogee" text,
"outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date for the 10b serial?`:
```sql
|
SELECT "team" FROM "final_table" WHERE "goals_against"<64 AND "points_2"=63 AND "goals_for"=101; |
## Task
Generate a SQL query to answer the following question:
`What team has less than 64 goals against, 101 goals for, and a Points 2 total of 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_average_1" real,
"points_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team has less than 64 goals against, 101 goals for, and a Points 2 total of 63?`:
```sql
|
SELECT AVG("points_2") FROM "final_table" WHERE "played">46; |
## Task
Generate a SQL query to answer the following question:
`What is the Points 2 average of teams that have played more than 46 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"team" text,
"played" real,
"drawn" real,
"lost" real,
"goals_for" real,
"goals_against" real,
"goal_average_1" real,
"points_2" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Points 2 average of teams that have played more than 46 games?`:
```sql
|
SELECT "mkhedruli" FROM "georgian_alphabets" WHERE "asomtavruli"='ⴒ'; |
## Task
Generate a SQL query to answer the following question:
`What is the Mkhedruli symbol for the Asomtavruli ⴒ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "georgian_alphabets" (
"asomtavruli" text,
"nuskhuri" text,
"mkhedruli" text,
"letter_name" text,
"phoneme" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Mkhedruli symbol for the Asomtavruli ⴒ?`:
```sql
|
SELECT "letter_name" FROM "georgian_alphabets" WHERE "asomtavruli"='ⴙ'; |
## Task
Generate a SQL query to answer the following question:
`What is the letter name for the Asomtavruli ⴙ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "georgian_alphabets" (
"asomtavruli" text,
"nuskhuri" text,
"mkhedruli" text,
"letter_name" text,
"phoneme" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the letter name for the Asomtavruli ⴙ?`:
```sql
|
SELECT "phoneme" FROM "georgian_alphabets" WHERE "nuskhuri"='ⴥ'; |
## Task
Generate a SQL query to answer the following question:
`What is the Phoneme symbol for ⴥ in Nuskhuri?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "georgian_alphabets" (
"asomtavruli" text,
"nuskhuri" text,
"mkhedruli" text,
"letter_name" text,
"phoneme" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Phoneme symbol for ⴥ in Nuskhuri?`:
```sql
|
SELECT "phoneme" FROM "georgian_alphabets" WHERE "letter_name"='zɛn'; |
## Task
Generate a SQL query to answer the following question:
`What is the Phoneme symbol for the letter name zɛn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "georgian_alphabets" (
"asomtavruli" text,
"nuskhuri" text,
"mkhedruli" text,
"letter_name" text,
"phoneme" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Phoneme symbol for the letter name zɛn?`:
```sql
|
SELECT "nuskhuri" FROM "georgian_alphabets" WHERE "asomtavruli"='ⴋ'; |
## Task
Generate a SQL query to answer the following question:
`What is teh Nuskhuri symbol for ⴋ in Asomtavruli?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "georgian_alphabets" (
"asomtavruli" text,
"nuskhuri" text,
"mkhedruli" text,
"letter_name" text,
"phoneme" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is teh Nuskhuri symbol for ⴋ in Asomtavruli?`:
```sql
|
SELECT AVG("pick_num") FROM "nfl_draft" WHERE "position"='linebacker' AND "player"='bob bruenig' AND "round"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the average value for Pick #, when Position is Linebacker, when Player is Bob Bruenig, and when Round is less than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average value for Pick #, when Position is Linebacker, when Player is Bob Bruenig, and when Round is less than 3?`:
```sql
|
SELECT SUM("pick_num") FROM "nfl_draft" WHERE "position"='guard' AND "round">2; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Pick #, when Position is Guard, and when Round is greater than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Pick #, when Position is Guard, and when Round is greater than 2?`:
```sql
|
SELECT AVG("round") FROM "nfl_draft" WHERE "pick_num">70 AND "position"='tackle'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Round, when Pick # is greater than 70, and when Position is Tackle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Round, when Pick # is greater than 70, and when Position is Tackle?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.