instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_60303 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Fuzzy Zoeller's To par?
| SELECT "To par" FROM table_60303 WHERE "Player" = 'fuzzy zoeller' | wikisql |
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 t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7721090' AND t_kc21.IN_HOSP_DATE BETWEEN '2013-07-27' AND '2015-08-15' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7721090' AND t_kc21.IN_HOSP_DATE BETWEEN '2013-07-27' AND '2015-08-15' AND t_kc21.MED_ORG_DEPT_NM = '小儿呼吸内科' | css |
CREATE TABLE table_70782 (
"Name" text,
"Born" text,
"Age on mission" real,
"Mission" text,
"Mission dates" text,
"Service" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What mission did the astronaut who 38 years old on the mission and who ser... | SELECT "Mission" FROM table_70782 WHERE "Service" = 'nasa' AND "Age on mission" = '38' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.J... | css |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '任博涛' AND t_kc22.STA_DATE BETWEEN '2010-11-11' AND '2013-01-13' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_27900 (
"meas. num" real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When restoring capital punishment... | SELECT COUNT("type") FROM table_27900 WHERE "description" = 'Restoring Capital Punishment' | wikisql |
CREATE TABLE table_47933 (
"Hangul" text,
"\u2019Phagspa" text,
"Tibetan" text,
"Phoenician" text,
"Greek" text,
"Latin" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Phoenician letter for the Hangul of ?
| SELECT "Phoenician" FROM table_47933 WHERE "Hangul" = 'ㄹ' | wikisql |
CREATE TABLE table_2771237_1 (
overall_attendance VARCHAR,
average_attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the overall attendance in the places where the average attendance was 17148?
| SELECT overall_attendance FROM table_2771237_1 WHERE average_attendance = 17148 | sql_create_context |
CREATE TABLE table_36476 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round was Joe Patton selected with a pick over 68?
| SELECT "Round" FROM table_36476 WHERE "Pick" > '68' AND "Player" = 'joe patton' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'inotropic agent' AND STRFTIME('%y', treatment.treatm... | eicu |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '2632106' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 19 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_I... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.label = "Amylase" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Gonzalo Wasson" | mimicsql_data |
CREATE TABLE table_name_1 (
surface VARCHAR,
opponents_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what surface was the tournament with opponents kathleen horvath marcella mesker in the finals?
| SELECT surface FROM table_name_1 WHERE opponents_in_the_final = "kathleen horvath marcella mesker" | sql_create_context |
CREATE TABLE table_2235 (
"No" real,
"Season" real,
"Ep" real,
"Title" text,
"Writer" text,
"Director" text,
"Original airdate" text,
"Archive" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the title that aired on 5 august 1967
| SELECT COUNT("Title") FROM table_2235 WHERE "Original airdate" = '5 August 1967' | wikisql |
CREATE TABLE gyb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | SELECT AVG(zyb.MED_CLINIC_ID) FROM zyb WHERE zyb.MED_ORG_DEPT_NM = '030' AND zyb.IN_HOSP_DAYS BETWEEN '2000-09-21' AND '2018-01-31' AND zyb.IN_HOSP_DATE = '沙眼' | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT zyjzjlb.CYBQDM, zyjzjlb.CYBQMC, zyjzjlb.CYCWH FROM zyjzjlb WHERE zyjzjlb.JZLSH = '26123080048' | css |
CREATE TABLE table_72694 (
"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.
-- What is the name of the cover model on 3-97?
| SELECT "Cover model" FROM table_72694 WHERE "Date" = '3-97' | wikisql |
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paperfield (
fieldid int,
paper... | SELECT DISTINCT COUNT(DISTINCT cite.citingpaperid), writes.authorid FROM cite, paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename IN ('ICASSP', 'ICSLP') AND writes.paperid = cite.citedpaperid AND writes.paperid = paper.paperid GROUP BY writes.authorid HAVING COUNT(DISTINCT venue.venueid) = 2 O... | scholar |
CREATE TABLE table_name_24 (
max__number_of_players VARCHAR,
developer VARCHAR,
main_title___alternate_title_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of players for the sega game, hang-on (cartridge version)?
| SELECT COUNT(max__number_of_players) FROM table_name_24 WHERE developer = "sega" AND main_title___alternate_title_s_ = "hang-on (cartridge version)" | sql_create_context |
CREATE TABLE table_68923 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the chassis after 1991?
| SELECT "Chassis" FROM table_68923 WHERE "Year" > '1991' | wikisql |
CREATE TABLE table_25213146_2 (
circuit VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the circuit for round 4?
| SELECT circuit FROM table_25213146_2 WHERE round = 4 | sql_create_context |
CREATE TABLE table_18590 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of Robert L. F. Sikes' election bid?
| SELECT "Result" FROM table_18590 WHERE "Incumbent" = 'Robert L. F. Sikes' | wikisql |
CREATE TABLE table_16222 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many records are there at the War Memorial Stadium?
| SELECT COUNT("Record") FROM table_16222 WHERE "Stadium" = 'War Memorial Stadium' | wikisql |
CREATE TABLE table_211714_2 (
rank VARCHAR,
viewers__in_millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the rank for 14.80 viewers
| SELECT rank FROM table_211714_2 WHERE viewers__in_millions_ = "14.80" | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId... | SELECT Score, Posts.Title FROM Posts WHERE Posts.OwnerUserId = @UserId AND Posts.PostTypeId = 2 ORDER BY Score | sede |
CREATE TABLE table_9557 (
"Fin. Pos" text,
"Car No." text,
"Driver" text,
"Team" text,
"Laps" text,
"Time/Retired" text,
"Grid" text,
"Laps Led" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did car 20... | SELECT "Points" FROM table_9557 WHERE "Car No." = '20' | wikisql |
CREATE TABLE table_62542 (
"Year" text,
"Arizona" text,
"California" text,
"Colorado" text,
"Nevada" text,
"New Mexico" text,
"Oklahoma" text,
"Texas" text,
"Utah" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the value for a... | SELECT "Arizona" FROM table_62542 WHERE "Utah" = 'eisenhower' | wikisql |
CREATE TABLE film_actor (
actor_id VARCHAR
)
CREATE TABLE actor (
first_name VARCHAR,
last_name VARCHAR,
actor_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which film actors (actresses) played a role in more than 30 films? List his or her first... | SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30 | sql_create_context |
CREATE TABLE table_2696531_2 (
pole_position VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is the location is homestead, florida?
| SELECT COUNT(pole_position) FROM table_2696531_2 WHERE location = "Homestead, Florida" | sql_create_context |
CREATE TABLE table_23735 (
"Season" text,
"Games" real,
"Tries" real,
"Conversions" real,
"Penalties" real,
"Drop Goals" real,
"Total Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Lowest number of drop goals?
| SELECT MIN("Drop Goals") FROM table_23735 | wikisql |
CREATE TABLE church (
Church_ID int,
Name text,
Organized_by text,
Open_Date int,
Continuation_of text
)
CREATE TABLE people (
People_ID int,
Name text,
Country text,
Is_Male text,
Age int
)
CREATE TABLE wedding (
Church_ID int,
Male_ID int,
Female_ID int,
Year ... | SELECT Open_Date, COUNT(Open_Date) FROM church ORDER BY COUNT(Open_Date) | nvbench |
CREATE TABLE table_31119 (
"Team" text,
"Chairman" text,
"Head Coach" text,
"Captain" text,
"Kitmaker" text,
"Shirt sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the team for javier clemente
| SELECT "Team" FROM table_31119 WHERE "Head Coach" = 'Javier Clemente' | wikisql |
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE time_slot (
time_slot_id varcha... | SELECT dept_name, COUNT(dept_name) FROM student GROUP BY dept_name ORDER BY tot_cred | nvbench |
CREATE TABLE table_30473 (
"Club" text,
"Location" text,
"Home Venue" text,
"Capacity" text,
"Founded" real,
"Years Active" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the team that has a stadium capable of a capacity of 10,517 5,006... | SELECT "Location" FROM table_30473 WHERE "Capacity" = '10,517 5,006' | wikisql |
CREATE TABLE table_203_837 (
id number,
"rank" number,
"name" text,
"height\nft / m" text,
"floors" number,
"year" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which buildings are taller than 500 ft ?
| SELECT "name" FROM table_203_837 WHERE "height\nft / m" > 500 | squall |
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 questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Code | nvbench |
CREATE TABLE table_22615 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was ... | SELECT "Date of appointment" FROM table_22615 WHERE "Outgoing manager" = 'Simon Davies' | wikisql |
CREATE TABLE table_2071 (
"#" real,
"Volume line" text,
"Volume title" text,
"Creators" text,
"Material collected" text,
"Publication date" text,
"ISBN" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number for material collec... | SELECT COUNT("Material collected") FROM table_2071 WHERE "ISBN" = '978-1401221935' | wikisql |
CREATE TABLE table_name_90 (
result VARCHAR,
week VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the result for week larger than 10 for opponent of new england patriots
| SELECT result FROM table_name_90 WHERE week > 10 AND opponent = "new england patriots" | sql_create_context |
CREATE TABLE table_61687 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record at Tiger Stadium?
| SELECT "Record" FROM table_61687 WHERE "Game site" = 'tiger stadium' | wikisql |
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 prescriptions.drug_type FROM prescriptions WHERE prescriptions.formulary_drug_cd = "ENAL25I" | mimicsql_data |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "5" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_name_80 (
series VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the series of Kiss Me Cat?
| SELECT series FROM table_name_80 WHERE title = "kiss me cat" | sql_create_context |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE dual_carrier (
main_airline varchar,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BURBANK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.from_airport = AIR... | atis |
CREATE TABLE table_6010 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the earliest week with a game against the Pittsburgh Steelers at City Stadium ... | SELECT MIN("Week") FROM table_6010 WHERE "Attendance" < '32,012' AND "Venue" = 'city stadium' AND "Opponent" = 'pittsburgh steelers' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.insurance = "Self Pay" | mimicsql_data |
CREATE TABLE table_73373 (
"Season" text,
"League" text,
"Division" text,
"GP" real,
"W" real,
"L" real,
"T" real,
"OTL" real,
"SOL" real,
"Pts" real,
"PCT" text,
"GF" real,
"GA" real,
"PIM" real,
"Coach(es)" text,
"Result" text
)
-- Using valid SQLite, ... | SELECT COUNT("Season") FROM table_73373 WHERE "GP" = '64' AND "Result" = 'Lost in round 1' | wikisql |
CREATE TABLE table_name_47 (
character VARCHAR,
duration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the character with the duration of 11 years?
| SELECT character FROM table_name_47 WHERE duration = "11 years" | sql_create_context |
CREATE TABLE table_4824 (
"Award" text,
"Year" real,
"Category" text,
"Nominated Work" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the film made before 2005, winner of the robert award, in the category of bes... | SELECT "Result" FROM table_4824 WHERE "Category" = 'best actress' AND "Year" < '2005' AND "Award" = 'robert award' | wikisql |
CREATE TABLE table_21174 (
"Year" real,
"Tournaments played" real,
"Cuts made" real,
"Wins" real,
"Best finish" text,
"Earnings ( $ )" real,
"Money list rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when Casey Martin's best finish was... | SELECT "Money list rank" FROM table_21174 WHERE "Best finish" = 'T-65' | wikisql |
CREATE TABLE table_19122 (
"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, answer the follo... | SELECT "Points against" FROM table_19122 WHERE "Points for" = '743' | wikisql |
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date D... | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY COUNT(Document_Type_Description) | nvbench |
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.diagnosis = "GANGRENE" AND prescriptions.route = "TD" | mimicsql_data |
CREATE TABLE table_59915 (
"7:00 am" text,
"7:30 am" text,
"8:00 am" text,
"9:00 am" text,
"11:00 am" text,
"noon" text,
"12:30 pm" text,
"1:00 pm" text,
"1:30 pm" text,
"2:00 pm" text,
"3:00 pm" text,
"3:30 pm" text,
"4:00 pm" text,
"5:00 pm" text,
"6:30 pm" ... | SELECT "4:00 pm" FROM table_59915 WHERE "1:00 pm" = 'all my children' | wikisql |
CREATE TABLE table_2182562_1 (
year VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years was the position 97th?
| SELECT COUNT(year) FROM table_2182562_1 WHERE position = "97th" | sql_create_context |
CREATE TABLE table_name_23 (
summoned VARCHAR,
elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Summoned, when Elected is 'March 1298'?
| SELECT summoned FROM table_name_23 WHERE elected = "march 1298" | sql_create_context |
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_Billions real,
Num... | SELECT Creation, COUNT(Creation) FROM department ORDER BY Creation DESC | nvbench |
CREATE TABLE table_name_90 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the Home team was Carlton, what was the Away team score?
| SELECT away_team AS score FROM table_name_90 WHERE home_team = "carlton" | sql_create_context |
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 zyjybgb (
BBCJBW text,
BBDM t... | SELECT zyjybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE person_info.XM = '柳娟秀' ... | css |
CREATE TABLE table_37524 (
"Camera" text,
"Sensor resolution" text,
"Sensor" text,
"Output" text,
"CPU usage" text,
"IR LEDs" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What sensor has a resolution of 640x480 with small CPU usage, jpeg compr... | SELECT "Sensor" FROM table_37524 WHERE "Sensor resolution" = '640x480' AND "CPU usage" = 'small' AND "Output" = 'jpeg compressed' AND "Camera" = 'sony playstation eyetoy' | wikisql |
CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Dat... | SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform ORDER BY COUNT(*) | nvbench |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense... | SELECT q.Id AS "post_link", q.Tags, q.CreationDate, q.LastActivityDate FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '##tagname:string?geometry##' AND (LOWER(q.Body) LIKE '%##text?volume##%') ORDER BY q.LastActivityDate DESC | sede |
CREATE TABLE table_8107 (
"Distance" text,
"Time" text,
"Date" text,
"Location" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Distance has a Date of 1930-01-11?
| SELECT "Distance" FROM table_8107 WHERE "Date" = '1930-01-11' | wikisql |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "41021" | mimicsql_data |
CREATE TABLE table_name_59 (
score VARCHAR,
date VARCHAR,
goal VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the match played on 14 October 1998, resulting in more than 10 goals?
| SELECT score FROM table_name_59 WHERE date = "14 october 1998" AND goal > 10 | sql_create_context |
CREATE TABLE table_64878 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Intergiro classification" text,
"Trofeo Fast Team" text,
"Trofeo Super Team" text
)
-- Using valid SQLite, answer the following questio... | SELECT "Trofeo Fast Team" FROM table_64878 WHERE "Stage" = '19' | wikisql |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transa... | 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 ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_204_415 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the highest place that is listed in the table ?
| SELECT "place" FROM table_204_415 ORDER BY "place" LIMIT 1 | squall |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE T... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LONG BEACH' AND flight.arrival_time > 1400 AND flight.to_airport = AIRPORT_SERVICE_1.airp... | atis |
CREATE TABLE table_name_87 (
date VARCHAR,
home_captain VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date has george giffen as the home captain, and sydney cricket ground as the venue?
| SELECT date FROM table_name_87 WHERE home_captain = "george giffen" AND venue = "sydney cricket ground" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(),... | eicu |
CREATE TABLE table_name_55 (
tournament VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which tournament did he place 20th?
| SELECT tournament FROM table_name_55 WHERE result = "20th" | sql_create_context |
CREATE TABLE employees (
department_id VARCHAR,
employee_id VARCHAR
)
CREATE TABLE departments (
department_id VARCHAR,
manager_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- get the details of employees who manage a department.
| SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id | sql_create_context |
CREATE TABLE table_name_50 (
release_date VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the release date of Milk and Money?
| SELECT release_date FROM table_name_50 WHERE title = "milk and money" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "22377" | mimicsql_data |
CREATE TABLE table_16751596_6 (
poll_source VARCHAR,
dates_administered VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What poll source had an administered date on July 10, 2008?
| SELECT poll_source FROM table_16751596_6 WHERE dates_administered = "July 10, 2008" | sql_create_context |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_stop (
flight_id in... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DE... | atis |
CREATE TABLE table_name_51 (
source_of_wealth VARCHAR,
value VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What source of wealth has a value of 5726m?
| SELECT source_of_wealth FROM table_name_51 WHERE value = "£5726m" | sql_create_context |
CREATE TABLE table_67075 (
"Competition" text,
"1993\u2013 94" text,
"1994\u2013 95" text,
"1995\u2013 96" text,
"1996\u2013 97" text,
"1997\u2013 98" text,
"1998\u2013 99" text,
"1999\u2013 2000" text,
"2000\u2013 01" text,
"2001\u2013 02" text,
"2002\u2013 03" text,
"20... | SELECT "Competition" FROM table_67075 WHERE "2010" = 'dnp' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA" AND demographic.dob_year < "2076" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT zyjzjlb.JZKSDM, zyjzjlb.JZKSMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '02563283756' | css |
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 the tables provide... | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY Rank | nvbench |
CREATE TABLE table_31181 (
"#" real,
"Title" text,
"Author" text,
"Doctor" text,
"Featuring" text,
"Read by" text,
"Published" text,
"ISBN" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- THe audio book with ISBN 978-1-4084-6879-1 is read... | SELECT "Read by" FROM table_31181 WHERE "ISBN" = 'ISBN 978-1-4084-6879-1' | wikisql |
CREATE TABLE table_name_11 (
total_population__2010_census_ INTEGER,
area__km_2__ INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total population (2010 census) has an Area (km 2) smaller than 147,307.00?
| SELECT MAX(total_population__2010_census_) FROM table_name_11 WHERE area__km_2__ < 147 OFFSET 307.00 | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
r... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'sicu' AND STRFTIME('%y', transfers.intime) >= '2101') | mimic_iii |
CREATE TABLE table_66236 (
"State (class)" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date of successor's formal installation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Reason has a State (class) of tennessee (2)?
| SELECT "Reason for change" FROM table_66236 WHERE "State (class)" = 'tennessee (2)' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "3972" AND prescriptions.route = "INHALATION" | mimicsql_data |
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name... | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY id | nvbench |
CREATE TABLE table_203_532 (
id number,
"rebounds" number,
"off" number,
"def" number,
"player" text,
"team" text,
"date" text,
"opponent" text,
"score" text,
"minutes played" text,
"points" number,
"assists" number,
"steals" number,
"blocks" number,
"20-20" t... | SELECT (SELECT "minutes played" FROM table_203_532 WHERE "player" = 'charles oakley') > (SELECT "minutes played" FROM table_203_532 WHERE "player" = 'robert parish') | squall |
CREATE TABLE table_204_295 (
id number,
"model" text,
"origin" text,
"type" text,
"version" text,
"in service" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which utility vehicle has the most number in service ?
| SELECT "model" FROM table_204_295 ORDER BY "in service" DESC LIMIT 1 | squall |
CREATE TABLE table_78403 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHat was the result of the friendly match that was played on october 8, 2012?
| SELECT "Result" FROM table_78403 WHERE "Competition" = 'friendly match' AND "Date" = 'october 8, 2012' | wikisql |
CREATE TABLE table_69723 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What model engine has a lotus 16 chassis?
| SELECT "Engine" FROM table_69723 WHERE "Chassis" = 'lotus 16' | wikisql |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treat... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328... | eicu |
CREATE TABLE mzb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '章白雪' AND qtb.IN_HOSP_DATE BETWEEN '2001-02-22' AND '2010-06-01' GROUP BY qtb.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '章白雪' AND gyb.IN_HOSP_DATE BETWEEN '... | css |
CREATE TABLE table_17446 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many positions do the players of Chicago Black Hawks pla... | SELECT COUNT("Position") FROM table_17446 WHERE "NHL team" = 'Chicago Black Hawks' | wikisql |
CREATE TABLE mzb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '77275514' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 9201.03) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '77275514' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOU... | css |
CREATE TABLE table_47532 (
"Frequency" text,
"Call sign" text,
"Location" text,
"Name / Format" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Location has a Frequency of 102.5 fm?
| SELECT "Location" FROM table_47532 WHERE "Frequency" = '102.5 fm' | wikisql |
CREATE TABLE table_2886617_8 (
player VARCHAR,
nhl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player was picked for Buffalo Sabres?
| SELECT player FROM table_2886617_8 WHERE nhl_team = "Buffalo Sabres" | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '袁秀艾' AND IN_HOSP_DATE BETWEEN '2011-08-04' AND '2014-09-24' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.