instruction stringlengths 212 6.3k | output stringlengths 6 2.03k |
|---|---|
### Instruction:
CREATE TABLE table_37546 (
"Name" text,
"Length" text,
"Tonnage" real,
"Built by" text,
"Year" real,
"Engines" text,
"Horsepowers" real,
"Former Names" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Horsepowers ... | SELECT SUM("Horsepowers") FROM table_37546 WHERE "Year" < '1974' AND "Tonnage" = '4437' |
### Instruction:
CREATE TABLE table_11562 (
"HP Model" text,
"Command Set" text,
"# FDD" real,
"FDD Type" text,
"Sides" text,
"FDD Capacity (each)" text,
"# HDD" real,
"HDD Capacity" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me... | SELECT "HDD Capacity" FROM table_11562 WHERE "# FDD" > '0' AND "FDD Capacity (each)" = '710kb' |
### Instruction:
CREATE TABLE table_1598533_8 (
inflation__percentage_annual__2012_ VARCHAR,
gdp_per_capita_in_ppp_us$__2012_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the annual inflation % when GDP per capita in ppp US$ is 24505 in 2012?
###... | SELECT inflation__percentage_annual__2012_ FROM table_1598533_8 WHERE gdp_per_capita_in_ppp_us$__2012_ = 24505 |
### Instruction:
CREATE TABLE scientists (
SSN VARCHAR,
name VARCHAR
)
CREATE TABLE projects (
hours INTEGER,
code VARCHAR
)
CREATE TABLE assignedto (
project VARCHAR,
scientist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the total ... | SELECT SUM(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith' |
### Instruction:
CREATE TABLE table_203_237 (
id number,
"n" number,
"p" text,
"nat." text,
"name" text,
"age" number,
"moving from" text,
"type" text,
"transfer\nwindow" text,
"ends" number,
"transfer\nfee" text
)
-- Using valid SQLite, answer the following questions for t... | SELECT "name" FROM table_203_237 WHERE "transfer\nfee" = 0.67 |
### Instruction:
CREATE TABLE table_28207 (
"Celebrity" text,
"Known for" text,
"Age" real,
"Professional" text,
"Series" real,
"Place" text,
"Dances" real,
"Highest score" real,
"Lowest score" real,
"Aggregate" real,
"Average" text
)
-- Using valid SQLite, answer the follo... | SELECT MAX("Age") FROM table_28207 WHERE "Aggregate" = '402' |
### Instruction:
CREATE TABLE table_71635 (
"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
)
-- Using valid SQLite, answer the foll... | SELECT "Tries for" FROM table_71635 WHERE "Club" = 'waunarlwydd rfc' |
### Instruction:
CREATE TABLE table_73774 (
"June 10-11" text,
"March 27-29" text,
"January 15-16" text,
"November 3" text,
"August 21-22" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is shown for november 3 when june 10-11 is june 10, 1964?
... | SELECT "November 3" FROM table_73774 WHERE "June 10-11" = 'June 10, 1964' |
### Instruction:
CREATE TABLE table_79612 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the total is larger than 1,and the bronze is less than 3, and silver l... | SELECT "Nation" FROM table_79612 WHERE "Total" > '1' AND "Bronze" < '3' AND "Silver" > '2' AND "Gold" > '2' |
### Instruction:
CREATE TABLE table_14852 (
"Name" text,
"Code" text,
"Capacity" text,
"Power" text,
"Acceleration 0\u2013100km/h" text,
"Top speed" text,
"Combined consumption" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the capa... | SELECT "Capacity" FROM table_14852 WHERE "Acceleration 0\u2013100km/h" = '11.1 s' |
### Instruction:
CREATE TABLE table_203_417 (
id number,
"rnd." number,
"pick #" number,
"nfl team" text,
"player" text,
"pos." text,
"college" text,
"conf." text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- was roy willia... | SELECT (SELECT "pick #" FROM table_203_417 WHERE "player" = 'roy williams') < (SELECT "pick #" FROM table_203_417 WHERE "player" = 'ryan sims') |
### Instruction:
CREATE TABLE table_16560 (
"#" real,
"Episode" text,
"Air Date" text,
"Time slot (EST)" text,
"Rating" text,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" text,
"Rank (Overall)" text
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT "Time slot (EST)" FROM table_16560 WHERE "Episode" = 'The Way We Weren''t' |
### Instruction:
CREATE TABLE table_51821 (
"Name" text,
"Code" text,
"Capacity" text,
"Type" text,
"Power" text,
"Torque" text,
"Top speed" text,
"Combined consumption" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the power of... | SELECT "Power" FROM table_51821 WHERE "Combined consumption" = '(gas/ethanol)' AND "Code" = 'k7m hi-torque' |
### 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 Name, Weight FROM people ORDER BY Weight DESC |
### Instruction:
CREATE TABLE table_204_334 (
id number,
"opposition" text,
"matches" number,
"won" number,
"drawn" number,
"lost" number,
"for" number,
"against" number,
"win%" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did the ... | SELECT "opposition" FROM table_204_334 WHERE "opposition" IN ('pune strykers', 'karnataka lions') ORDER BY "win%" DESC LIMIT 1 |
### Instruction:
CREATE TABLE table_58343 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Right ascension (J2000) has a Con... | SELECT "Right ascension ( J2000 )" FROM table_58343 WHERE "Constellation" = 'mensa' AND "NGC number" > '2171' |
### Instruction:
CREATE TABLE table_22474 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT "Longitude" FROM table_22474 WHERE "Water (sqmi)" = '0.068' |
### Instruction:
CREATE TABLE table_27873 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT COUNT("Type") FROM table_27873 WHERE "Cyrillic Name Other Names" = 'Падина (Slovak: Padina)' |
### Instruction:
CREATE TABLE table_47277 (
"Tournament" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE 2010 PERFORMANCE THAT HAD 2009 0F 0, AND FINALS TOURNAMENT?
##... | SELECT "2010" FROM table_47277 WHERE "2009" = '0' AND "Tournament" = 'finals' |
### Instruction:
CREATE TABLE table_54523 (
"Grade" text,
"Points" real,
"Sit-up (reps)" text,
"Standing Broad Jump (cm)" text,
"Chin-up (reps)" text,
"Shuttle Run (sec)" text,
"2.4km Run (min:sec)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT COUNT("Points") FROM table_54523 WHERE "Standing Broad Jump (cm)" = '207-215' |
### Instruction:
CREATE TABLE table_20223 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text,
"Pictorials" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- IN THE ISSUE WHERE LENNY KRAVITZ ANS... | SELECT COUNT("Pictorials") FROM table_20223 WHERE "20 Questions" = 'Lenny Kravitz' |
### Instruction:
CREATE TABLE table_train_99 (
"id" int,
"mini_mental_state_examination_mmse" int,
"language" string,
"renal_disease" bool,
"hepatic_disease" bool,
"allergy_to_formoterol" bool,
"geriatric_depression_scale_gds" int,
"NOUSE" float
)
-- Using valid SQLite, answer the foll... | SELECT * FROM table_train_99 WHERE hepatic_disease = 1 OR renal_disease = 1 |
### Instruction:
CREATE TABLE table_46005 (
"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 COUNT("Goal Difference") FROM table_46005 WHERE "Goals for" < '49' AND "Position" < '8' |
### Instruction:
CREATE TABLE table_66140 (
"Name" text,
"Diameter (km)" text,
"Perihelion (AU)" real,
"Aphelion (AU)" real,
"Year discovered" real,
"Discoverer(s)" text,
"Type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the disc... | SELECT "Discoverer(s)" FROM table_66140 WHERE "Aphelion (AU)" > '97' AND "Year discovered" = '2004' |
### Instruction:
CREATE TABLE table_24632 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT COUNT("Position") FROM table_24632 WHERE "Avg. Start" = '23.7' |
### Instruction:
CREATE TABLE table_68871 (
"BR/SR No." text,
"SR Name" text,
"LSWR No." real,
"Builder" text,
"Built" real,
"To IoW" real,
"Withdrawn" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of the year withdrawn f... | SELECT COUNT("Withdrawn") FROM table_68871 WHERE "LSWR No." > '210' AND "To IoW" = '1923' |
### Instruction:
CREATE TABLE table_9330 (
"Province" text,
"Area (km 2 )" real,
"Total population (2000 census)" text,
"Total population (2005 estimate)" real,
"Total population (2010 census)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which To... | SELECT MAX("Total population (2010 census)") FROM table_9330 WHERE "Area (km 2 )" < '147,307.00' |
### Instruction:
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stock int
)
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops... | SELECT Carrier, AVG(Memory_in_G) FROM phone GROUP BY Carrier |
### Instruction:
CREATE TABLE table_13312 (
"Number" real,
"Sanskrit" text,
"International Alphabet of Sanskrit Transliteration" text,
"Sanskrit gloss" text,
"Western name" text,
"Greek" text,
"Gloss" text,
"Tattva (Element)" text,
"Quality" text,
"Ruling Planet" text
)
-- Usin... | SELECT MIN("Number") FROM table_13312 WHERE "Western name" = 'aquarius' |
### Instruction:
CREATE TABLE table_79770 (
"Rocket" text,
"Country" text,
"Type" text,
"Launches" real,
"Successes" real,
"Failures" real,
"Partial failures" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total failures among roc... | SELECT COUNT("Failures") FROM table_79770 WHERE "Successes" > '3' AND "Type" = 'ariane 5' AND "Partial failures" > '0' |
### Instruction:
CREATE TABLE table_65488 (
"Year" real,
"Venue" text,
"Men's Open" text,
"Women's Open" text,
"Men's 35s" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Men's 35 in year before 1990 when Men's Open is NSW and the venue i... | SELECT "Men's 35s" FROM table_65488 WHERE "Year" < '1990' AND "Men's Open" = 'nsw' AND "Venue" = 'sydney' |
### Instruction:
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
-- Using valid SQLite, answer the following questions for t... | SELECT Class, COUNT(Class) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain) GROUP BY Class ORDER BY Class |
### Instruction:
CREATE TABLE table_25648 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT "Year" FROM table_25648 WHERE "Avg. Start" = '22.4' |
### Instruction:
CREATE TABLE table_29764 (
"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 "Elevation" FROM table_29764 WHERE "City" = 'Port Elizabeth' |
### Instruction:
CREATE TABLE table_204_978 (
id number,
"position" number,
"nation" number,
"number" number,
"name" text,
"soproni liga" number,
"uefa cup" number,
"hungarian cup" number,
"league cup" number,
"total" number
)
-- Using valid SQLite, answer the following questio... | SELECT "name" FROM table_204_978 WHERE id = (SELECT id FROM table_204_978 WHERE "name" = 'peter biro') - 1 |
### Instruction:
CREATE TABLE table_70262 (
"1-person dive" text,
"2-person dive" text,
"3-person dive" text,
"Surface" text,
"Cage dive" text,
"Seal/turtle decoy" text,
"Catch release" text,
"Attached camera" text,
"Remote camera" text
)
-- Using valid SQLite, answer the following... | SELECT "Cage dive" FROM table_70262 WHERE "3-person dive" = 'none' |
### Instruction:
CREATE TABLE table_72920 (
"School" text,
"Est. Denotes original date of establishment of the school, changes in name and/or location noted in corresponding ootnote" real,
"Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" text,... | SELECT "School" FROM table_72920 WHERE "Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" = 'Columbia City' |
### Instruction:
CREATE TABLE table_79536 (
"Year" real,
"Event" text,
"Venue" text,
"Place" text,
"Weight class (kg)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest year that has fila world championships as the event, with toled... | SELECT MAX("Year") FROM table_79536 WHERE "Event" = 'fila world championships' AND "Venue" = 'toledo, united states' AND "Weight class (kg)" < '97' |
### Instruction:
CREATE TABLE table_16857_2 (
mls_cup_playoffs VARCHAR,
concacaf_champions_cup___champions_league VARCHAR,
us_open_cup VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How did the team place when they did not qualify for the Concaf Champion... | SELECT mls_cup_playoffs FROM table_16857_2 WHERE concacaf_champions_cup___champions_league = "Did not qualify" AND us_open_cup = "Round of 16" |
### Instruction:
CREATE TABLE table_22017 (
"Club" text,
"Played" text,
"Won" 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
)
-- Using valid SQLite,... | SELECT "Lost" FROM table_22017 WHERE "Tries for" = '55' |
### Instruction:
CREATE TABLE table_name_20 (
born_in_a_non_eu_state__1000_ INTEGER,
country VARCHAR,
total_population__1000_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number born in a none EU state (1000) from Denmark with a tot... | SELECT MAX(born_in_a_non_eu_state__1000_) FROM table_name_20 WHERE country = "denmark" AND total_population__1000_ < 5 OFFSET 534 |
### Instruction:
CREATE TABLE table_203_320 (
id number,
"rank in\n2011" number,
"name of\nconcern" text,
"location of\nheadquarters" text,
"revenue\n(thou.\npln)" number,
"profit\n(thou.\npln)" number,
"employees" number
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT "employees" FROM table_203_320 WHERE "name of\nconcern" = 'pgnig sa' |
### Instruction:
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_pres... | SELECT COUNT(*) FROM student |
### Instruction:
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
)
CREATE TABLE people (
People_ID int,
District text,
Name text,
Party t... | SELECT Party, COUNT(*) FROM people GROUP BY Party ORDER BY Party |
### Instruction:
CREATE TABLE table_name_85 (
number_of_electorates__2003_ INTEGER,
constituency_number VARCHAR,
district VARCHAR,
reserved_for___sc___st__none_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of Electorates (... | SELECT MIN(number_of_electorates__2003_) FROM table_name_85 WHERE district = "bhind" AND reserved_for___sc___st__none_ = "none" AND constituency_number = "11" |
### Instruction:
CREATE TABLE table_79003 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT SUM("Position") FROM table_79003 WHERE "Lost" = '6' AND "Team" = 'caernarfon town' |
### Instruction:
CREATE TABLE table_45279 (
"Series Number" real,
"Number of Episodes" real,
"Original Air Date" real,
"DVD Region 2 release date" text,
"DVD Region 1 release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the latest ori... | SELECT MAX("Original Air Date") FROM table_45279 WHERE "DVD Region 2 release date" = '23 april 2012' AND "Number of Episodes" > '10' |
### Instruction:
CREATE TABLE table_54840 (
"Block A" text,
"Antonio Thomas" text,
"Hikaru Sato" text,
"Hiroshi Yamato" text,
"Kaz Hayashi" text,
"Minoru" text,
"Super Crazy" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the minoru tha... | SELECT "Minoru" FROM table_54840 WHERE "Hikaru Sato" = 'x' AND "Super Crazy" = 'yang (8:36)' |
### Instruction:
CREATE TABLE table_44389 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the h... | SELECT "Home team" FROM table_44389 WHERE "Time" = '8:00 pm' AND "Home team score" = '11.18 (84)' |
### Instruction:
CREATE TABLE table_64401 (
"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 MAX("Season") FROM table_64401 WHERE "Team" = 'prema powerteam' AND "Series" = 'masters of formula three' |
### Instruction:
CREATE TABLE table_65361 (
"Place" text,
"Code" real,
"Area (km 2 )" real,
"Population" real,
"Most spoken language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Population of Tshepiso with a Code of 70409 or smaller a... | SELECT MIN("Population") FROM table_65361 WHERE "Code" < '70409' AND "Area (km 2 )" < '5.97' AND "Place" = 'tshepiso' |
### Instruction:
CREATE TABLE table_71434 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Bronze medals were received by the nation that Ranked less than 5 and received more t... | SELECT AVG("Bronze") FROM table_71434 WHERE "Rank" < '5' AND "Gold" > '2' AND "Total" = '9' AND "Silver" < '4' |
### Instruction:
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
-- Using valid SQLite, answer the follo... | SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage) |
### Instruction:
CREATE TABLE table_31029 (
"Song 1 title" text,
"Artist 1" text,
"Song 2 title" text,
"Artist 2" text,
"Mix artist" text,
"Venue" text,
"Battle Mix?" text,
"Setlist" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is ... | SELECT "Artist 2" FROM table_31029 WHERE "Artist 1" = 'Sparfunk & D-Code' |
### Instruction:
CREATE TABLE table_203_196 (
id number,
"terminal" text,
"operator" text,
"depth\n(m)" text,
"berths" number,
"quay length\n(m)" number,
"quay cranes" number,
"area\n(m2)" number,
"capacity\n(kteus)" text
)
-- Using valid SQLite, answer the following questions for ... | SELECT COUNT("terminal") FROM table_203_196 WHERE "quay cranes" >= 8 |
### Instruction:
CREATE TABLE table_17781 (
"Day (see Irregularities )" text,
"Monday First Day" text,
"Tuesday Second Day" text,
"Wednesday Third Day" text,
"Thursday Fourth Day" text,
"Friday Fifth Day" text,
"Saturday Sixth Day" text,
"Sunday Seventh Day" text
)
-- Using valid SQLit... | SELECT "Friday Fifth Day" FROM table_17781 WHERE "Day (see Irregularities )" = 'Polish' |
### Instruction:
CREATE TABLE table_10846 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 2009 for when 2007 is 3r and 2010 is q2
### Resp... | SELECT "2009" FROM table_10846 WHERE "2007" = '3r' AND "2010" = 'q2' |
### 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 "place" FROM table_204_693 ORDER BY "total" LIMIT 1 |
### Instruction:
CREATE TABLE table_12462 (
"College or Campus Name" text,
"Location" text,
"District" text,
"Affiliation" text,
"Estd" real,
"Weblink" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which district is anna university - tiruchi... | SELECT "District" FROM table_12462 WHERE "Weblink" = 'http://www.annauniv.edu' AND "College or Campus Name" = 'anna university - tiruchirappalli campus' |
### Instruction:
CREATE TABLE table_40100 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has an Against ... | SELECT MIN("Position") FROM table_40100 WHERE "Against" > '17' AND "Team" = 'juventus' AND "Drawn" < '4' |
### Instruction:
CREATE TABLE table_48463 (
"Pick" real,
"Player" text,
"Pos." text,
"Nationality" text,
"Team" text,
"Previous team" text,
"NBA years [a ]" text,
"Career with the franchise [b ]" text
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT "Pick" FROM table_48463 WHERE "NBA years [a ]" = '2' AND "Previous team" = 'utah jazz' |
### Instruction:
CREATE TABLE table_66234 (
"Year" real,
"Stage" real,
"Start" text,
"Finish" text,
"Leader at the summit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest stage number for a year later than 1948, leader at the summ... | SELECT MAX("Stage") FROM table_66234 WHERE "Year" > '1948' AND "Leader at the summit" = 'group' AND "Finish" = 'bagnères-de-bigorre' |
### Instruction:
CREATE TABLE table_69147 (
"City/Town" text,
"July av. T" text,
"Rain" text,
"Days with rain (year/summer)" text,
"Days with frost" real,
"Sunlight hours" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number ... | SELECT MIN("Sunlight hours") FROM table_69147 WHERE "City/Town" = 'ourense' AND "Days with frost" > '30' |
### 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(Sex) FROM people GROUP BY Sex ORDER BY Sex |
### Instruction:
CREATE TABLE table_204_630 (
id number,
"no" number,
"date" text,
"race" text,
"track" text,
"winner" text,
"reports" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ricky stenhouse , jr. and justin allgaier both won at which... | SELECT "track" FROM table_204_630 WHERE "winner" = 'ricky stenhouse, jr' INTERSECT SELECT "track" FROM table_204_630 WHERE "winner" = 'justin allgaier' |
### Instruction:
CREATE TABLE perpetrator (
perpetrator_id number,
people_id number,
date text,
year number,
location text,
country text,
killed number,
injured number
)
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
home town text
)... | SELECT T1.name FROM people AS T1 JOIN perpetrator AS T2 ON T1.people_id = T2.people_id WHERE T2.country <> "China" |
### Instruction:
CREATE TABLE table_20560 (
"Code" text,
"District" text,
"Headquarters" text,
"Population (2011)" real,
"Area (km\u00b2)" real,
"Density (/km\u00b2)" real,
"Official website" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Headquarters" FROM table_20560 WHERE "Population (2011)" = '3811738' |
### 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 Date_of_Birth, Weight FROM people ORDER BY Date_of_Birth DESC |
### Instruction:
CREATE TABLE table_34375 (
"Place" real,
"Nation" text,
"6 Ropes" real,
"4 Hoops, 2 Clubs" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the palce number of Russia, which has 6 ropes of 19.425 and a total less... | SELECT SUM("Place") FROM table_34375 WHERE "6 Ropes" = '19.425' AND "Nation" = 'russia' AND "Total" < '38.925' |
### Instruction:
CREATE TABLE table_58003 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "Team" FROM table_58003 WHERE "High assists" = 'earl watson (6)' AND "Date" = 'january 19' |
### Instruction:
CREATE TABLE table_27975 (
"#" real,
"Airdate" text,
"No. of couples" real,
"First couple" text,
"Second couple" text,
"Third couple" text,
"Fourth couple" text,
"Viewers (millions)" text,
"ITV1 weekly ranking" real
)
-- Using valid SQLite, answer the following que... | SELECT "Viewers (millions)" FROM table_27975 WHERE "Fourth couple" = 'Tony and Jamie' |
### Instruction:
CREATE TABLE perpetrator (
perpetrator_id number,
people_id number,
date text,
year number,
location text,
country text,
killed number,
injured number
)
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
home town text
)... | SELECT country FROM perpetrator WHERE injured > 50 INTERSECT SELECT country FROM perpetrator WHERE injured < 20 |
### Instruction:
CREATE TABLE table_14363 (
"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
)
-- Using valid SQLite, answer the foll... | SELECT "Played" FROM table_14363 WHERE "Try bonus" = '6' AND "Drawn" = '0' |
### Instruction:
CREATE TABLE table_21217 (
"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 COUNT("PF") FROM table_21217 WHERE "Skip" = 'Jennifer Jones' |
### Instruction:
CREATE TABLE table_28746 (
"Year" real,
"Races" real,
"Wins" real,
"Poles" real,
"Top 5" real,
"Top 10" real,
"DNF" real,
"Finish" text,
"Start" text,
"Winnings" text,
"Season Rank" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following ques... | SELECT "Team(s)" FROM table_28746 WHERE "Start" = '39.1' |
### Instruction:
CREATE TABLE prescribes (
physician VARCHAR,
medication VARCHAR
)
CREATE TABLE medication (
code VARCHAR,
Brand VARCHAR
)
CREATE TABLE physician (
name VARCHAR,
position VARCHAR,
employeeid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables pr... | SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = "X" |
### Instruction:
CREATE TABLE table_train_219 (
"id" int,
"hematocrit_hct" float,
"fasting_plasma_glucose" int,
"hba1c" float,
"urine_protein" int,
"iothalamate_clearance" int,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- fasting ... | SELECT * FROM table_train_219 WHERE fasting_plasma_glucose >= 126 AND fasting_plasma_glucose <= 270 |
### Instruction:
CREATE TABLE table_72666 (
"Year" real,
"Dates" text,
"Champion" text,
"Country" text,
"Score" text,
"To par" text,
"Margin of victory" text,
"Purse ( US$ )" real,
"Winners share" real
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "Dates" FROM table_72666 WHERE "Score" = '66-72-64-65=267' |
### Instruction:
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
-- Using valid SQLite, answer the follo... | SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY COUNT(Type) DESC |
### Instruction:
CREATE TABLE table_13796 (
"Name" text,
"Population (2011)" real,
"Population (2006)" text,
"Change (%)" text,
"Land area (km\u00b2)" text,
"Population density (per km\u00b2)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ... | SELECT "Population density (per km\u00b2)" FROM table_13796 WHERE "Population (2006)" = '84' |
### Instruction:
CREATE TABLE table_78850 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the ... | SELECT "Main contestant" FROM table_78850 WHERE "Scores by each individual judge" = '8 + 7 + 7 = 21' |
### Instruction:
CREATE TABLE table_17975 (
"Value" text,
"Diameter" text,
"Thickness" text,
"Mass" text,
"Composition" text,
"Edge" text,
"Obverse" text,
"Reverse" text,
"first minting" real,
"issue" text,
"withdrawal" text,
"lapse" text
)
-- Using valid SQLite, answer... | SELECT COUNT("Reverse") FROM table_17975 WHERE "Diameter" = '23mm' |
### Instruction:
CREATE TABLE table_203_114 (
id number,
"week" number,
"date" text,
"tv time" text,
"opponent" text,
"result" text,
"game site" text,
"record" text,
"attendance" number,
"bye" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT (SELECT MAX("attendance") FROM table_203_114) - (SELECT MIN("attendance") FROM table_203_114) |
### Instruction:
CREATE TABLE medicine_enzyme_interaction (
enzyme_id number,
medicine_id number,
interaction_type text
)
CREATE TABLE enzyme (
id number,
name text,
location text,
product text,
chromosome text,
omim number,
porphyria text
)
CREATE TABLE medicine (
id numbe... | SELECT name FROM enzyme WHERE product <> 'Heme' |
### Instruction:
CREATE TABLE table_33082 (
"sliding tackle" text,
"spear tackle" text,
"dump tackle" text,
"body tackle" text,
"ankle tap" text,
"diving tackle" text,
"bumping/blocking" text,
"shoulder charge" text,
"steal/intercept ball" text,
"Chicken wing" text
)
-- Using v... | SELECT "shoulder charge" FROM table_33082 WHERE "body tackle" = 'restricted' |
### Instruction:
CREATE TABLE table_21849 (
"Club" text,
"Played" text,
"Won" 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
)
-- Using valid SQLite,... | SELECT "Tries for" FROM table_21849 WHERE "Won" = '11' |
### Instruction:
CREATE TABLE roller_coaster (
roller_coaster_id number,
name text,
park text,
country_id number,
length number,
height number,
speed text,
opened text,
status text
)
CREATE TABLE country (
country_id number,
name text,
population number,
area number,... | SELECT COUNT(*) FROM country WHERE NOT country_id IN (SELECT country_id FROM roller_coaster WHERE length > 3000) |
### Instruction:
CREATE TABLE table_36867 (
"Name" text,
"Faith" text,
"Type" text,
"Intake" real,
"DCSF number" real,
"Ofsted number" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average primary intake with an Ofsted number of 117... | SELECT AVG("Intake") FROM table_36867 WHERE "Type" = 'primary' AND "Ofsted number" = '117433' AND "DCSF number" > '3335' |
### Instruction:
CREATE TABLE table_17005 (
"Abbreviation" text,
"Voivodeship" text,
"Capital" text,
"Area km\u00b2 (1998)" text,
"Population (1980)" text,
"No. of cities" real,
"No. of communes" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT "Area km\u00b2 (1998)" FROM table_17005 WHERE "No. of communes" = '51' |
### Instruction:
CREATE TABLE table_63011 (
"Driver" text,
"Navigator" text,
"Vehicle" text,
"Class" text,
"Capacity" real,
"Total Time" text,
"Margin" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Capacity has a Class of cm22, and a ... | SELECT MIN("Capacity") FROM table_63011 WHERE "Class" = 'cm22' AND "Vehicle" = '1999 subaru impreza wrx sti' |
### Instruction:
CREATE TABLE table_203_871 (
id number,
"#" number,
"player" text,
"pos" text,
"pts" number,
"tries" number,
"conv" number,
"pens" number,
"drop" number,
"opposition" text,
"venue" text,
"date" text
)
-- Using valid SQLite, answer the following question... | SELECT MIN("conv") FROM table_203_871 WHERE "pts" >= 24 |
### Instruction:
CREATE TABLE table_3248 (
"Party" text,
"January 2010" text,
"February 2010" text,
"March 2010" text,
"April 2010" text,
"May 2010" text,
"June 2010" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the bed 2010 for 6.5%
... | SELECT "February 2010" FROM table_3248 WHERE "June 2010" = '6.5%' |
### Instruction:
CREATE TABLE table_204_751 (
id number,
"date" text,
"train" text,
"location" text,
"present location" text,
"comments" text,
"top speed (km/h)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many trains listed have the ... | SELECT COUNT("train") FROM table_204_751 WHERE "train" <> 'hmb2' AND "top speed (km/h)" = (SELECT "top speed (km/h)" FROM table_204_751 WHERE "train" = 'hmb2') |
### Instruction:
CREATE TABLE table_19557 (
"Station (and code)" text,
"Managed by" text,
"Lines served" text,
"Station users 2007/8" real,
"Station users 2008/9" text,
"Year opened" text,
"Platforms" text,
"Borough" text
)
-- Using valid SQLite, answer the following questions for the ... | SELECT "Station (and code)" FROM table_19557 WHERE "Station users 2008/9" = '130368' |
### Instruction:
CREATE TABLE table_20569 (
"Year" real,
"GDP Nominal ($ billions)" text,
"GDP Adjusted ($ billions)" text,
"Population (millions)" text,
"GDP per capita Nominal ($)" real,
"GDP per capita Adjusted ($)" real
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT "GDP Adjusted ($ billions)" FROM table_20569 WHERE "GDP Nominal ($ billions)" = '8.43' |
### Instruction:
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
-- Using valid SQLite, answer ... | SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID |
### Instruction:
CREATE TABLE buildings (
id number,
name text,
city text,
height number,
stories number,
status text
)
CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion numbe... | SELECT COUNT(*) FROM companies |
### Instruction:
CREATE TABLE VOTING_RECORD (
Election_Cycle VARCHAR
)
CREATE TABLE STUDENT (
Age INTEGER,
StuID VARCHAR,
city_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the average age of students who live in the city with code 'NYC' ... | SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring" |
### Instruction:
CREATE TABLE table_name_80 (
_percentage_hydropower INTEGER,
_percentage_nuclear_power VARCHAR,
_percentage_oil VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the highest % hydropower when the % oil is less t... | SELECT MAX(_percentage_hydropower) FROM table_name_80 WHERE _percentage_oil < 24.5 AND country = "united arab emirates" AND _percentage_nuclear_power < 0 |
### Instruction:
CREATE TABLE appellations (
no number,
appelation text,
county text,
state text,
area text,
isava text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,
year number,
price number,
score number,
... | SELECT name, score FROM wine |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.