output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MAX("stories") FROM "tallest_buildings" WHERE "location"='recife' AND "year_of_completion">2007 AND "height_m"<135; |
## Task
Generate a SQL query to answer the following question:
`What is the largest number of stories in Recife completed later than 2007 with a height less than 135 meters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"name" ... |
SELECT "sanskrit" FROM "key_terms" WHERE "english"='mindfulness of breathing'; |
## Task
Generate a SQL query to answer the following question:
`Which Sanskrit has an English of mindfulness of breathing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "key_terms" (
"english" text,
"pali" text,
"sanskrit" text,
"chinese" text... |
SELECT "sanskrit" FROM "key_terms" WHERE "chinese"='—' AND "english"='cultivation of settling'; |
## Task
Generate a SQL query to answer the following question:
`Which Sanskrit has a Chinese of —, and an English of cultivation of settling?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "key_terms" (
"english" text,
"pali" text,
"sanskrit" tex... |
SELECT "pali" FROM "key_terms" WHERE "english"='mindfulness of breathing'; |
## Task
Generate a SQL query to answer the following question:
`Which Pali has an English of mindfulness of breathing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "key_terms" (
"english" text,
"pali" text,
"sanskrit" text,
"chinese" text,
... |
SELECT "pali" FROM "key_terms" WHERE "english"='meditative concentration'; |
## Task
Generate a SQL query to answer the following question:
`Which Pali has an English of meditative concentration?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "key_terms" (
"english" text,
"pali" text,
"sanskrit" text,
"chinese" text,
... |
SELECT "chinese" FROM "key_terms" WHERE "pali"='atappa'; |
## Task
Generate a SQL query to answer the following question:
`Which Chinese has a Pali of atappa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "key_terms" (
"english" text,
"pali" text,
"sanskrit" text,
"chinese" text,
"tibetan" text
);
#... |
SELECT "english" FROM "key_terms" WHERE "sanskrit"='samādhi'; |
## Task
Generate a SQL query to answer the following question:
`Which English has a Sanskrit of samādhi?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "key_terms" (
"english" text,
"pali" text,
"sanskrit" text,
"chinese" text,
"tibetan" text... |
SELECT "player" FROM "draft_picks" WHERE "round"<8 AND "position"='guard' AND "school_club_team"='stephen f. austin'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player in guard position from Stephen F. Austin in a round less than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" ... |
SELECT "position" FROM "draft_picks" WHERE "pick"<41 AND "school_club_team"='ohio state'; |
## Task
Generate a SQL query to answer the following question:
`Which position has a pick less than 41 from Ohio State?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"position" text,
... |
SELECT "2006" FROM "doubles_performance_timeline" WHERE "2002"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2006 when 2002 is Grand Slam Tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2002" text,
"2004" text,
... |
SELECT "2002" FROM "doubles_performance_timeline" WHERE "2006"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2002 when 2006 is Grand Slam Tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2002" text,
"2004" text,
... |
SELECT "2005" FROM "doubles_performance_timeline" WHERE "2002"='0–1'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2005 when 2002 shows 0–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2002" text,
"2004" text,
"2005" text,
... |
SELECT "2006" FROM "doubles_performance_timeline" WHERE "2002"='0–1'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2006 when 2002 is 0–1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2002" text,
"2004" text,
"2005" text,
"2... |
SELECT "2002" FROM "doubles_performance_timeline" WHERE "2004"='a' AND "2005"='1r'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2002 when the 2004 is A, and the 2005 is 1r?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2002" text,
"2004" tex... |
SELECT "2004" FROM "doubles_performance_timeline" WHERE "2005"='a' AND "2006"='a' AND "tournament"='us open'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2004 when 2005 is A, 2006 is A, tournament is US Open?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_performance_timeline" (
"tournament" text,
"2002" text,
... |
SELECT "opponent" FROM "schedule" WHERE "date"='december 2, 1962'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent on December 2, 1962?`
### 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
... |
SELECT MAX("population") FROM "communities" WHERE "status"='town' AND "census_ranking"='1,379 of 5,008' AND "area_km_2"<8.35; |
## Task
Generate a SQL query to answer the following question:
`What is the Population of the Town with a Census Ranking of 1,379 of 5,008 and an Area km 2 smaller than 8.35?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "communities" (
"official_na... |
SELECT "official_name" FROM "communities" WHERE "area_km_2"=16.13; |
## Task
Generate a SQL query to answer the following question:
`What is the Official Name of the Community with an Area km 2 of 16.13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "communities" (
"official_name" text,
"status" text,
"area_km_2"... |
SELECT "country" FROM "second_round" WHERE "to_par"='–2' AND "player"='tsuneyuki nakajima'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when To Par is "–2", and when Player is "Tsuneyuki Nakajima"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" ... |
SELECT "country" FROM "second_round" WHERE "score"='72-65=137'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when Score is "72-65=137"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" te... |
SELECT "country" FROM "second_round" WHERE "place"='t3' AND "player"='jim thorpe'; |
## Task
Generate a SQL query to answer the following question:
`What is Country, when Place is "T3", and when Player is "Jim Thorpe"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"... |
SELECT "team" FROM "game_log" WHERE "game"=34; |
## Task
Generate a SQL query to answer the following question:
`Who was the team for game 34?`
### 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_rebound... |
SELECT SUM("goals_for") FROM "final_table" WHERE "drawn">12 AND "team"='goole town' AND "goals_against">60; |
## Task
Generate a SQL query to answer the following question:
`How many goals for had a drawn more than 12 for the Goole Town team, as well as more than 60 goals against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real... |
SELECT AVG("goals_for") FROM "final_table" WHERE "drawn">7 AND "goals_against"<86 AND "lost">11 AND "played">42; |
## Task
Generate a SQL query to answer the following question:
`What are the average goals for with a drawn higher than 7 and goals against less than 86, as well as more than 11 losses and more than 42 games played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CR... |
SELECT MAX("lost") FROM "final_table" WHERE "drawn">11 AND "position"<17 AND "goals_for">61; |
## Task
Generate a SQL query to answer the following question:
`What is the highest lost with a drawn more than 11, a position lower than 17 and more than 61 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"te... |
SELECT "name" FROM "vassal_states" WHERE "title"='ruler'; |
## Task
Generate a SQL query to answer the following question:
`Who held the title of Ruler?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "vassal_states" (
"state" text,
"type" text,
"name" text,
"title" text,
"royal_house" text
);
### SQL
... |
SELECT "type" FROM "vassal_states" WHERE "title"='ruler'; |
## Task
Generate a SQL query to answer the following question:
`What type of state did the ruler have a title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "vassal_states" (
"state" text,
"type" text,
"name" text,
"title" text,
"royal_house... |
SELECT "state" FROM "vassal_states" WHERE "title"='marquis' AND "name"='jing'; |
## Task
Generate a SQL query to answer the following question:
`In what state did Jing have the title of Marquis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "vassal_states" (
"state" text,
"type" text,
"name" text,
"title" text,
"royal_ho... |
SELECT "title" FROM "vassal_states" WHERE "name"='gongbo'; |
## Task
Generate a SQL query to answer the following question:
`What was Gongbo's title?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "vassal_states" (
"state" text,
"type" text,
"name" text,
"title" text,
"royal_house" text
);
### SQL
Give... |
SELECT "state" FROM "vassal_states" WHERE "name"='yi'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of Yi's state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "vassal_states" (
"state" text,
"type" text,
"name" text,
"title" text,
"royal_house" text
);
### S... |
SELECT "devices_per_channel" FROM "comparison_with_other_buses" WHERE "name"='sata revision 3.0'; |
## Task
Generate a SQL query to answer the following question:
`What is the Devices per channel where the Name is sata revision 3.0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_with_other_buses" (
"name" text,
"raw_bandwidth_mbit_s" ... |
SELECT "raw_bandwidth_mbit_s" FROM "comparison_with_other_buses" WHERE "name"='sas 300'; |
## Task
Generate a SQL query to answer the following question:
`What is the Raw bandwidth (Mbit/s) for the SAS 300?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "comparison_with_other_buses" (
"name" text,
"raw_bandwidth_mbit_s" text,
"max_cabl... |
SELECT "ground" FROM "group_2" WHERE "home_team_score"='18.12 (120)'; |
## Task
Generate a SQL query to answer the following question:
`Which Ground has a Home team score of 18.12 (120)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_2" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team... |
SELECT "away_team_score" FROM "group_2" WHERE "away_team"='st kilda' AND "crowd"=8157; |
## Task
Generate a SQL query to answer the following question:
`Name the Away team score which has an Away team of st kilda, and a Crowd of 8157?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_2" (
"home_team" text,
"home_team_score" text,
... |
SELECT "away_team" FROM "group_2" WHERE "ground"='colonial stadium' AND "date"='friday, 2 march'; |
## Task
Generate a SQL query to answer the following question:
`Name the Away team which have a Ground of colonial stadium on friday, 2 march?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_2" (
"home_team" text,
"home_team_score" text,
"a... |
SELECT "team" FROM "career_summary" WHERE "points"='71' AND "f_laps"='4'; |
## Task
Generate a SQL query to answer the following question:
`Which team has 71 Points and F/Laps of 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" text,
"wins" text,
... |
SELECT "poles" FROM "career_summary" WHERE "team"='team jva'; |
## Task
Generate a SQL query to answer the following question:
`What Poles do Team jva have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" text,
"wins" text,
"poles" tex... |
SELECT "points" FROM "career_summary" WHERE "races"='11' AND "season">2008; |
## Task
Generate a SQL query to answer the following question:
`If the Season is later than 2008 and Races is 11, what ate the Points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
... |
SELECT "position" FROM "career_summary" WHERE "team"='sahara force india f1 team' AND "points"='46'; |
## Task
Generate a SQL query to answer the following question:
`What Position is Team Sahara Force india f1 team with 46 Points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races... |
SELECT "poles" FROM "career_summary" WHERE "position"='4th'; |
## Task
Generate a SQL query to answer the following question:
`Which Poles have a position of 4th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" text,
"wins" text,
"pol... |
SELECT "f_laps" FROM "career_summary" WHERE "points"='27'; |
## Task
Generate a SQL query to answer the following question:
`Which F/Laps have 27 Points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"team" text,
"races" text,
"wins" text,
"poles" tex... |
SELECT "country" FROM "structures_past_or_present_between_500_a" WHERE "name"='sba towers tower hayneville'; |
## Task
Generate a SQL query to answer the following question:
`What country has the SBA Towers Tower Hayneville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "structures_past_or_present_between_500_a" (
"name" text,
"pinnacle_height" text,
"st... |
SELECT "structure_type" FROM "structures_past_or_present_between_500_a" WHERE "name"='american tower christmas'; |
## Task
Generate a SQL query to answer the following question:
`What type of structure is there at the American Tower Christmas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "structures_past_or_present_between_500_a" (
"name" text,
"pinnacle_heig... |
SELECT "name" FROM "structures_past_or_present_between_500_a" WHERE "town"='egypt, arkansas'; |
## Task
Generate a SQL query to answer the following question:
`What's the name of the structure at Egypt, Arkansas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "structures_past_or_present_between_500_a" (
"name" text,
"pinnacle_height" text,
... |
SELECT "country" FROM "grandmasters" WHERE "date"=1991 AND "birth_date"='1976-07-23'; |
## Task
Generate a SQL query to answer the following question:
`What country was the woman from who was born 1976-07-23 and became a grandmaster in 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grandmasters" (
"name" text,
"country" text,
... |
SELECT MIN("points") FROM "pre_libertadores_playoff" WHERE "team"='sportivo luqueño' AND "wins">1; |
## Task
Generate a SQL query to answer the following question:
`Name the Points which has a Team of sportivo luqueño, and Wins larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_libertadores_playoff" (
"position" real,
"team" text,
... |
SELECT MIN("wins") FROM "pre_libertadores_playoff" WHERE "points"<10 AND "losses"<3 AND "scored"=11; |
## Task
Generate a SQL query to answer the following question:
`Name the Wins which has Points smaller than 10, Losses smaller than 3, and a Scored of 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_libertadores_playoff" (
"position" real,
... |
SELECT MAX("conceded") FROM "pre_libertadores_playoff" WHERE "played"<5; |
## Task
Generate a SQL query to answer the following question:
`Please name the highest Conceded which has a Played smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_libertadores_playoff" (
"position" real,
"team" text,
"played"... |
SELECT MAX("losses") FROM "pre_libertadores_playoff" WHERE "played"<5; |
## Task
Generate a SQL query to answer the following question:
`Please name the Losses that has a Played smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_libertadores_playoff" (
"position" real,
"team" text,
"played" real,
"w... |
SELECT COUNT("scored") FROM "pre_libertadores_playoff" WHERE "position">6; |
## Task
Generate a SQL query to answer the following question:
`Name the Scored which has a Position larger than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_libertadores_playoff" (
"position" real,
"team" text,
"played" real,
"wins" ... |
SELECT MIN("week") FROM "schedule" WHERE "opponent"='cincinnati bengals'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest week with an opponent of cincinnati bengals?`
### 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" te... |
SELECT SUM("week") FROM "schedule" WHERE "date"='october 30, 1994'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum for the week with the date october 30, 1994?`
### 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,
... |
SELECT "date" FROM "schedule" WHERE "week"<9 AND "opponent"='dallas cowboys'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for a week before 9, and a opponent of dallas cowboys?`
### 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,
"resu... |
SELECT MAX("week") FROM "schedule" WHERE "opponent"='washington redskins'; |
## Task
Generate a SQL query to answer the following question:
`What is the biggest week with an opponent of washington redskins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" te... |
SELECT "attendance" FROM "schedule" WHERE "week">3 AND "opponent"='philadelphia eagles'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance for a week larger than 3, and an opponent of philadelphia eagles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"oppon... |
SELECT "res" FROM "mixed_martial_arts_record" WHERE "opponent"='jeff monson'; |
## Task
Generate a SQL query to answer the following question:
`What is the result of the match with Jeff Monson as opponent?`
### 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,... |
SELECT "round" FROM "mixed_martial_arts_record" WHERE "opponent"='jason fairn'; |
## Task
Generate a SQL query to answer the following question:
`How many rounds was the match against Jason Fairn?`
### 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"... |
SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"='1' AND "res"='loss' AND "opponent"='carlos newton'; |
## Task
Generate a SQL query to answer the following question:
`What is the method of the match where there was a loss to Carlos Newton in round 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" te... |
SELECT "high_points" FROM "game_log" WHERE "game">59; |
## Task
Generate a SQL query to answer the following question:
`Who had the most points in games over 59?`
### 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,
"... |
SELECT "score" FROM "game_log" WHERE "team"='san antonio'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the game against San Antonio?`
### 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... |
SELECT "high_assists" FROM "game_log" WHERE "team"='indiana'; |
## Task
Generate a SQL query to answer the following question:
`Who had the most assists in the game against Indiana?`
### 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_point... |
SELECT "railway" FROM "standard_gauge_designs_1870_to_1899" WHERE "object_number"='1975-7023'; |
## Task
Generate a SQL query to answer the following question:
`What is the UK Railway with an ObjectNumber of 1975-7023?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_gauge_designs_1870_to_1899" (
"railway" text,
"built" real,
"wheels... |
SELECT "replaced_by" FROM "managerial_changes" WHERE "position_in_table"='11th' AND "manner_of_departure"='resigned'; |
## Task
Generate a SQL query to answer the following question:
`Who was the manager that was positioned 11th in table and resigned in departure?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "managerial_changes" (
"team" text,
"outgoing_manager" t... |
SELECT MIN("tournaments_played") FROM "pga_tour_results" WHERE "year"=1998; |
## Task
Generate a SQL query to answer the following question:
`what is the least tournaments played when the year is 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_results" (
"year" real,
"tournaments_played" real,
"cuts_made" re... |
SELECT SUM("year") FROM "pga_tour_results" WHERE "tournaments_played"<2 AND "cuts_made"=1 AND "earnings"<'10,547'; |
## Task
Generate a SQL query to answer the following question:
`what is the year when tournaments played is less than 2, cuts made is 1 and earnings ($) is less than 10,547?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_results" (
"year" r... |
SELECT "best_finish" FROM "pga_tour_results" WHERE "money_list_rank"='n/a' AND "earnings">0 AND "cuts_made">1; |
## Task
Generate a SQL query to answer the following question:
`what is the best finish when money list rank is n/a, earnings ($) is more than 0 and cuts made is more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_results" (
"year" ... |
SELECT COUNT("tournaments_played") FROM "pga_tour_results" WHERE "money_list_rank"='221' AND "cuts_made">2; |
## Task
Generate a SQL query to answer the following question:
`how many times is the money list rank 221 and cuts more than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_results" (
"year" real,
"tournaments_played" real,
"cuts_made... |
SELECT MIN("year") FROM "pga_tour_results" WHERE "best_finish"='t-65'; |
## Task
Generate a SQL query to answer the following question:
`what is the earliest year with the best finish t-65?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_results" (
"year" real,
"tournaments_played" real,
"cuts_made" real,
"... |
SELECT AVG("tournaments_played") FROM "pga_tour_results" WHERE "cuts_made"=14; |
## Task
Generate a SQL query to answer the following question:
`what is the average tournaments played when cuts made is 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pga_tour_results" (
"year" real,
"tournaments_played" real,
"cuts_made" r... |
SELECT MIN("took_office") FROM "senate" WHERE "district"=22; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest date of taking office for district 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate" (
"senator" text,
"party" text,
"district" real,
"home_town" tex... |
SELECT SUM("district") FROM "senate" WHERE "party"='democratic' AND "home_town"='roby'; |
## Task
Generate a SQL query to answer the following question:
`What district has a democratic leader from Roby?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate" (
"senator" text,
"party" text,
"district" real,
"home_town" text,
"took_... |
SELECT MAX("district") FROM "senate" WHERE "party"='democratic' AND "senator"='steve carriker' AND "took_office">1988; |
## Task
Generate a SQL query to answer the following question:
`What is the district where Steve Carriker is the Democratic Senator and he took office later than 1988?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate" (
"senator" text,
"party... |
SELECT COUNT("series_number") FROM "series" WHERE "original_air_date"<1999 AND "number_of_episodes">7 AND "dvd_region_1_release_date"='16 april 2013'; |
## Task
Generate a SQL query to answer the following question:
`How many series originally aired before 1999 with more than 7 episodes and a DVD Region 1 release date of 16 april 2013?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series" (
"series... |
SELECT MAX("original_air_date") FROM "series" WHERE "dvd_region_2_release_date"='23 april 2012' AND "number_of_episodes">10; |
## Task
Generate a SQL query to answer the following question:
`What's the latest original air date with more than 10 episodes and a DVD Region 2 release date of 23 april 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series" (
"series_number"... |
SELECT AVG("original_air_date") FROM "series" WHERE "series_number"=10; |
## Task
Generate a SQL query to answer the following question:
`What was the original air date of series number 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "series" (
"series_number" real,
"number_of_episodes" real,
"original_air_date" rea... |
SELECT SUM("number_of_episodes") FROM "series" WHERE "original_air_date">1991 AND "series_number"<21 AND "dvd_region_2_release_date"='26 march 2012'; |
## Task
Generate a SQL query to answer the following question:
`What's the sum of the number of episodes that originally aired after 1991 with a series number smaller than 21 and a DVD Region 2 release date of 26 march 2012?`
### Database Schema
This query will run on a database whose schema is represented in this st... |
SELECT MIN("series_number") FROM "series" WHERE "original_air_date"<2009 AND "dvd_region_2_release_date"='26 july 2004' AND "number_of_episodes">7; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest series number that originally aired before 2009 with more than 7 episodes and had a DVD Region 2 release date of 26 july 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TA... |
SELECT COUNT("bronze") FROM "medal_table" WHERE "silver">2; |
## Task
Generate a SQL query to answer the following question:
`What is the total of bronze that has more silvers than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"... |
SELECT COUNT("gold") FROM "medal_table" WHERE "bronze">1 AND "total">4; |
## Task
Generate a SQL query to answer the following question:
`What is the total of Golds with more bronzes than 1 and totaled larger than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"gold" real,
"silver" real,... |
SELECT MIN("total") FROM "medal_table" WHERE "bronze">1 AND "silver">2; |
## Task
Generate a SQL query to answer the following question:
`What is the least total that had more Bronzes than 1 and more silvers than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"gold" real,
"silver" real,
... |
SELECT MIN("total") FROM "medal_table" WHERE "gold"<2 AND "rank"=4 AND "bronze"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the least total that has fewer golds than 2, a higher rank than 4 and fewer bronzes than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"gold" r... |
SELECT MIN("bronze") FROM "medal_table" WHERE "rank"=2 AND "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the lest amount of bronzes that ranked 2 and has less silvers than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"gold" real,
"silver" real,
... |
SELECT COUNT("total") FROM "medal_count" WHERE "bronze">13 AND "rank"='8' AND "silver"<11; |
## Task
Generate a SQL query to answer the following question:
`How many Total(s) are there, when the number of Bronze is greater than 13, when the Rank is 8, and when the number of Silver is less than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE... |
SELECT "nation" FROM "medal_count" WHERE "bronze"<17 AND "gold"<16; |
## Task
Generate a SQL query to answer the following question:
`What is the Nation, when the number of Bronze is less than 17, and when the number of Gold is less than 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" text,
... |
SELECT MAX("silver") FROM "medal_count" WHERE "nation"='japan (jpn)' AND "total">37; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of Silver, when the Nation is Japan (JPN), and when the Total is greater than 37?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" text,
... |
SELECT MIN("gold") FROM "medal_count" WHERE "bronze"<36 AND "rank"='2' AND "silver"<37; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of Gold, when the number of Bronze is less than 36, when the Rank is 2, and when Silver is less than 37?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_cou... |
SELECT "res" FROM "iscf_international_sport_combat_federati" WHERE "event"='ft 6 - full throttle 6'; |
## Task
Generate a SQL query to answer the following question:
`What is Res., when Event is "FT 6 - Full Throttle 6"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iscf_international_sport_combat_federati" (
"res" text,
"record" text,
"opponent... |
SELECT "opponent" FROM "iscf_international_sport_combat_federati" WHERE "event"='iscf - southeast championships'; |
## Task
Generate a SQL query to answer the following question:
`What is Opponent, when Event is "ISCF - Southeast Championships"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iscf_international_sport_combat_federati" (
"res" text,
"record" text,... |
SELECT "event" FROM "iscf_international_sport_combat_federati" WHERE "record"='3-0'; |
## Task
Generate a SQL query to answer the following question:
`What is Event, when Record is "3-0"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "iscf_international_sport_combat_federati" (
"res" text,
"record" text,
"opponent" text,
"method... |
SELECT "date" FROM "match_details" WHERE "opponents"='chelsea' AND "league_position"='14th'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the game against Chelsea when the league position is 14th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "match_details" (
"date" text,
"league_position" text,
"... |
SELECT "method" FROM "mixed_martial_arts_record" WHERE "time"='0:46'; |
## Task
Generate a SQL query to answer the following question:
`Which method had a time of 0:46?`
### 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" t... |
SELECT "round" FROM "mixed_martial_arts_record" WHERE "opponent"='brandon bledsoe'; |
## Task
Generate a SQL query to answer the following question:
`In the fight against Brandon Bledsoe, how many rounds did the fight last?`
### 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,
"opp... |
SELECT "method" FROM "mixed_martial_arts_record" WHERE "event"='ufc fight night: teixeira vs. bader'; |
## Task
Generate a SQL query to answer the following question:
`What methos did Keith Wisniewski use in the ufc fight night: teixeira vs. bader?`
### 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,... |
SELECT "vmax" FROM "passenger_car_models" WHERE "capacity"='1.556 cc'; |
## Task
Generate a SQL query to answer the following question:
`What was the maximum speed of the car with 1.556 cc capacity?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passenger_car_models" (
"type" text,
"construction_period" text,
"cylind... |
SELECT "vmax" FROM "passenger_car_models" WHERE "cylinder"='straight-4' AND "capacity"='1.466 cc' AND "type"='r 150'; |
## Task
Generate a SQL query to answer the following question:
`What was the maximum speed for straight-4, 1.466 cc Type r 150?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passenger_car_models" (
"type" text,
"construction_period" text,
"cyli... |
SELECT "vmax" FROM "passenger_car_models" WHERE "type"='p4-1 (24/36 ps)'; |
## Task
Generate a SQL query to answer the following question:
`What was the maximum speed for the P4-1 (24/36 ps)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passenger_car_models" (
"type" text,
"construction_period" text,
"cylinder" text,
... |
SELECT "country" FROM "final_leaderboard" WHERE "player"='jack nicklaus'; |
## Task
Generate a SQL query to answer the following question:
`What country is Jack Nicklaus from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,... |
SELECT "to_par" FROM "final_leaderboard" WHERE "place"='t7' AND "player"='bill britton'; |
## Task
Generate a SQL query to answer the following question:
`What was the To par for bill britton when he placed t7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" te... |
SELECT "to_par" FROM "final_leaderboard" WHERE "player"='jack nicklaus'; |
## Task
Generate a SQL query to answer the following question:
`What was the To par of Jack Nicklaus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" tex... |
SELECT "country" FROM "final_leaderboard" WHERE "money"='45,000'; |
## Task
Generate a SQL query to answer the following question:
`What country was the golfer from who had a money amount of 45,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_leaderboard" (
"place" text,
"player" text,
"country" text,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.