output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "margin_of_victory" FROM "pga_tour_wins_6" WHERE "tournament"='texas international open'; |
## Task
Generate a SQL query to answer the following question:
`What was the margin of victory at the Texas International Open?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_6" (
"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 the margin of victory at the Texas International Open?`:
```sql
|
SELECT "margin_of_victory" FROM "pga_tour_wins_6" WHERE "winning_score"='β3 (74-68-72-71=285)'; |
## Task
Generate a SQL query to answer the following question:
`What was the margin of victory in the tournament with a winning score of β3 (74-68-72-71=285)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_wins_6" (
"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 the margin of victory in the tournament with a winning score of β3 (74-68-72-71=285)?`:
```sql
|
SELECT SUM("avg_g") FROM "passing" WHERE "effic">129.73 AND "cmp_att_int"='333-500-13'; |
## Task
Generate a SQL query to answer the following question:
`Which Avg/G has an Effic larger than 129.73, and a Cmp-Att-Int of 333-500-13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passing" (
"name" text,
"gp_gs" text,
"effic" real,
"cmp_att_int" text,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Avg/G has an Effic larger than 129.73, and a Cmp-Att-Int of 333-500-13?`:
```sql
|
SELECT MAX("effic") FROM "passing" WHERE "avg_g"<305.6 AND "gp_gs"='13-13'; |
## Task
Generate a SQL query to answer the following question:
`Which Effic is the highest one that has an Avg/G smaller than 305.6, and a GP-GS of 13-13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passing" (
"name" text,
"gp_gs" text,
"effic" real,
"cmp_att_int" text,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Effic is the highest one that has an Avg/G smaller than 305.6, and a GP-GS of 13-13?`:
```sql
|
SELECT SUM("avg_g") FROM "passing" WHERE "name"='opponents' AND "effic"<129.73; |
## Task
Generate a SQL query to answer the following question:
`Which Avg/G that has a Name of opponents, and an Effic smaller than 129.73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passing" (
"name" text,
"gp_gs" text,
"effic" real,
"cmp_att_int" text,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Avg/G that has a Name of opponents, and an Effic smaller than 129.73?`:
```sql
|
SELECT "cmp_att_int" FROM "passing" WHERE "gp_gs"='3-0'; |
## Task
Generate a SQL query to answer the following question:
`Which Cmp-Att-Int has a GP-GS of 3-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passing" (
"name" text,
"gp_gs" text,
"effic" real,
"cmp_att_int" text,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Cmp-Att-Int has a GP-GS of 3-0?`:
```sql
|
SELECT AVG("effic") FROM "passing" WHERE "avg_g">3.7 AND "gp_gs"='13' AND "cmp_att_int"='318-521-15'; |
## Task
Generate a SQL query to answer the following question:
`Which Effic is the average one that has an Avg/G larger than 3.7, and a GP-GS of 13, and a Cmp-Att-Int of 318-521-15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passing" (
"name" text,
"gp_gs" text,
"effic" real,
"cmp_att_int" text,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Effic is the average one that has an Avg/G larger than 3.7, and a GP-GS of 13, and a Cmp-Att-Int of 318-521-15?`:
```sql
|
SELECT "home" FROM "january" WHERE "date"='january 13'; |
## Task
Generate a SQL query to answer the following question:
`Which home team was playing on January 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team was playing on January 13?`:
```sql
|
SELECT SUM("runs") FROM "performance_against_each_opponent" WHERE "high_score"=55 AND "innings">12; |
## Task
Generate a SQL query to answer the following question:
`How many runs were there when the high score was 55 and there were more than 12 innings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_against_each_opponent" (
"matches" real,
"innings" real,
"not_out" real,
"runs" real,
"high_score" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many runs were there when the high score was 55 and there were more than 12 innings?`:
```sql
|
SELECT SUM("runs") FROM "performance_against_each_opponent" WHERE "matches"=1 AND "average"<86; |
## Task
Generate a SQL query to answer the following question:
`How many runs were there when there was 1 match and les than 86 average?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "performance_against_each_opponent" (
"matches" real,
"innings" real,
"not_out" real,
"runs" real,
"high_score" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many runs were there when there was 1 match and les than 86 average?`:
```sql
|
SELECT "station" FROM "digital_channels" WHERE "programming"='me-tv'; |
## Task
Generate a SQL query to answer the following question:
`Which station has programming of Me-TV?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_channels" (
"channel" real,
"station" text,
"video" text,
"aspect" text,
"psip_short_name" text,
"programming" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which station has programming of Me-TV?`:
```sql
|
SELECT "station" FROM "digital_channels" WHERE "programming"='me-tv'; |
## Task
Generate a SQL query to answer the following question:
`Which station has programming of Me-TV?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_channels" (
"channel" real,
"station" text,
"video" text,
"aspect" text,
"psip_short_name" text,
"programming" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which station has programming of Me-TV?`:
```sql
|
SELECT "psip_short_name" FROM "digital_channels" WHERE "video"='720p' AND "programming"='main kstc-tv programming'; |
## Task
Generate a SQL query to answer the following question:
`What is the short name having video of 720p and programming of Main KSTC-TV programming?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_channels" (
"channel" real,
"station" text,
"video" text,
"aspect" text,
"psip_short_name" text,
"programming" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the short name having video of 720p and programming of Main KSTC-TV programming?`:
```sql
|
SELECT "video" FROM "digital_channels" WHERE "psip_short_name"='kstcdt2'; |
## Task
Generate a SQL query to answer the following question:
`What is the video associated with a short name of KSTCDT2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_channels" (
"channel" real,
"station" text,
"video" text,
"aspect" text,
"psip_short_name" text,
"programming" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the video associated with a short name of KSTCDT2?`:
```sql
|
SELECT "psip_short_name" FROM "digital_channels" WHERE "station"='kstc-tv' AND "channel"=5.5; |
## Task
Generate a SQL query to answer the following question:
`What is the short name of channel 5.5, KSTC-TV?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_channels" (
"channel" real,
"station" text,
"video" text,
"aspect" text,
"psip_short_name" text,
"programming" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the short name of channel 5.5, KSTC-TV?`:
```sql
|
SELECT "psip_short_name" FROM "digital_channels" WHERE "channel"<5.2; |
## Task
Generate a SQL query to answer the following question:
`What is the short name of the channel under 5.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "digital_channels" (
"channel" real,
"station" text,
"video" text,
"aspect" text,
"psip_short_name" text,
"programming" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the short name of the channel under 5.2?`:
```sql
|
SELECT "men_s_doubles" FROM "past_winners" WHERE "women_s_doubles"='pam brady rosine lemon'; |
## Task
Generate a SQL query to answer the following question:
`Which Men's doubles has a Women's doubles of pam brady rosine lemon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Men's doubles has a Women's doubles of pam brady rosine lemon?`:
```sql
|
SELECT "province" FROM "by_county" WHERE "prefecture"='xiangxi' AND "pct_of_china_s_tujia_population"='0.81%'; |
## Task
Generate a SQL query to answer the following question:
`Which province has a prefecture of Xiangxi with 0.81% of China's Tujia population?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_county" (
"province" text,
"prefecture" text,
"county" text,
"tujia_population" real,
"pct_of_china_s_tujia_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which province has a prefecture of Xiangxi with 0.81% of China's Tujia population?`:
```sql
|
SELECT "prefecture" FROM "by_county" WHERE "province"='hubei' AND "county"='enshi'; |
## Task
Generate a SQL query to answer the following question:
`Which prefecture is in Hubei province and Enshi county?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_county" (
"province" text,
"prefecture" text,
"county" text,
"tujia_population" real,
"pct_of_china_s_tujia_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which prefecture is in Hubei province and Enshi county?`:
```sql
|
SELECT SUM("tujia_population") FROM "by_county" WHERE "prefecture"='zhangjiajie' AND "county"='sangzhi'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Tujia population with the Zhangjiajie prefecture in Sangzhi county?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_county" (
"province" text,
"prefecture" text,
"county" text,
"tujia_population" real,
"pct_of_china_s_tujia_population" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Tujia population with the Zhangjiajie prefecture in Sangzhi county?`:
```sql
|
SELECT COUNT("attendance") FROM "game_log" WHERE "points">40 AND "home"='detroit'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of attendence has points greater than 40, and detroit as the home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of attendence has points greater than 40, and detroit as the home?`:
```sql
|
SELECT COUNT("tropical_lows") FROM "1990s" WHERE "tropical_cyclones">11 AND "season"='1998β99' AND "severe_tropical_cyclones">9; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Tropical Lows for more than 11 tropical cyclones in 1998β99, and a Severe Tropical Cyclones larger than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"season" text,
"tropical_lows" real,
"tropical_cyclones" real,
"severe_tropical_cyclones" real,
"strongest_storm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Tropical Lows for more than 11 tropical cyclones in 1998β99, and a Severe Tropical Cyclones larger than 9?`:
```sql
|
SELECT MAX("tropical_lows") FROM "1990s" WHERE "season"='1990β91' AND "tropical_cyclones">10; |
## Task
Generate a SQL query to answer the following question:
`What is the largest number for tropical Lows for the 1990β91 season with more than 10 tropical cyclones?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"season" text,
"tropical_lows" real,
"tropical_cyclones" real,
"severe_tropical_cyclones" real,
"strongest_storm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest number for tropical Lows for the 1990β91 season with more than 10 tropical cyclones?`:
```sql
|
SELECT MIN("severe_tropical_cyclones") FROM "1990s" WHERE "strongest_storm"='tiffany' AND "tropical_lows">10; |
## Task
Generate a SQL query to answer the following question:
`What is the least number of tropical cyclones when the strongest storm was Tiffany and less than 10 tropical lows.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"season" text,
"tropical_lows" real,
"tropical_cyclones" real,
"severe_tropical_cyclones" real,
"strongest_storm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least number of tropical cyclones when the strongest storm was Tiffany and less than 10 tropical lows.`:
```sql
|
SELECT MIN("severe_tropical_cyclones") FROM "1990s" WHERE "season"='1992β93' AND "tropical_lows"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the least amount of severe tropical cyclones for the 1992β93 season and the tropical Lows smaller than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"season" text,
"tropical_lows" real,
"tropical_cyclones" real,
"severe_tropical_cyclones" real,
"strongest_storm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of severe tropical cyclones for the 1992β93 season and the tropical Lows smaller than 6?`:
```sql
|
SELECT MIN("tropical_lows") FROM "1990s" WHERE "season"='1993β94' AND "tropical_cyclones"<11; |
## Task
Generate a SQL query to answer the following question:
`What is the least amount of tropical lows for the 1993β94 season with less than 11 tropical cyclones`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s" (
"season" text,
"tropical_lows" real,
"tropical_cyclones" real,
"severe_tropical_cyclones" real,
"strongest_storm" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the least amount of tropical lows for the 1993β94 season with less than 11 tropical cyclones`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "date"='september 8, 1980' AND "attendance">'55,045'; |
## Task
Generate a SQL query to answer the following question:
`How many Weeks are on september 8, 1980 and Attendances larger than 55,045? Question 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Weeks are on september 8, 1980 and Attendances larger than 55,045? Question 4`:
```sql
|
SELECT "round" FROM "nfl_draft" WHERE "college"='stanford'; |
## Task
Generate a SQL query to answer the following question:
`Which Round has a College of stanford?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round has a College of stanford?`:
```sql
|
SELECT "round" FROM "nfl_draft" WHERE "pick"=174; |
## Task
Generate a SQL query to answer the following question:
`Which Round has a Pick of 174?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Round has a Pick of 174?`:
```sql
|
SELECT "position" FROM "nfl_draft" WHERE "pick"=174; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Pick of 174?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Pick of 174?`:
```sql
|
SELECT "event" FROM "achievements" WHERE "year"=1964; |
## Task
Generate a SQL query to answer the following question:
`that was held in 1964?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `that was held in 1964?`:
```sql
|
SELECT "event" FROM "achievements" WHERE "venue"='toronto, canada'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Event with a venue that was in toronto, canada?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Event with a venue that was in toronto, canada?`:
```sql
|
SELECT SUM("year") FROM "achievements" WHERE "competition"='british empire and commonwealth games'; |
## Task
Generate a SQL query to answer the following question:
`What is the Year the competition the british empire and commonwealth games were held?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Year the competition the british empire and commonwealth games were held?`:
```sql
|
SELECT "position" FROM "achievements" WHERE "competition"='commonwealth games'; |
## Task
Generate a SQL query to answer the following question:
`What is the position of the commonwealth games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position of the commonwealth games?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "year"=1964; |
## Task
Generate a SQL query to answer the following question:
`What is the venue with a competition in 1964?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue with a competition in 1964?`:
```sql
|
SELECT "date" FROM "singles_finals_19_8_11" WHERE "surface"='clay' AND "location"='santos, brazil'; |
## Task
Generate a SQL query to answer the following question:
`Name the date for clay surface and location of santos, brazil`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_finals_19_8_11" (
"outcome" text,
"date" text,
"location" text,
"surface" text,
"opponent_in_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for clay surface and location of santos, brazil`:
```sql
|
SELECT "date" FROM "singles_finals_19_8_11" WHERE "outcome"='winner' AND "score"='4β6 6β2 7β6 (7β4)'; |
## Task
Generate a SQL query to answer the following question:
`Name the date with outcome of winner and score of 4β6 6β2 7β6 (7β4)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_finals_19_8_11" (
"outcome" text,
"date" text,
"location" text,
"surface" text,
"opponent_in_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date with outcome of winner and score of 4β6 6β2 7β6 (7β4)`:
```sql
|
SELECT MAX("capacity") FROM "teams_and_venues" WHERE "position_in_2004"='5'; |
## Task
Generate a SQL query to answer the following question:
`What's the highest capacity for a position of 5 in 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_venues" (
"team" text,
"location" text,
"venue" text,
"capacity" real,
"position_in_2004" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the highest capacity for a position of 5 in 2004?`:
```sql
|
SELECT "venue" FROM "teams_and_venues" WHERE "capacity">'41,040' AND "team"='darida'; |
## Task
Generate a SQL query to answer the following question:
`Which venue has a capacity over 41,040 for Darida?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_venues" (
"team" text,
"location" text,
"venue" text,
"capacity" real,
"position_in_2004" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue has a capacity over 41,040 for Darida?`:
```sql
|
SELECT "venue" FROM "teams_and_venues" WHERE "position_in_2004"='9'; |
## Task
Generate a SQL query to answer the following question:
`Which venue was number 9 for 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_venues" (
"team" text,
"location" text,
"venue" text,
"capacity" real,
"position_in_2004" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue was number 9 for 2004?`:
```sql
|
SELECT "city" FROM "institutions" WHERE "founded"=1857; |
## Task
Generate a SQL query to answer the following question:
`What city was founded in 1857?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "institutions" (
"school" text,
"city" text,
"state" text,
"enrollment" real,
"founded" real
);
### SQL
Given the database schema, here is the SQL query that answers `What city was founded in 1857?`:
```sql
|
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "time"='2:31'; |
## Task
Generate a SQL query to answer the following question:
`Which Opponent has a Time of 2:31?`
### 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" real,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Opponent has a Time of 2:31?`:
```sql
|
SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"=1 AND "time"='0:28'; |
## Task
Generate a SQL query to answer the following question:
`Which Method has a Round of 1, and a Time of 0:28?`
### 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" real,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Method has a Round of 1, and a Time of 0:28?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "event"='call to arms i'; |
## Task
Generate a SQL query to answer the following question:
`Which Time has an Event of call to arms i?`
### 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" real,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Time has an Event of call to arms i?`:
```sql
|
SELECT "opponent" FROM "playoffs" WHERE "date"='april 9'; |
## Task
Generate a SQL query to answer the following question:
`what team played on april 9`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `what team played on april 9`:
```sql
|
SELECT MIN("frequency_k_hz") FROM "am_stations" WHERE "licensed_location"='longview'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest frequency (kHz) that is in the location of Longview?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations" (
"frequency_k_hz" real,
"call_letters" text,
"licensed_location" text,
"type" text,
"format" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest frequency (kHz) that is in the location of Longview?`:
```sql
|
SELECT "licensed_location" FROM "am_stations" WHERE "frequency_k_hz">1370; |
## Task
Generate a SQL query to answer the following question:
`What is the location with a frequency (kHz) greater than 1370?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am_stations" (
"frequency_k_hz" real,
"call_letters" text,
"licensed_location" text,
"type" text,
"format" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location with a frequency (kHz) greater than 1370?`:
```sql
|
SELECT COUNT("capacity") FROM "teams_and_venues" WHERE "venue"='yunost'; |
## Task
Generate a SQL query to answer the following question:
`What is the capacity number for Yunost?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "teams_and_venues" (
"team" text,
"location" text,
"venue" text,
"capacity" real,
"position_in_2002" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the capacity number for Yunost?`:
```sql
|
SELECT SUM("1st_prize") FROM "tournament_results" WHERE "tournament"='canadian open'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of first prizes in USD for the Canadian Open?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"winner" text,
"score" text,
"1st_prize" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of first prizes in USD for the Canadian Open?`:
```sql
|
SELECT "drawn" FROM "2011_2012_table" WHERE "lost"='19'; |
## Task
Generate a SQL query to answer the following question:
`Which Drawn has a Lost of 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Drawn has a Lost of 19?`:
```sql
|
SELECT "played" FROM "2011_2012_table" WHERE "club"='club'; |
## Task
Generate a SQL query to answer the following question:
`Which Played has a Club of club?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Played has a Club of club?`:
```sql
|
SELECT "club" FROM "2011_2012_table" WHERE "losing_bonus"='1'; |
## Task
Generate a SQL query to answer the following question:
`Which Club has 1 Losing bonus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Club has 1 Losing bonus?`:
```sql
|
SELECT "losing_bonus" FROM "2011_2012_table" WHERE "points_for"='571'; |
## Task
Generate a SQL query to answer the following question:
`What is the Losing bonus of 571 Points ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Losing bonus of 571 Points ?`:
```sql
|
SELECT "lost" FROM "2011_2012_table" WHERE "tries_for"='75'; |
## Task
Generate a SQL query to answer the following question:
`Which Lost has a Tries for of 75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2011_2012_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Lost has a Tries for of 75?`:
```sql
|
SELECT "opponent_in_the_final" FROM "singles_12_3_9" WHERE "date"='19 february 2006'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent in the final of the match on 19 February 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_12_3_9" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent in the final of the match on 19 February 2006?`:
```sql
|
SELECT "opponent_in_the_final" FROM "singles_12_3_9" WHERE "date"='26 march 2006'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent in the final of the match on 26 March 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_12_3_9" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent in the final of the match on 26 March 2006?`:
```sql
|
SELECT SUM("overall") FROM "atlanta_falcons_draft_history" WHERE "college"='utah' AND "pick_num"<7; |
## Task
Generate a SQL query to answer the following question:
`What is the overall number of the player from Utah with a pick # higher than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the overall number of the player from Utah with a pick # higher than 7?`:
```sql
|
SELECT MAX("round") FROM "atlanta_falcons_draft_history" WHERE "pick_num">34; |
## Task
Generate a SQL query to answer the following question:
`What is the highest round of the player with a pick number lower than 34?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest round of the player with a pick number lower than 34?`:
```sql
|
SELECT SUM("round") FROM "atlanta_falcons_draft_history" WHERE "name"='mitch davis' AND "overall"<118; |
## Task
Generate a SQL query to answer the following question:
`What round did Mitch Davis, with an overall higher than 118, have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What round did Mitch Davis, with an overall higher than 118, have?`:
```sql
|
SELECT MAX("overall") FROM "atlanta_falcons_draft_history" WHERE "college"='georgia'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest overall of the player from Georgia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest overall of the player from Georgia?`:
```sql
|
SELECT "position" FROM "atlanta_falcons_draft_history" WHERE "overall"=45; |
## Task
Generate a SQL query to answer the following question:
`What is the position of the player with an overall of 45?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the position of the player with an overall of 45?`:
```sql
|
SELECT AVG("wins") FROM "motorcycle_grand_prix_results" WHERE "team"='nsu' AND "points">2; |
## Task
Generate a SQL query to answer the following question:
`How many wins for team nsu and over 2 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins for team nsu and over 2 points?`:
```sql
|
SELECT MIN("year") FROM "motorcycle_grand_prix_results" WHERE "wins"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year associated with under 0 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year associated with under 0 wins?`:
```sql
|
SELECT SUM("wins") FROM "motorcycle_grand_prix_results" WHERE "team"='mv agusta' AND "points">10 AND "year">1957; |
## Task
Generate a SQL query to answer the following question:
`How many wins for team mv agusta, over 10 points, and after 1957?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins for team mv agusta, over 10 points, and after 1957?`:
```sql
|
SELECT "college_junior_club_team_league" FROM "draft_picks" WHERE "round"=3; |
## Task
Generate a SQL query to answer the following question:
`What College/Junior/Club Team (League) has a round of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What College/Junior/Club Team (League) has a round of 3?`:
```sql
|
SELECT "player" FROM "draft_picks" WHERE "round">1 AND "nationality"='austria'; |
## Task
Generate a SQL query to answer the following question:
`What player has a round larger than 1 in Austria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player has a round larger than 1 in Austria?`:
```sql
|
SELECT "player" FROM "draft_picks" WHERE "nationality"='sweden'; |
## Task
Generate a SQL query to answer the following question:
`Which player's nationality is from Sweden?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player's nationality is from Sweden?`:
```sql
|
SELECT "college_junior_club_team_league" FROM "draft_picks" WHERE "nationality"='canada' AND "round"<3; |
## Task
Generate a SQL query to answer the following question:
`What College/Junior/Club Team (League) from Canada has a round smaller than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What College/Junior/Club Team (League) from Canada has a round smaller than 3?`:
```sql
|
SELECT "distance" FROM "men_kayak" WHERE "year"=1997; |
## Task
Generate a SQL query to answer the following question:
`What was the distance in 1997?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men_kayak" (
"distance" text,
"event" text,
"record" text,
"nationality" text,
"year" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the distance in 1997?`:
```sql
|
SELECT "opponents_in_the_final" FROM "doubles_19_12_titles_7_runners_up" WHERE "surface"='hard' AND "date"='january 5, 2003'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponents in the final on January 5, 2003, on a hard surface?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_19_12_titles_7_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponents in the final on January 5, 2003, on a hard surface?`:
```sql
|
SELECT "score_in_the_final" FROM "doubles_19_12_titles_7_runners_up" WHERE "date"='february 19, 2012'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score on the February 19, 2012 final?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_19_12_titles_7_runners_up" (
"outcome" text,
"date" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score on the February 19, 2012 final?`:
```sql
|
SELECT MIN("attendance_away") FROM "conference_national" WHERE "venue"='away' AND "date"='24 august 2007'; |
## Task
Generate a SQL query to answer the following question:
`Name the least attendance with venue of away on 24 august 2007`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "conference_national" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance_away" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least attendance with venue of away on 24 august 2007`:
```sql
|
SELECT AVG("attendance_away") FROM "conference_national" WHERE "result"='won 2-0' AND "date"='2 november 2007'; |
## Task
Generate a SQL query to answer the following question:
`Name the average attendance with result of won 2-0 on 2 november 2007`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "conference_national" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance_away" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average attendance with result of won 2-0 on 2 november 2007`:
```sql
|
SELECT MIN("uninum") FROM "player_roster" WHERE "surname"='wiltshire'; |
## Task
Generate a SQL query to answer the following question:
`What is the uniform number of the player whose last name is Wiltshire?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"uninum" real,
"bats" text,
"throws" text,
"position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the uniform number of the player whose last name is Wiltshire?`:
```sql
|
SELECT "fourth_quarter" FROM "2009" WHERE "rank">3 AND "second_quarter"='johnson & johnson 156,515.9'; |
## Task
Generate a SQL query to answer the following question:
`When the rank is larger than 3 with a second quarter of johnson & johnson 156,515.9, what is the fourth quarter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"rank" real,
"first_quarter" text,
"second_quarter" text,
"third_quarter" text,
"fourth_quarter" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the rank is larger than 3 with a second quarter of johnson & johnson 156,515.9, what is the fourth quarter?`:
```sql
|
SELECT "second_quarter" FROM "2009" WHERE "rank"=2; |
## Task
Generate a SQL query to answer the following question:
`With a rank of 2 what is the second quarter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"rank" real,
"first_quarter" text,
"second_quarter" text,
"third_quarter" text,
"fourth_quarter" text
);
### SQL
Given the database schema, here is the SQL query that answers `With a rank of 2 what is the second quarter?`:
```sql
|
SELECT "rank" FROM "2009" WHERE "third_quarter"='china mobile 195,680.4'; |
## Task
Generate a SQL query to answer the following question:
`When the third quarter is China Mobile 195,680.4, what is the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"rank" real,
"first_quarter" text,
"second_quarter" text,
"third_quarter" text,
"fourth_quarter" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the third quarter is China Mobile 195,680.4, what is the rank?`:
```sql
|
SELECT "rank" FROM "2009" WHERE "first_quarter"='procter & gamble 138,013'; |
## Task
Generate a SQL query to answer the following question:
`When the first quarter is procter & gamble 138,013, what is the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"rank" real,
"first_quarter" text,
"second_quarter" text,
"third_quarter" text,
"fourth_quarter" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the first quarter is procter & gamble 138,013, what is the rank?`:
```sql
|
SELECT "fourth_quarter" FROM "2009" WHERE "rank"<4 AND "second_quarter"='exxon mobil 341,140.3'; |
## Task
Generate a SQL query to answer the following question:
`When the rank is less than 4, and has a second quarter of exxon mobil 341,140.3, what is the fourth quarter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"rank" real,
"first_quarter" text,
"second_quarter" text,
"third_quarter" text,
"fourth_quarter" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the rank is less than 4, and has a second quarter of exxon mobil 341,140.3, what is the fourth quarter?`:
```sql
|
SELECT "term_end" FROM "list_of_ministers_for_the_interior" WHERE "party"='united australia' AND "term_in_office"='184 days'; |
## Task
Generate a SQL query to answer the following question:
`What is the Term end that has a Party of united australia and 184 days in office?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_ministers_for_the_interior" (
"order" text,
"minister" text,
"party" text,
"prime_minister" text,
"title" text,
"term_start" text,
"term_end" text,
"term_in_office" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Term end that has a Party of united australia and 184 days in office?`:
```sql
|
SELECT COUNT("int_s") FROM "defensive" WHERE "yards">0 AND "sacks">6 AND "average">17.5; |
## Task
Generate a SQL query to answer the following question:
`How many values for INT's occur with more than 0 yards, over 6 sacks, and average above 17.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defensive" (
"player" text,
"sacks" real,
"int_s" real,
"yards" real,
"average" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many values for INT's occur with more than 0 yards, over 6 sacks, and average above 17.5?`:
```sql
|
SELECT SUM("average") FROM "defensive" WHERE "yards"=23; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of average values for 23 yards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defensive" (
"player" text,
"sacks" real,
"int_s" real,
"yards" real,
"average" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of average values for 23 yards?`:
```sql
|
SELECT MIN("int_s") FROM "defensive" WHERE "average">25; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest value of INT's with an average more than 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defensive" (
"player" text,
"sacks" real,
"int_s" real,
"yards" real,
"average" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest value of INT's with an average more than 25?`:
```sql
|
SELECT MAX("yards") FROM "defensive" WHERE "sacks"=2 AND "average">0; |
## Task
Generate a SQL query to answer the following question:
`What are the most yards for 2 sacks and an average greater than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defensive" (
"player" text,
"sacks" real,
"int_s" real,
"yards" real,
"average" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the most yards for 2 sacks and an average greater than 0?`:
```sql
|
SELECT SUM("int_s") FROM "defensive" WHERE "yards"=0 AND "sacks"<3 AND "player"='mossy cade'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of values for INT'S with Mossy Cade for 0 yards and less than 3 sacks?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defensive" (
"player" text,
"sacks" real,
"int_s" real,
"yards" real,
"average" real,
"long" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of values for INT'S with Mossy Cade for 0 yards and less than 3 sacks?`:
```sql
|
SELECT "bronze" FROM "individual" WHERE "location"='bangkok' AND "year"=1978; |
## Task
Generate a SQL query to answer the following question:
`What is listed for the Bronze, with the Location of Bangkok, and the Year of 1978?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is listed for the Bronze, with the Location of Bangkok, and the Year of 1978?`:
```sql
|
SELECT MIN("year") FROM "individual" WHERE "silver"='kim kyung-ho'; |
## Task
Generate a SQL query to answer the following question:
`What's listed for the lowest Year that a Silver of Kim Kyung-Ho?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's listed for the lowest Year that a Silver of Kim Kyung-Ho?`:
```sql
|
SELECT "gold" FROM "individual" WHERE "bronze"='kim sun-bin'; |
## Task
Generate a SQL query to answer the following question:
`What's the Gold that also has Bronze of Kim Sun-Bin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Gold that also has Bronze of Kim Sun-Bin?`:
```sql
|
SELECT "bronze" FROM "individual" WHERE "gold"='kim woo-jin'; |
## Task
Generate a SQL query to answer the following question:
`What's the Bronze that's also got a Godl of Kim Woo-Jin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Bronze that's also got a Godl of Kim Woo-Jin?`:
```sql
|
SELECT MAX("year") FROM "individual" WHERE "bronze"='wataru haraguchi'; |
## Task
Generate a SQL query to answer the following question:
`What is listed as the highest Year that's also got a Bronze of Wataru Haraguchi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual" (
"year" real,
"location" text,
"gold" text,
"silver" text,
"bronze" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is listed as the highest Year that's also got a Bronze of Wataru Haraguchi?`:
```sql
|
SELECT "score" FROM "march" WHERE "record"='35β23β15'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when their record was 35β23β15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when their record was 35β23β15?`:
```sql
|
SELECT "home" FROM "march" WHERE "score"='5 β 6'; |
## Task
Generate a SQL query to answer the following question:
`Which home team has a score of 5 β 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which home team has a score of 5 β 6?`:
```sql
|
SELECT "county" FROM "current_members" WHERE "school"='merrillville'; |
## Task
Generate a SQL query to answer the following question:
`In what county is the school of Merrillville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_members" (
"school" text,
"location" text,
"mascot" text,
"county" text,
"enrollment_08_09" real,
"ihsaa_class" text,
"ihsaa_class_football" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what county is the school of Merrillville?`:
```sql
|
SELECT "previous_conference" FROM "current_members" WHERE "school"='portage'; |
## Task
Generate a SQL query to answer the following question:
`The school of Portage was in what conference previous?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_members" (
"school" text,
"location" text,
"mascot" text,
"county" text,
"enrollment_08_09" real,
"ihsaa_class" text,
"ihsaa_class_football" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `The school of Portage was in what conference previous?`:
```sql
|
SELECT "school" FROM "current_members" WHERE "location"='valparaiso'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the school that is in Valparaiso?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_members" (
"school" text,
"location" text,
"mascot" text,
"county" text,
"enrollment_08_09" real,
"ihsaa_class" text,
"ihsaa_class_football" text,
"year_joined" real,
"previous_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the school that is in Valparaiso?`:
```sql
|
SELECT MAX("fa_cup") FROM "scorers" WHERE "malaysia_cup"=0 AND "player"='ahmad fouzee masuri' AND "total">0; |
## Task
Generate a SQL query to answer the following question:
`Which FA Cup is the highest one that has a Malaysia Cup of 0, and a Player of ahmad fouzee masuri, and a Total larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which FA Cup is the highest one that has a Malaysia Cup of 0, and a Player of ahmad fouzee masuri, and a Total larger than 0?`:
```sql
|
SELECT COUNT("total") FROM "scorers" WHERE "player"='ahmad fouzee masuri' AND "fa_cup">0; |
## Task
Generate a SQL query to answer the following question:
`How many totals have a Player of ahmad fouzee masuri, and an FA Cup larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many totals have a Player of ahmad fouzee masuri, and an FA Cup larger than 0?`:
```sql
|
SELECT AVG("fa_cup") FROM "scorers" WHERE "player"='khairan ezuan razali' AND "total"<0; |
## Task
Generate a SQL query to answer the following question:
`Which FA Cup has a Player of khairan ezuan razali, and a Total smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which FA Cup has a Player of khairan ezuan razali, and a Total smaller than 0?`:
```sql
|
SELECT COUNT("malaysia_cup") FROM "scorers" WHERE "total">3 AND "player"='ivan yusoff' AND "league"<2; |
## Task
Generate a SQL query to answer the following question:
`How many Malaysia Cups have a Total larger than 3, and a Player of ivan yusoff, and a League smaller than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many Malaysia Cups have a Total larger than 3, and a Player of ivan yusoff, and a League smaller than 2?`:
```sql
|
SELECT SUM("fa_cup") FROM "scorers" WHERE "malaysia_cup">0 AND "total"=8; |
## Task
Generate a SQL query to answer the following question:
`Which FA Cup has a Malaysia Cup larger than 0, and a Total of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which FA Cup has a Malaysia Cup larger than 0, and a Total of 8?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.