instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_3 (
venue VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Venue of the King's Cup 1998?
| SELECT venue FROM table_name_3 WHERE competition = "king's cup 1998" | sql_create_context |
CREATE TABLE table_54452 (
"Pick" real,
"Player" text,
"Country of origin*" text,
"PBA team" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Mark Joseph Kong's pick?
| SELECT AVG("Pick") FROM table_54452 WHERE "Player" = 'mark joseph kong' | wikisql |
CREATE TABLE stock (
shop_id number,
device_id number,
quantity number
)
CREATE TABLE device (
device_id number,
device text,
carrier text,
package_version text,
applications text,
software_platform text
)
CREATE TABLE shop (
shop_id number,
shop_name text,
location tex... | SELECT shop_name FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM stock) | spider |
CREATE TABLE table_77501 (
"Year" real,
"B\u00f6tzow" real,
"Schwante" real,
"Vehlefanz" real,
"Neu-Vehlefanz" real,
"Marwitz" real,
"B\u00e4renklau" real,
"Eichst\u00e4dt" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year has a S... | SELECT COUNT("Year") FROM table_77501 WHERE "Schwante" < '2.043' AND "Eichst\u00e4dt" < '848' AND "B\u00e4renklau" < '1.262' | wikisql |
CREATE TABLE table_2322 (
"School" text,
"Location(s)" text,
"Control" text,
"Type" text,
"Enrollment (2012)" real,
"Founded" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When east carolina university is the school what is the highest year fou... | SELECT MAX("Founded") FROM table_2322 WHERE "School" = 'East Carolina University' | wikisql |
CREATE TABLE table_name_33 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home team had an away team of Aston Villa?
| SELECT home_team FROM table_name_33 WHERE away_team = "aston villa" | sql_create_context |
CREATE TABLE table_name_34 (
primary_sponsor_s_ VARCHAR,
car_s_ VARCHAR,
crew_chief VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What primary sponsor(s) owns ford fusion car(s) and the crew chief is Drew Blickensderfer?
| SELECT primary_sponsor_s_ FROM table_name_34 WHERE car_s_ = "ford fusion" AND crew_chief = "drew blickensderfer" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Incision of vessel, abdominal arteries" | mimicsql_data |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM tex... | SELECT txmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '朱斯伯' AND hz_info.YLJGDM = '0905366' AND NOT txmzjzjlb.JZKSMC LIKE '%正骨科%' UNION SELECT ftxmzj... | css |
CREATE TABLE table_66193 (
"Celestial Stem" text,
"Chinese Mandarin Pinyin" text,
"Cantonese Jyutping" text,
"Wuu Wuupin" text,
"Japanese kunyomi" text,
"Japanese on'yomi" text,
"Korean ( RR )" text,
"Manchu ( M\u00f6llendorff )" text,
"Vietnamese" text,
"Yin and Yang ( \u9670\u9... | SELECT "Manchu ( M\u00f6llendorff )" FROM table_66193 WHERE "Wu xing correlations" = '南 south' AND "Wuu Wuupin" = 'ting44' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE table_name_36 (
total INTEGER,
rank VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total has a Rank of 4, and a Silver smaller than 4?
| SELECT AVG(total) FROM table_name_36 WHERE rank = "4" AND silver < 4 | sql_create_context |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
... | SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE ORDER BY SUM(CRS_CREDIT) DESC | nvbench |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
... | SELECT jybgb.JYLX FROM jybgb WHERE jybgb.BGDH = '96134838030' | css |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT Answers.OwnerUserId FROM (SELECT Posts.Id, Posts.Tags FROM Posts JOIN PostTypes ON Posts.PostTypeId = PostTypes.Id WHERE PostTypes.Name = 'Question') AS Questions JOIN (SELECT Posts.Id, Posts.ParentId, Posts.Score, Posts.OwnerUserId FROM Posts JOIN PostTypes ON Posts.PostTypeId = PostTypes.Id WHERE PostTypes.Nam... | sede |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'dka' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') | eicu |
CREATE TABLE table_8523 (
"Player" text,
"Position" text,
"Premier League" real,
"FA Cup" real,
"League Cup" real,
"UEFA Cup" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest league cup with a premier League of... | SELECT MIN("League Cup") FROM table_8523 WHERE "Premier League" = '1' AND "Total" < '5' | wikisql |
CREATE TABLE table_29138 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Incoming manager" text,
"Date of appointment" text,
"Position in Table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who ... | SELECT "Incoming manager" FROM table_29138 WHERE "Date of vacancy" = '21 March 2011' | wikisql |
CREATE TABLE table_15054 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the score 5-2 with a loss of sele (3-2)?
| SELECT "Date" FROM table_15054 WHERE "Score" = '5-2' AND "Loss" = 'sele (3-2)' | wikisql |
CREATE TABLE table_63357 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Lisbeth Trickett's time?
| SELECT COUNT("Time") FROM table_63357 WHERE "Name" = 'lisbeth trickett' | wikisql |
CREATE TABLE table_13480122_5 (
high_rebounds VARCHAR,
high_assists VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the the high rebounds with high assbeingts being scottie pippen (9)
| SELECT high_rebounds FROM table_13480122_5 WHERE high_assists = "Scottie Pippen (9)" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDa... | SELECT TagName, 400 - COUNT(*) AS "UpVotes to Silver", 1000 - COUNT(*) AS "UpVotes to Gold" FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Posts.OwnerUserId = @UserId GROUP BY TagName ORD... | sede |
CREATE TABLE table_64108 (
"Date Released" text,
"Polling institute" text,
"Socialist" text,
"Social Democratic" text,
"Green-Communist" text,
"People's Party" text,
"Left Bloc" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT "People's Party" FROM table_64108 WHERE "Green-Communist" = '8.0%' | wikisql |
CREATE TABLE Companies (
Sales_billion INTEGER,
Industry VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the maximum and minimum sales of the companies whose industries are not 'Banking'.
| SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> "Banking" | sql_create_context |
CREATE TABLE table_13724 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the week when the Green Bay Packers were the opponent and less than 57,966 were in attendance?
| SELECT COUNT("Week") FROM table_13724 WHERE "Attendance" < '57,966' AND "Opponent" = 'green bay packers' | wikisql |
CREATE TABLE table_name_29 (
version VARCHAR,
remixed_by VARCHAR,
length VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Version has a Remixed by Perky Park with a Length of 6:38?
| SELECT version FROM table_name_29 WHERE remixed_by = "perky park" AND length = "6:38" | sql_create_context |
CREATE TABLE table_6092 (
"Model Number" text,
"Stepping" text,
"Frequency" text,
"L2 Cache" text,
"Multi 1" text,
"V Core" text,
"Socket" text,
"Release Date" text,
"Part Number(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Stepping" FROM table_6092 WHERE "Release Date" = 'june 5, 2007' | wikisql |
CREATE TABLE web_client_accelerator (
client VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different kinds of clients are supported by the web clients accelerators?
| SELECT COUNT(DISTINCT client) FROM web_client_accelerator | sql_create_context |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLO... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_55965 (
"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 above.
-- What is the record when... | SELECT "Record" FROM table_55965 WHERE "High points" = 'clippers' | wikisql |
CREATE TABLE table_1745843_5 (
class VARCHAR,
part_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the class of the word who's second participle is laug?
| SELECT class FROM table_1745843_5 WHERE part_2 = "laug" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug = "Vial" | mimicsql_data |
CREATE TABLE table_name_87 (
position VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the positions of Damon Jones?
| SELECT position FROM table_name_87 WHERE player = "damon jones" | sql_create_context |
CREATE TABLE table_name_67 (
position VARCHAR,
school_previous_club_team_country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Position, when School/Previous Club Team/Country is Kentucky?
| SELECT position FROM table_name_67 WHERE school_previous_club_team_country = "kentucky" | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT zyjzjlb.MZBMLX, zyjzjlb.MZZDBM, zyjzjlb.MZZDMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '54549955809' | css |
CREATE TABLE bdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM wdmzjzjlb JOIN jybgb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE wdmzjzjlb.YLJGDM = '1746368' AND jybgb.BGRQ BETWEEN '2007-03-29' AND '2008-04-25' GROUP BY jybgb.KSBM HAVING COUNT(*) > 28 UNION SELECT jybgb.KSBM FROM bdmzjzjlb J... | css |
CREATE TABLE table_14160327_4 (
exportable VARCHAR,
decade VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What game allow the 1980s to be exportable?
| SELECT exportable FROM table_14160327_4 WHERE decade = "1980s" | sql_create_context |
CREATE TABLE table_64994 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many silver medals did spain have when they had more than 0 bronze medals and less than ... | SELECT "Silver" FROM table_64994 WHERE "Bronze" > '0' AND "Total" < '54' AND "Nation" = 'spain' | wikisql |
CREATE TABLE table_name_6 (
home_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is Princes Park's home team?
| SELECT home_team FROM table_name_6 WHERE venue = "princes park" | sql_create_context |
CREATE TABLE table_203_692 (
id number,
"name" text,
"pos." text,
"caps" number,
"goals" number,
"club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many goals did olle ahlund score ?
| SELECT "goals" FROM table_203_692 WHERE "name" = 'olle ahlund' | squall |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-61375')) AND DATETIME(medication.drugstarttime) <= DATETIM... | eicu |
CREATE TABLE table_name_98 (
tied VARCHAR,
lost VARCHAR,
total_games VARCHAR,
years VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many total ties had less than 1183 total games, 121 years, and more than 541 losses?
| SELECT COUNT(tied) FROM table_name_98 WHERE total_games < 1183 AND years = 121 AND lost > 541 | sql_create_context |
CREATE TABLE table_name_99 (
votes__gib_ INTEGER,
_percentage__gib_ VARCHAR,
seats VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of votes of the party with a % of 0.53 and more than 0 seats?
| SELECT SUM(votes__gib_) FROM table_name_99 WHERE _percentage__gib_ = 0.53 AND seats > 0 | sql_create_context |
CREATE TABLE table_203_375 (
id number,
"name" text,
"year built" text,
"country" text,
"town" text,
"height" text,
"remarks" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of tallest pylons in austria ?
| SELECT COUNT("name") FROM table_203_375 WHERE "country" = 'austria' | squall |
CREATE TABLE table_46813 (
"Event" text,
"Date" text,
"Rating" text,
"Share" text,
"Viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Date, when Rating 1.5, and when Event is Johnson Vs. Moraga?
| SELECT "Date" FROM table_46813 WHERE "Rating" = '1.5' AND "Event" = 'johnson vs. moraga' | wikisql |
CREATE TABLE Department_Stores (
dept_store_id INTEGER,
dept_store_chain_id INTEGER,
store_name VARCHAR(80),
store_address VARCHAR(255),
store_phone VARCHAR(80),
store_email VARCHAR(80)
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_gender VARCHAR(1),
staff_name VARCHAR(80)
)
CREAT... | SELECT customer_name, customer_id FROM Customers WHERE customer_address LIKE "%TN%" | nvbench |
CREATE TABLE table_78644 (
"Battle" text,
"Date" text,
"Bulgarian Commander" text,
"Latin Commander" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Bulgarian Commander of the Battle of Rusion?
| SELECT "Bulgarian Commander" FROM table_78644 WHERE "Battle" = 'battle of rusion' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLO... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) | nvbench |
CREATE TABLE table_50915 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality of the player from round 5?
| SELECT "Nationality" FROM table_50915 WHERE "Round" = '5' | wikisql |
CREATE TABLE table_name_19 (
long INTEGER,
gain VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the lowest Long that has the Gain of 20, and the Loss smaller than 0?
| SELECT MIN(long) FROM table_name_19 WHERE gain = 20 AND loss < 0 | sql_create_context |
CREATE TABLE table_name_37 (
draw VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the draw for a match that had 10 points?
| SELECT draw FROM table_name_37 WHERE points = "10" | sql_create_context |
CREATE TABLE table_name_78 (
result VARCHAR,
opponent_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What result did Indiana have when they were an opponent?
| SELECT result FROM table_name_78 WHERE opponent_number = "indiana" | sql_create_context |
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phon... | SELECT customer_last_name, COUNT(customer_last_name) FROM Customers GROUP BY customer_last_name | nvbench |
CREATE TABLE table_21989 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years was the film The Blossoming of Maximo Oliveros en... | SELECT COUNT("Year (Ceremony)") FROM table_21989 WHERE "Film title used in nomination" = 'The Blossoming of Maximo Oliveros' | wikisql |
CREATE TABLE table_51923 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which away team has a Home team score of 4.4 (28)?
| SELECT "Away team" FROM table_51923 WHERE "Home team score" = '4.4 (28)' | wikisql |
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
c... | SELECT citation_num FROM publication WHERE title = 'Making database systems usable' | academic |
CREATE TABLE table_75938 (
"Draw" real,
"Song" text,
"Performer" text,
"Points" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest points when the ranking is 1st?
| SELECT MIN("Points") FROM table_75938 WHERE "Rank" = '1st' | wikisql |
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 have a Year small... | SELECT SUM("Horsepowers") FROM table_37546 WHERE "Year" < '1974' AND "Tonnage" = '4437' | wikisql |
CREATE TABLE table_56442 (
"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 low number of top 25s in an event with over 15 appea... | SELECT MIN("Top-25") FROM table_56442 WHERE "Events" > '15' | wikisql |
CREATE TABLE table_17440 (
"Date" text,
"Winning Team" text,
"Score" text,
"Winning Pitcher" text,
"Losing Pitcher" text,
"Attendance" real,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winning pitcher on june 25?
| SELECT "Winning Pitcher" FROM table_17440 WHERE "Date" = 'June 25' | wikisql |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime ti... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 739) AND icustays.outtime IS NULL) AN... | mimic_iii |
CREATE TABLE table_51029 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Bonus Points" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What a... | SELECT "Played" FROM table_51029 WHERE "Points difference" = 'points difference' | wikisql |
CREATE TABLE table_71649 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the country with +2 to par
| SELECT "Country" FROM table_71649 WHERE "To par" = '+2' | wikisql |
CREATE TABLE table_27277284_8 (
v_core VARCHAR,
mult_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the vcore for multi 11x
| SELECT v_core FROM table_27277284_8 WHERE mult_1 = "11x" | sql_create_context |
CREATE TABLE table_name_25 (
round VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rounds had a race name of anglia tv trophy?
| SELECT COUNT(round) FROM table_name_25 WHERE name = "anglia tv trophy" | sql_create_context |
CREATE TABLE table_39416 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average frequency in MHz for stations with an ERP W of 1... | SELECT AVG("Frequency MHz") FROM table_39416 WHERE "ERP W" = '170' | wikisql |
CREATE TABLE table_name_58 (
floors VARCHAR,
year VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of floors that have years under 2008 and were named Guinness Tower?
| SELECT COUNT(floors) FROM table_name_58 WHERE year < 2008 AND name = "guinness tower" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "4" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_204_929 (
id number,
"location" text,
"name of mill and\ngrid reference" text,
"type" text,
"maps" text,
"first mention\nor built" text,
"last mention\nor demise" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how man c ... | SELECT COUNT(*) FROM table_204_929 | squall |
CREATE TABLE table_35806 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHich October has a Record of 1 0 0?
| SELECT MIN("October") FROM table_35806 WHERE "Record" = '1–0–0' | wikisql |
CREATE TABLE table_53379 (
"Rider" text,
"Horse" text,
"Time ( s )" text,
"Faults" text,
"Total time ( s )" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total points when the horse is Chippison?
| SELECT COUNT("Points") FROM table_53379 WHERE "Horse" = 'chippison' | wikisql |
CREATE TABLE table_name_86 (
points VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points were scored by the player who played 363 games?
| SELECT points FROM table_name_86 WHERE games = "363" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '76727469485' AND NOT t_kc22.SOC_SRT_DIRE_NM LIKE '%氯丙嗪%' | css |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
... | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 50065) AND prescriptions.drug = 'promethazine' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | mimic_iii |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY ACC_Regular_Season | nvbench |
CREATE TABLE table_name_89 (
decision VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Decision on April 18?
| SELECT decision FROM table_name_89 WHERE date = "april 18" | sql_create_context |
CREATE TABLE phone (
Accreditation_type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of phones for each accreditation type.
| SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type | sql_create_context |
CREATE TABLE table_1499791_2 (
santee_sisseton VARCHAR,
yankton_yanktonai VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the santee sisseton for h ha na
| SELECT COUNT(santee_sisseton) FROM table_1499791_2 WHERE yankton_yanktonai = "híŋhaŋna" | sql_create_context |
CREATE TABLE table_55818 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the friendship cup?
| SELECT "Date" FROM table_55818 WHERE "Competition" = 'friendship cup' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE o... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'opn/oth rep aort vlv-tis') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22315) ORD... | mimic_iii |
CREATE TABLE table_name_59 (
result VARCHAR,
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What result was a date of 20/03/2008 with leeds as the opponent
| SELECT result FROM table_name_59 WHERE opponent = "leeds" AND date = "20/03/2008" | sql_create_context |
CREATE TABLE table_name_17 (
attendance INTEGER,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Attendance of the game with a Loss of Hiller (3 2)?
| SELECT MAX(attendance) FROM table_name_17 WHERE loss = "hiller (3–2)" | sql_create_context |
CREATE TABLE table_1342233_3 (
result VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what the the end number where albert rains was running
| SELECT COUNT(result) FROM table_1342233_3 WHERE incumbent = "Albert Rains" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT SUM(MED_AMOUT) FROM t_kc21 WHERE PERSON_ID = '84583960' AND CLINIC_TYPE = '门诊' | css |
CREATE TABLE table_62211 (
"Name" text,
"Club" text,
"Date of departure" text,
"Replacement" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of appointment of nejat biyedi ?
| SELECT "Date of appointment" FROM table_62211 WHERE "Name" = 'nejat biyedić' | wikisql |
CREATE TABLE table_11065 (
"Name" text,
"Club" text,
"Date of departure" text,
"Replacement" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the club with a replacement of alberto malesani
| SELECT "Club" FROM table_11065 WHERE "Replacement" = 'alberto malesani' | wikisql |
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DOUBLE,
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(... | SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code | nvbench |
CREATE TABLE table_59766 (
"Episode" text,
"Broadcast date" text,
"Run time" text,
"Viewers (in millions)" text,
"Archive" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the broadcaste date for the episode with a run time of 24:44?
| SELECT "Broadcast date" FROM table_59766 WHERE "Run time" = '24:44' | wikisql |
CREATE TABLE enzyme (
id number,
name text,
location text,
product text,
chromosome text,
omim number,
porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id number,
medicine_id number,
interaction_type text
)
CREATE TABLE medicine (
id number,
name text,... | SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor' | spider |
CREATE TABLE table_2534387_10 (
entries VARCHAR,
elapsed_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the entries for 6 h 23 min elapsed time
| SELECT entries FROM table_2534387_10 WHERE elapsed_time = "6 h 23 min" | sql_create_context |
CREATE TABLE table_34765 (
"Title" text,
"Translation" text,
"Lyricist" text,
"Composer" text,
"Duration" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which of the titles have a duration time of 4:57?
| SELECT "Title" FROM table_34765 WHERE "Duration" = '4:57' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | SELECT COUNT(*) FROM Posts AS p WHERE p.PostTypeId = 2 AND p.Score < 0 | sede |
CREATE TABLE table_203_486 (
id number,
"place" number,
"team" text,
"matches" number,
"won" number,
"drawn" number,
"lost" number,
"difference" text,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams won at le... | SELECT COUNT("team") FROM table_203_486 WHERE "won" >= 4 | squall |
CREATE TABLE table_204_975 (
id number,
"year" number,
"competition" text,
"location" text,
"event" text,
"final-rank" text,
"final-score" number,
"qualifying rank" number,
"qualifying score" number
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT MAX("qualifying score") FROM table_204_975 WHERE "event" = 'all around' | squall |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '2786957' AND gwyjzb.IN_HOSP_DATE BETWEEN '2011-07-23' AND '2016-01-23' AND gwyjzb.PERSON_NM LIKE '周%' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '2786957' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2011-07-23' AND '2016-01-23' AND fgwyjzb.PERSON_NM LIKE '周%' | css |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name | nvbench |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | SELECT txmzjzjlb.JZLSH FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '50833760' AND hz_info.YLJGDM = '0729314' AND txmzjzjlb.JZKSMC LIKE '%妇产科%' UNION SELECT ftxmzjzjlb.JZLSH FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJ... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p amput... | eicu |
CREATE TABLE Order_Items (
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(15)
)
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
address_type VARCHAR(15),
date_address_to DATETIME
)
CREATE TABLE Customers (
custome... | SELECT order_date, COUNT(order_date) FROM Customers AS t1 JOIN Customer_Orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" GROUP BY customer_name | nvbench |
CREATE TABLE table_63932 (
"Club" text,
"League/Division" text,
"Home Ground" text,
"Location" text,
"Position in 2012-13" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location for the first division, Sun Pegasus Club?
| SELECT "Location" FROM table_63932 WHERE "League/Division" = 'first division' AND "Club" = 'sun pegasus' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.