instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE train ( Train_ID int, Name text, Time text, Service text ) CREATE TABLE train_station ( Train_ID int, Station_ID int ) CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, ...
SELECT Name, Total_Passengers FROM station WHERE Location <> 'London'
### Instruction: CREATE TABLE table_26000 ( "Province" text, "Mahmoud Ahmadinejad" real, "Mehdi Karroubi" real, "Mir-Hossein Mousavi" real, "Mohsen Rezaee" real, "Spoiled ballots" real, "Total votes" real ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT MAX("Mir-Hossein Mousavi") FROM table_26000 WHERE "Province" = 'Azarbaijan, West'
### Instruction: CREATE TABLE table_train_198 ( "id" int, "hemoglobin_a1c_hba1c" float, "fasting_plasma_glucose" int, "diabetes" bool, "body_mass_index_bmi" float, "type_1_patients" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT * FROM table_train_198 WHERE hemoglobin_a1c_hba1c >= 7 AND hemoglobin_a1c_hba1c <= 10
### Instruction: CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party_host ( Party_ID int, Host_ID int, ...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY Nationality
### Instruction: CREATE TABLE table_53760 ( "Candidate" text, "Money Raised, 3Q" text, "Loans Received, 3Q" text, "Money Spent, 3Q" text, "Total Receipts" text, "Cash On Hand" text, "Total Debt" text, "After Debt" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Loans Received, 3Q" FROM table_53760 WHERE "Total Debt" = '$169,256'
### Instruction: CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has fr...
SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person) ORDER BY T1.name DESC
### Instruction: CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height re...
SELECT Sex, COUNT(*) FROM people WHERE Weight > 85 GROUP BY Sex ORDER BY COUNT(*)
### Instruction: CREATE TABLE table_2065 ( "Role" text, "Original Broadway Cast" text, "Current Broadway Cast" text, "Original Toronto Cast" text, "First National Tour Cast" text, "Original Australian Cast" text, "Original West End Cast" text, "Current West End Cast" text, "Second Na...
SELECT "Current West End Cast" FROM table_2065 WHERE "Original West End Cast" = 'Jodie Jacobs'
### Instruction: CREATE TABLE table_203_621 ( id number, "player" text, "games played" number, "minutes played" number, "minutes played per game" number, "rebounds" number, "rebounds per game" number, "assists" number, "assists per game" number, "field goal %" number, "free t...
SELECT COUNT("player") FROM table_203_621
### Instruction: CREATE TABLE table_44880 ( "Hanyu" text, "Tongyong" text, "Pe\u030dh-\u014de-j\u012b" text, "Chinese" text, "Area (km\u00b2)" real, "No. of villages" real, "Population (2010)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT MIN("Area (km\u00b2)") FROM table_44880 WHERE "Population (2010)" = '7,616'
### Instruction: CREATE TABLE table_76822 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player has money larger than 11,950 and is placed in t8 and h...
SELECT "Player" FROM table_76822 WHERE "Money ( $ )" > '11,950' AND "Place" = 't8' AND "Score" = '73-68-69-72=282'
### Instruction: CREATE TABLE table_25606 ( "Star" text, "Stellar classification" text, "Distance from Earth ( ly )" text, "Constellation" text, "Dust (or Debris; Temperature (K)" text, "System" text, "Dust (or Debris) Location (AU)" text, "Cool Dust > 10 AU" text, "Stellar Age (Myr)...
SELECT "Stellar Age (Myr)" FROM table_25606 WHERE "Stellar classification" = 'F3V'
### Instruction: CREATE TABLE table_2286 ( "Type" text, "Beam height (mm)" real, "Flange width (mm)" real, "Web thickness (mm)" text, "Flange thickness (mm)" text, "Weight (kg/m)" text, "Cross-section area (cm 2 )" text, "Moment of inertia in torsion (J) (cm 4 )" text ) -- Using valid ...
SELECT COUNT("Weight (kg/m)") FROM table_2286 WHERE "Flange width (mm)" = '304'
### Instruction: CREATE TABLE table_65810 ( "Airing date" text, "English title (Chinese title)" text, "Number of episodes" real, "Genre" text, "Official website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the airing date of Armed Reaction...
SELECT "Airing date" FROM table_65810 WHERE "Official website" = 'official website' AND "Number of episodes" = '20' AND "Genre" = 'modern action' AND "English title (Chinese title)" = 'armed reaction 陀槍師姐'
### Instruction: CREATE TABLE table_1896 ( "Position" real, "Sail Number" text, "Yacht" text, "State/Country" text, "Yacht Type" text, "LOA (Metres)" text, "Skipper" text, "Elapsed Time d:hh:mm:ss" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Yacht Type" FROM table_1896 WHERE "Elapsed Time d:hh:mm:ss" = '3:15:28:24'
### Instruction: CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE appellatio...
SELECT price FROM wine WHERE year < 2010
### Instruction: CREATE TABLE table_42661 ( "Season" text, "Team" text, "Country" text, "Division" real, "Apps" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Division, when Goals are less than 10, when Team is D...
SELECT MIN("Division") FROM table_42661 WHERE "Goals" < '10' AND "Team" = 'dalian shide' AND "Apps" < '17' AND "Season" = '2007'
### Instruction: CREATE TABLE table_56227 ( "D 50" text, "D 49" text, "D 48" text, "D 47" text, "D 46" text, "D 45" text, "D 44" text, "D 43" text, "D 42" text, "D 41" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the D ...
SELECT "D 50" FROM table_56227 WHERE "D 43" = 'r 43'
### Instruction: CREATE TABLE table_56228 ( "D 50" text, "D 49" text, "D 48" text, "D 47" text, "D 46" text, "D 45" text, "D 44" text, "D 43" text, "D 42" text, "D 41" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the D ...
SELECT "D 42" FROM table_56228 WHERE "D 50" = 'd 31'
### Instruction: CREATE TABLE table_74707 ( "Name" text, "Case type" text, "Bullet diameter" text, "Neck diameter" text, "Base diameter" text, "Rim diameter" text, "Case length" text, "Cartridge length" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT "Case type" FROM table_74707 WHERE "Base diameter" = '13.03 (.513)' AND "Case length" = '63.5 (2.5)'
### Instruction: CREATE TABLE table_train_169 ( "id" int, "leukocytes" int, "hemoglobin_a1c_hba1c" float, "urine_albumin_excretion" int, "estimated_glomerular_filtration_rate_egfr" int, "glucola_beverage_gct" int, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following...
SELECT * FROM table_train_169 WHERE urine_albumin_excretion < 300
### Instruction: CREATE TABLE table_name_49 ( population_millions INTEGER, inhabitants_per_mep VARCHAR, member_state VARCHAR, influence VARCHAR, meps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the population in millions tha...
SELECT SUM(population_millions) FROM table_name_49 WHERE influence < 2.91 AND meps < 13 AND member_state = "latvia" AND inhabitants_per_mep > 286 OFFSET 875
### Instruction: CREATE TABLE table_57569 ( "Coach" text, "Season" text, "Record" text, "Home" text, "Away" text, "Win %" real, "Average (Total) Home Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the away score with a w...
SELECT "Away" FROM table_57569 WHERE "Win %" = '0.75' AND "Average (Total) Home Attendance" = '4,686 (18,744)'
### Instruction: CREATE TABLE table_name_28 ( area__km_2__ INTEGER, population__2011_ VARCHAR, density__inhabitants_km_2__ VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the area in km2 for Cape Agulhas, whose density is larger ...
SELECT MAX(area__km_2__) FROM table_name_28 WHERE density__inhabitants_km_2__ > 9.4 AND name = "cape agulhas" AND population__2011_ < 33 OFFSET 038
### Instruction: CREATE TABLE table_47262 ( "Country" text, "Skip" text, "Ends Won" real, "Ends Lost" real, "Blank Ends F/A" text, "Stolen Ends For" real, "Stolen Ends Against" real, "Shot %" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT "Stolen Ends Against" FROM table_47262 WHERE "Blank Ends F/A" = '4/7' AND "Country" = 'china'
### Instruction: CREATE TABLE table_12849 ( "Governorate" text, "Cereals" real, "Fruit Trees" real, "Olives" real, "Industrial crops" real, "Vegetables" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of olives of the go...
SELECT MIN("Olives") FROM table_12849 WHERE "Industrial crops" < '247,265' AND "Cereals" > '37,638'
### Instruction: CREATE TABLE table_65315 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2003)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Constituency Number...
SELECT "Constituency number" FROM table_65315 WHERE "Number of electorates (2003)" > '156,910' AND "Reserved for ( SC / ST /None)" = 'sc'
### Instruction: CREATE TABLE table_203_408 ( id number, "rd." number, "grand prix" text, "date" text, "location" text, "pole position" text, "fastest lap" text, "winning driver" text, "constructor" text, "report" text ) -- Using valid SQLite, answer the following questions for...
SELECT "winning driver" FROM table_203_408 WHERE "rd." > (SELECT "rd." FROM table_203_408 WHERE "winning driver" = 'nigel mansell') ORDER BY "rd." LIMIT 1
### Instruction: CREATE TABLE table_42331 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which runner(s)-up had a Winning score of 13 (68-70-66-71=275) ...
SELECT "Runner(s)-up" FROM table_42331 WHERE "Margin of victory" = '3 strokes' AND "Winning score" = '–13 (68-70-66-71=275)'
### Instruction: CREATE TABLE table_26002 ( "Province" text, "Mahmoud Ahmadinejad" real, "Mehdi Karroubi" real, "Mir-Hossein Mousavi" real, "Mohsen Rezaee" real, "Spoiled ballots" real, "Total votes" real ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT MAX("Mir-Hossein Mousavi") FROM table_26002 WHERE "Spoiled ballots" = '5683'
### Instruction: CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY T2.title DESC
### Instruction: CREATE TABLE table_61044 ( "Date" text, "\"Inventor\"" text, "Marketed as" text, "Mutated From" text, "Assignee" text, "Habit" text, "Pattern" text, "Earlier" text, "Color" text, "Plant Patent Number" text ) -- Using valid SQLite, answer the following questions...
SELECT "Mutated From" FROM table_61044 WHERE "Plant Patent Number" = 'us plant patent 9645'
### Instruction: CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, ...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY Nationality
### Instruction: CREATE TABLE table_29689 ( "Currency" text, "Country" text, "Generic Name or Nickname" text, "Rating ( S&P / Moodys )" text, "Negotiable debt at mid-2005 ( US dollar bn equivalent)" real, "Government financial liabilities as % of GDP (end 2003 - source : OECD )" text, "Issue...
SELECT "Country" FROM table_29689 WHERE "Currency" = 'Yen'
### Instruction: CREATE TABLE table_32552 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the away team's score ...
SELECT "Away team score" FROM table_32552 WHERE "Crowd" > '25,819' AND "Home team score" = '14.10 (94)'
### Instruction: CREATE TABLE table_53521 ( "Player" text, "Tackles" real, "Solo" real, "Assisted" real, "Sack" real, "Yards" real, "TD's" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the lowest solo when assisted is less than 10, ...
SELECT MIN("Solo") FROM table_53521 WHERE "Assisted" < '10' AND "TD's" = '0' AND "Sack" < '3' AND "Yards" > '5'
### Instruction: CREATE TABLE table_39085 ( "Team" text, "Recopa 1994" text, "Supercopa 1994" text, "CONMEBOL 1994" text, "Copa Libertadores 1995" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Recopa 1994 has a Supercopa 1994 of 1st round, an...
SELECT "Recopa 1994" FROM table_39085 WHERE "Supercopa 1994" = '1st round' AND "Team" = 'argentinos juniors'
### Instruction: CREATE TABLE table_76399 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest events when the cuts made i...
SELECT MAX("Events") FROM table_76399 WHERE "Cuts made" < '34' AND "Top-25" < '5' AND "Top-10" > '1'
### Instruction: CREATE TABLE table_53663 ( "English" text, "Scots" text, "West Frisian" text, "Afrikaans" text, "Dutch" text, "Dutch ( Limburgish )" text, "Low German" text, "Low German ( Groningen )" text, "Middle German ( Luxemburgish )" text, "German" text, "Yiddish" text...
SELECT "Dutch" FROM table_53663 WHERE "English" = 'one'
### Instruction: CREATE TABLE table_68902 ( "Rank" real, "Country/Region" text, "Population" real, "Area (km 2 )" real, "Density (Pop. per km 2 )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest rank of the region with an area larg...
SELECT MIN("Rank") FROM table_68902 WHERE "Area (km 2 )" > '3,185,263' AND "Population" = '16,760,000'
### Instruction: CREATE TABLE table_7596 ( "Format name" text, "Container" text, "Video coding" text, "Bit depth" real, "Color sampling" text, "Frame size" text, "Video bit rate, Mbit/s" text, "Audio coding" text ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT AVG("Bit depth") FROM table_7596 WHERE "Video bit rate, Mbit/s" = '25 (cbr)' AND "Color sampling" = '4:1:1'
### Instruction: CREATE TABLE table_79484 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of Gold with a Bronze that's larger than 15, Silver that's smaller than 197, ...
SELECT SUM("Gold") FROM table_79484 WHERE "Bronze" > '15' AND "Silver" < '197' AND "Nation" = 'saint lucia' AND "Total" > '50'
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
### Instruction: CREATE TABLE table_44981 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" real, "Avg. Finish" real, "Winnings" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT SUM("Avg. Finish") FROM table_44981 WHERE "Starts" = '9' AND "Top 10" < '0'
### Instruction: CREATE TABLE table_203_149 ( id number, "pick" number, "player" text, "team" text, "position" text, "school" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which was a higher round pick for rhp , the pick from the seattle marine...
SELECT "team" FROM table_203_149 WHERE "team" IN ('seattle mariners', 'baltimore orioles', 'los angeles dodgers', 'houston astros') AND "position" = 'rhp' ORDER BY "pick" LIMIT 1
### Instruction: CREATE TABLE table_16156 ( "Model" real, "Introduction" text, "Discontinued" text, "CPU Speed" text, "Print resolution (DPI) Resolution is given in dots per inch (DPI)" text, "Print speed (PPM)" text, "Standard memory" text, "Maximum memory" text ) -- Using valid SQLit...
SELECT "Print resolution (DPI) Resolution is given in dots per inch (DPI)" FROM table_16156 WHERE "Introduction" = 'December 2002'
### Instruction: CREATE TABLE customer_orders ( customer_id VARCHAR, order_id VARCHAR ) CREATE TABLE order_items ( order_quantity INTEGER, order_id VARCHAR ) CREATE TABLE customers ( customer_id VARCHAR, customer_name VARCHAR ) -- Using valid SQLite, answer the following questions for the ta...
SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney"
### Instruction: CREATE TABLE table_15513 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the method of the match in...
SELECT "Method" FROM table_15513 WHERE "Time" = '5:00' AND "Round" < '3' AND "Res." = 'loss' AND "Event" = 'road fc 12'
### Instruction: CREATE TABLE table_41649 ( "Year" text, "Starts" real, "Cuts Made" real, "Wins" real, "Top 10" real, "Top 25" real, "Earnings (\u20ac)" real, "Money list rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the a...
SELECT AVG("Starts") FROM table_41649 WHERE "Money list rank" = '108' AND "Top 25" > '4'
### Instruction: CREATE TABLE aircraft ( aid number, name text, distance number ) CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE employee ( eid number, ...
SELECT departure_date, arrival_date FROM flight WHERE origin = "Los Angeles" AND destination = "Honolulu"
### Instruction: CREATE TABLE table_train_76 ( "id" int, "mini_mental_state_examination_mmse" int, "language" string, "csf" int, "rosen_modified_hachinski_ischemic_score" int, "ad" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT * FROM table_train_76 WHERE mini_mental_state_examination_mmse >= 17 AND mini_mental_state_examination_mmse <= 24
### Instruction: CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE party ( party_id number, year number, party text, governor text, lieutenant_governor text, comptroller text, attorney_general text, us_senate text )...
SELECT DISTINCT district FROM election
### Instruction: CREATE TABLE table_34639 ( "Poll source" text, "Dates administered" text, "John Oxendine" text, "Karen Handel" text, "Nathan Deal" text, "Eric Johnson" text, "Ray McBerry" text, "Undecided" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "Karen Handel" FROM table_34639 WHERE "Poll source" = 'insideradvantage' AND "John Oxendine" = '15%'
### Instruction: CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number ) CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ...
SELECT COUNT(DISTINCT artist_id) FROM volume
### Instruction: CREATE TABLE table_203_459 ( id number, "township" text, "fips" number, "population\ncenter" text, "population" number, "population\ndensity\n/km2 (/sq mi)" text, "land area\nkm2 (sq mi)" text, "water area\nkm2 (sq mi)" text, "water %" text, "geographic coordinat...
SELECT "township" FROM table_203_459 WHERE "population" = 1660
### Instruction: CREATE TABLE table_29762 ( "Stadium" text, "City" text, "Capacity" real, "Matches played" real, "Overall attendance" real, "Average attendance per match" real, "Average attendance as % of Capacity" text, "Overall goals scored" real, "Average goals scored per match" t...
SELECT COUNT("Matches played") FROM table_29762 WHERE "Average goals scored per match" = '1.25'
### Instruction: CREATE TABLE table_45090 ( "Position" real, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT MAX("Goals for") FROM table_45090 WHERE "Position" > '8' AND "Losses" = '12' AND "Played" < '30'
### Instruction: CREATE TABLE table_65343 ( "Author / Editor / Source" text, "Year of publication" text, "Countries sampled" real, "World Ranking (1)" text, "Ranking in Latin America (2)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the wor...
SELECT "World Ranking (1)" FROM table_65343 WHERE "Year of publication" = '2011' AND "Ranking in Latin America (2)" > '3' AND "Countries sampled" > '142'
### Instruction: CREATE TABLE table_76054 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the lowest top-5 with a top-25 larger ...
SELECT MIN("Top-5") FROM table_76054 WHERE "Top-25" > '4' AND "Cuts made" = '29' AND "Top-10" > '18'
### Instruction: CREATE TABLE table_train_21 ( "id" int, "pregnancy_or_lactation" bool, "severe_sepsis" bool, "systolic_blood_pressure_sbp" int, "active_infection" bool, "limited_care" bool, "septic_shock" bool, "coagulopathy" bool, "age" float, "lactate" int, "NOUSE" float )...
SELECT * FROM table_train_21 WHERE coagulopathy = 1
### Instruction: CREATE TABLE table_5658 ( "Club" text, "Position in 2012\u201313" text, "First season in top division" text, "Number of seasons in top division" real, "Number of seasons in Prva HNL" real, "First season of current spell in top division" text, "Top division titles" text, ...
SELECT AVG("Number of seasons in top division") FROM table_5658 WHERE "Number of seasons in Prva HNL" = '17'
### Instruction: CREATE TABLE table_train_72 ( "id" int, "extracorporeal_membrane_oxygenation_ecmo_cannulation" bool, "heart_disease" bool, "meningitis_or_encephalitis" bool, "sepsis" bool, "cancer" bool, "prisoners" bool, "NOUSE" float ) -- Using valid SQLite, answer the following que...
SELECT * FROM table_train_72 WHERE extracorporeal_membrane_oxygenation_ecmo_cannulation = 1
### Instruction: CREATE TABLE table_19717 ( "Rank" real, "Name" text, "Nationality" text, "Total points" text, "Oberstdorf (Rk)" text, "Ga-Pa (Rk)" text, "Bhofen#1 (Rk)" text, "Bhofen#2 (Rk)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT "Total points" FROM table_19717 WHERE "Oberstdorf (Rk)" = '252.6 (11)'
### Instruction: CREATE TABLE table_43954 ( "Constellation" text, "Largest component, fractional share" real, "Other components, fractional shares" text, "N, Laakso-Taagepera" real, "N, Golosov" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT SUM("Largest component, fractional share") FROM table_43954 WHERE "Constellation" = 'e' AND "N, Golosov" > '2.9'
### Instruction: CREATE TABLE table_name_12 ( general_classification VARCHAR, stage VARCHAR, mountains_classification VARCHAR, trofeo_fast_team VARCHAR, points_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the general clas...
SELECT general_classification FROM table_name_12 WHERE trofeo_fast_team = "mapei-bricobi" AND points_classification = "mariano piccoli" AND mountains_classification = "marco pantani" AND stage = "22"
### Instruction: CREATE TABLE table_59037 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the table...
SELECT MAX("Points") FROM table_59037 WHERE "Club" = 'cf calvo sotelo' AND "Goal Difference" > '-3'
### Instruction: CREATE TABLE table_27402 ( "Language" text, "Sorata Municipality" text, "Guanay Municipality" text, "Tacacoma Municipality" text, "Quiabaya Municipality" text, "Combaya Municipality" text, "Tipuani Municipality" text, "Mapiri Municipality" text, "Teoponte Municipalit...
SELECT "Sorata Municipality" FROM table_27402 WHERE "Quiabaya Municipality" = '33'
### Instruction: CREATE TABLE table_14607 ( "Season" text, "Winner" text, "Runner-up" text, "Third" text, "Winner Men" text, "Winner Women" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country was the winner in season 1997/98 when Russia ...
SELECT "Winner" FROM table_14607 WHERE "Runner-up" = 'russia' AND "Winner Women" = 'russia' AND "Third" = 'italy' AND "Season" = '1997/98'
### Instruction: CREATE TABLE table_64397 ( "Season" real, "Series" text, "Team" text, "Races" text, "Wins" text, "Poles" text, "F/Laps" text, "Podiums" text, "Points" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "F/Laps" FROM table_64397 WHERE "Points" = 'n/a' AND "Poles" = '1' AND "Wins" = '0'
### Instruction: CREATE TABLE accounts ( custid number, name text ) CREATE TABLE savings ( custid number, balance number ) CREATE TABLE checking ( custid number, balance number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name, checking ...
SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC
### Instruction: CREATE TABLE table_203_185 ( id number, "season" text, "a\ntechnical" text, "b\nscientific" text, "c\nfine arts" text, "d\nimprovisational" text, "e\nstructural" text, "rising stars!\u00ae" text, "po\nprojectoutreach\u00ae" text, "university level" text ) -- Us...
SELECT "season" FROM table_203_185 WHERE NOT "university level" IS NULL
### Instruction: CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE appellatio...
SELECT MAX(price), MAX(score), year FROM wine GROUP BY year
### Instruction: CREATE TABLE table_53049 ( "Raion (district) or City" text, "Total" text, "Ukrainians" text, "Moldovans" text, "Bessarabian Bulgarians" text, "Russians" text, "Gagauzians" text, "Other ethnic groups\u00b2" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Moldovans" FROM table_53049 WHERE "Ukrainians" = '14,200'
### Instruction: CREATE TABLE table_59858 ( "Team" text, "Average" real, "Points" real, "Played" real, "1991-92" text, "1992-93" text, "1993-94" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 1991-92 has a 1993-94 smaller than 34, and ...
SELECT "1991-92" FROM table_59858 WHERE "1993-94" < '34' AND "Team" = 'argentinos juniors'
### Instruction: CREATE TABLE table_22228 ( "Year" real, "Miss Universe Philippines" text, "Binibining Pilipinas-World" text, "Binibining Pilipinas-International" text, "Binibining Pilipinas-Tourism" text, "First runner-up" text, "Second runner-up" text ) -- Using valid SQLite, answer the ...
SELECT COUNT("Binibining Pilipinas-International") FROM table_22228 WHERE "Miss Universe Philippines" = 'Nina Ricci Alagao'
### Instruction: CREATE TABLE table_16912 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for the tournamen...
SELECT "Score" FROM table_16912 WHERE "Location" = 'Michigan' AND "Purse( $ )" < '1813335.221493934'
### Instruction: CREATE TABLE Certificate ( eid VARCHAR, aid VARCHAR ) CREATE TABLE Employee ( name VARCHAR, eid VARCHAR ) CREATE TABLE Aircraft ( aid VARCHAR, distance INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the salary and n...
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE market ( Market_ID int, Country text, Number_cities int ) CREATE TABLE film ( Film_ID int, Title text, Studio text, Director text, Gross_in_dollar int ) CREATE TABLE film_market_estimation ( Estimation_ID int, Low_Estimate real, High_Estimate r...
SELECT Low_Estimate, High_Estimate FROM film_market_estimation
### Instruction: CREATE TABLE table_65466 ( "Model" text, "Years" text, "Type/code" text, "Power@rpm" text, "Torque@rpm" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name Model which has a Years of 2006 2008 and a Torque@rpm of n m (lb ft) @1900 3...
SELECT "Model" FROM table_65466 WHERE "Years" = '2006–2008' AND "Torque@rpm" = 'n·m (lb·ft) @1900–3500'
### Instruction: CREATE TABLE table_203_723 ( id number, "year" number, "song" text, "us hot 100" number, "us msr" number, "us a.c." number, "can" number, "uk singles" number, "album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- wh...
SELECT "song" FROM table_203_723 WHERE "year" = 1995 AND id > (SELECT id FROM table_203_723 WHERE "song" = '"i live my life for you"')
### Instruction: CREATE TABLE table_train_199 ( "id" int, "t2dm" bool, "hemoglobin_a1c_hba1c" float, "renal_disease" bool, "diabetic" string, "hypoglycemia" bool, "diabetes" bool, "seizure_disorder" bool, "glaucoma" bool, "hypertension" bool, "age" float, "NOUSE" float ) ...
SELECT * FROM table_train_199 WHERE glaucoma = 1
### Instruction: CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE school ( School_ID int, Grade text, School text, Location text, Type text ) CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_...
SELECT Home_city, COUNT(Home_city) FROM driver GROUP BY Home_city ORDER BY Home_city
### Instruction: CREATE TABLE office_locations ( building_id number, company_id number, move_in_year number ) CREATE TABLE buildings ( id number, name text, city text, height number, stories number, status text ) CREATE TABLE companies ( id number, name text, headquarte...
SELECT industry FROM companies GROUP BY industry ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_25440 ( "Administrative Region" text, "Population (2002 census data)" real, "Surface km 2" real, "Main Rivers" text, "Average annual rainfall (mm)" text, "Average annual runoff (mm)" text, "Per capita average annual renewable water resources m 3" real ) ...
SELECT COUNT("Per capita average annual renewable water resources m 3") FROM table_25440 WHERE "Average annual rainfall (mm)" = '650'
### Instruction: CREATE TABLE table_21223 ( "Province" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot Pct." real ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Skip" FROM table_21223 WHERE "Shot Pct." = '88' AND "Province" = 'Alberta'
### Instruction: CREATE TABLE table_12412 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number...
SELECT MIN("Goals Scored") FROM table_12412 WHERE "Draw" < '6' AND "Lost" > '3' AND "Goals Conceded" > '30'
### Instruction: CREATE TABLE table_33108 ( "Week" real, "Kickoff" text, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "NFL.com Recap" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the kickoff tha...
SELECT "Kickoff" FROM table_33108 WHERE "NFL.com Recap" = 'recap' AND "Week" < '17' AND "Game Site" = 'arrowhead stadium'
### Instruction: CREATE TABLE table_51880 ( "D 41" text, "D 42" text, "D 43" text, "D 44" text, "D 45" text, "D 46" text, "R 54" text, "R 53" text, "R 52" text, "R 51" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the D 42 ...
SELECT "D 42" FROM table_51880 WHERE "D 46" = 'r 26'
### Instruction: CREATE TABLE table_204_156 ( id number, "year" number, "crystal bicycle\n(best professional cyclist)" text, "best young rider" text, "best manager" text, "crystal drop of sweat\n(best helper)" text ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT "crystal bicycle\n(best professional cyclist)" FROM table_204_156 WHERE "crystal bicycle\n(best professional cyclist)" IN ('tom boonen', 'sven nys') ORDER BY "year" LIMIT 1
### Instruction: CREATE TABLE table_60836 ( "Player" text, "Pos." text, "Nationality" text, "Previous team" text, "Years of NBA experience [a ]" real, "Career with the franchise" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the career ...
SELECT "Career with the franchise" FROM table_60836 WHERE "Years of NBA experience [a ]" < '9' AND "Pos." = 'f/c' AND "Previous team" = 'phoenix suns'
### Instruction: CREATE TABLE table_17777 ( "Sequencer" text, "Ion Torrent PGM" text, "454 GS FLX" text, "HiSeq 2000" text, "SOLiDv4" text, "PacBio" text, "Sanger 3730xl" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHat is hiseq 2000 when...
SELECT "HiSeq 2000" FROM table_17777 WHERE "454 GS FLX" = '700 bp'
### Instruction: CREATE TABLE table_76417 ( "Season" text, "Series" text, "Team" text, "Races" text, "Wins" text, "Poles" text, "F/Laps" text, "Podiums" text, "Points" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "Points" FROM table_76417 WHERE "Wins" = '0' AND "Podiums" = '0' AND "Races" = '4'
### Instruction: CREATE TABLE table_45729 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Outcome w...
SELECT "Outcome" FROM table_45729 WHERE "Score in the final" = '4–6, 4–6' AND "Date" = 'october 21, 1990'
### Instruction: CREATE TABLE table_204_693 ( id number, "place" text, "total" number, "men" number, "women" number, "children" number, "elderly" number, "serbs" number, "jews" number, "romani" number, "rusyns" number, "hungarians" number, "russians" number ) -- Usi...
SELECT "children" + "elderly" FROM table_204_693 WHERE "place" = 'becej'
### Instruction: CREATE TABLE table_25113 ( "#" real, "Name" text, "Name (English)" text, "Population 2008-07-01" real, "Area (km\u00b2)" real, "Pop./ km\u00b2" text, "ISO 3166-2" text, "Administrative centre" text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT MAX("Population 2008-07-01") FROM table_25113 WHERE "Administrative centre" = 'Selfoss'
### Instruction: CREATE TABLE table_21170 ( "Date of Sterilization" text, "Age 10-19" real, "Age 20-29" real, "Age 30-39" real, "Age 40-49" real, "Age 50-59" real, "Age Unknown" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT "Age 30-39" FROM table_21170 WHERE "Age 10-19" = '380'
### Instruction: CREATE TABLE country ( country_id number, name text, population number, area number, languages text ) CREATE TABLE roller_coaster ( roller_coaster_id number, name text, park text, country_id number, length number, height number, speed text, opened te...
SELECT T1.name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.country_id = T2.country_id GROUP BY T1.name HAVING COUNT(*) > 1
### Instruction: CREATE TABLE table_18864 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" text, "Time" text, "Jockey" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT COUNT("Weight (kg)") FROM table_18864 WHERE "Winner/2nd" = '1st - Defier' AND "Venue" = 'Randwick'
### Instruction: CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE appellatio...
SELECT COUNT(*) FROM wine WHERE winery = "Robert Biale"
### Instruction: CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE head ( head_ID int, name text, born_state text, age real ) CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billi...
SELECT Creation, COUNT(Creation) FROM department GROUP BY Creation ORDER BY Creation DESC