instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_73086 (
"World Rank" real,
"Company" text,
"Industry" text,
"Revenue (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name ... | SELECT "World Rank" FROM table_73086 WHERE "Market Value (billion $)" = '17.2' | 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.short_title = "DMII oth uncntrld" | mimicsql_data |
CREATE TABLE table_name_9 (
venue VARCHAR,
competition VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the friendly competition on 7 June 1999 played?
| SELECT venue FROM table_name_9 WHERE competition = "friendly" AND date = "7 june 1999" | sql_create_context |
CREATE TABLE table_name_28 (
minimum_age_at_1st_dose VARCHAR,
number_of_doses VARCHAR,
dose VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least age for the 1st dose for 3 doses of 2-3 drops
| SELECT minimum_age_at_1st_dose FROM table_name_28 WHERE number_of_doses = "3 doses" AND dose = "2-3 drops" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '华婉容' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2003-05-06' AND '2013-09-20' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb... | css |
CREATE TABLE table_train_211 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the ta... | SELECT * FROM table_train_211 WHERE hemoglobin_a1c_hba1c >= 7 AND hemoglobin_a1c_hba1c <= 11 | criteria2sql |
CREATE TABLE table_12562214_1 (
notes VARCHAR,
date__to_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is the date (to) 1919?
| SELECT COUNT(notes) FROM table_12562214_1 WHERE date__to_ = "1919" | sql_create_context |
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.MZZYZDZZBM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '22762045493' | css |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_name_27 (
album VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which album was on June 1998?
| SELECT album FROM table_name_27 WHERE year = "june 1998" | sql_create_context |
CREATE TABLE table_name_66 (
head_linesman VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the head linesman at game xxxv?
| SELECT head_linesman FROM table_name_66 WHERE game = "xxxv" | sql_create_context |
CREATE TABLE table_35255 (
"Rank" real,
"Airport" text,
"Location" text,
"Code (IATA)" text,
"Total Cargo (Metric Tonnes)" text,
"2003 Rank" text,
"% Change" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which airport has an IATA code of AM... | SELECT "Airport" FROM table_35255 WHERE "Code (IATA)" = 'ams' | wikisql |
CREATE TABLE table_204_980 (
id number,
"name" text,
"type" text,
"elevation\n(ground station)" number,
"elevation\n(mountain station)" number,
"slope length" number,
"capacity\n(persons/hour)" number,
"construction year" number
)
-- Using valid SQLite, answer the following questions f... | SELECT "name" FROM table_204_980 WHERE "type" = 'cable car' ORDER BY "construction year" LIMIT 1 | squall |
CREATE TABLE table_name_51 (
opposition VARCHAR,
year VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opposition has a Year smaller than 1911, and a Venue of old trafford?
| SELECT opposition FROM table_name_51 WHERE year < 1911 AND venue = "old trafford" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-18714')) AND intakeoutput.celllabel = 'indwe... | eicu |
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.drugname FROM (SELECT t2.drugname, 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 = 'atrial fibrilla... | eicu |
CREATE TABLE table_29743928_4 (
years VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When chris konopka category:articles with hcards is the name what is the year?
| SELECT years FROM table_29743928_4 WHERE name = "Chris Konopka Category:Articles with hCards" | sql_create_context |
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Tests_Taken (
registration_id I... | SELECT family_name, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench |
CREATE TABLE table_203_27 (
id number,
"number" number,
"serial no" number,
"entered service" text,
"withdrawn" text,
"kilometres travelled" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which locomotive did not have any info after it entered... | SELECT "number" FROM table_203_27 WHERE "kilometres travelled" IS NULL | squall |
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 demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND procedures.icd9_code = "9229" | mimicsql_data |
CREATE TABLE table_35379 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partnering" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Opponents of sebasti n decoud santiago giraldo had what surface?
| SELECT "Surface" FROM table_35379 WHERE "Opponents" = 'sebastián decoud santiago giraldo' | wikisql |
CREATE TABLE table_train_229 (
"id" int,
"hemoglobin_a1c_hba1c" float,
"active_metabolic" bool,
"body_weight" float,
"hba1c" float,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- hba1c between 7.5 and 10 %
| SELECT * FROM table_train_229 WHERE hba1c >= 7.5 AND hemoglobin_a1c_hba1c <= 10 | criteria2sql |
CREATE TABLE table_23244 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the total is 17, what was the maximum rank amount?
| SELECT MAX("Rank") FROM table_23244 WHERE "Total" = '17' | wikisql |
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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '戚清佳' AND MED_SER_ORG_NO = '3389620' AND OUT_DIAG_DOC_NM LIKE '窦%' | css |
CREATE TABLE table_67435 (
"Season" real,
"Year" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Regular Season Standing" text,
"Final Standing" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest season with a regular seaso... | SELECT MIN("Season") FROM table_67435 WHERE "Regular Season Standing" = '11th from 15' AND "Wins" > '10' | wikisql |
CREATE TABLE table_30085411_1 (
WC INTEGER,
matches VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- if the matches are 16 what is the wc matches
| SELECT MAX(WC) AS matches FROM table_30085411_1 WHERE matches = 16 | 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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_name_24 (
venue VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what venue did FK Crvena Stijena play at home?
| SELECT venue FROM table_name_24 WHERE home = "fk crvena stijena" | 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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '6975310' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-10-23' AND '2018-10-29' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 448.65) AS T | css |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int... | 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 = 'PHILADELPHIA' AND flight.departure_time > 1900 AND flight.to_airport = AIRPORT_SERVICE_1.... | atis |
CREATE TABLE gwyjzb (
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 AVG(gwyjzb.MED_AMOUT) FROM gwyjzb WHERE gwyjzb.MED_ORG_DEPT_NM = '中医肾病内科' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-02-27' AND '2014-01-30' AND gwyjzb.IN_DIAG_DIS_NM = '化脓性牙龈炎' AND gwyjzb.CLINIC_TYPE = '住院' UNION SELECT AVG(fgwyjzb.MED_AMOUT) FROM fgwyjzb WHERE fgwyjzb.MED_ORG_DEPT_NM = '中医肾病内科' AND fgwyjzb.IN_HOSP_... | css |
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
home town text
)
CREATE TABLE perpetrator (
perpetrator_id number,
people_id number,
date text,
year number,
location text,
country text,
killed number,
injured number
)
-- Using valid... | SELECT T1.name FROM people AS T1 JOIN perpetrator AS T2 ON T1.people_id = T2.people_id ORDER BY T1.weight DESC LIMIT 1 | spider |
CREATE TABLE table_204_220 (
id number,
"entered" text,
"weeks in\ntop 10" number,
"single" text,
"artist" text,
"peak" number,
"peak\nreached" text,
"weeks\nat peak" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- this song released by... | SELECT "single" FROM table_204_220 WHERE "artist" = 'celine dion' AND "weeks in\ntop 10" = 17 | squall |
CREATE TABLE table_15694 (
"Year" text,
"Category" text,
"Title" text,
"Genre" text,
"Label" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What category did MCG get a nominee in?
| SELECT "Category" FROM table_15694 WHERE "Label" = 'mcg' AND "Result" = 'nominee' | wikisql |
CREATE TABLE table_45226 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Country, when Place is 'T3', and when Player is 'Jim Thorpe'?
| SELECT "Country" FROM table_45226 WHERE "Place" = 't3' AND "Player" = 'jim thorpe' | wikisql |
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 MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '62495309' AND MED_SER_ORG_NO = '2963519' AND IN_DIAG_DIS_NM LIKE '%人格%' | css |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '水凯复' AND hz_info.YLJGDM = '0439258' AND NOT mzjzjlb.JZZDSM LIKE '%酒精%' | css |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM 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.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_59125 (
"Week 1" text,
"Week 2" text,
"Week 3" text,
"Week 4" text,
"Week 5" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What kind of Week 4 has a Week 1 of sheila levell?
| SELECT "Week 4" FROM table_59125 WHERE "Week 1" = 'sheila levell' | wikisql |
CREATE TABLE table_67886 (
"City" text,
"Province/Region" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what country is Hiroshima Airport located?
| SELECT "Country" FROM table_67886 WHERE "Airport" = 'hiroshima airport' | wikisql |
CREATE TABLE table_204_117 (
id number,
"season" number,
"level" text,
"division" text,
"section" text,
"position" text,
"movements" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the number of times norra was listed as the section ... | SELECT COUNT(*) FROM table_204_117 WHERE "section" = 'norra' | squall |
CREATE TABLE table_name_65 (
week_5 VARCHAR,
week_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the girl of the week 3 weeks after brianne bailey in the same month?
| SELECT week_5 FROM table_name_65 WHERE week_2 = "brianne bailey" | sql_create_context |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text... | SELECT DISTINCT booking_class FROM class_of_service WHERE booking_class = 'Q' | atis |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE m... | SELECT MIN(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-24054')) AND NOT vitalperiodic.sao2 IS NULL AND DATET... | eicu |
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 ACC_Regular_Season, ACC_Percent FROM basketball_match | nvbench |
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 SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '云承平' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-08-03' AND '2015-04-30' | css |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
... | SELECT p.Id AS "post_link", CASE p.PostTypeId WHEN 1 THEN 'Question' WHEN 2 THEN 'Answer' ELSE NULL END AS Type, p.CreationDate, p.Score, p.Body, c.Text FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id WHERE c.UserId = '##UserId:int##' AND p.Body LIKE '%' + '##Query:string##' + '%' COLLATE sql_latin1_general... | sede |
CREATE TABLE table_5259 (
"Song title" text,
"Artist" text,
"Language" text,
"Decade" text,
"Genre" text,
"Exportable" text,
"Family Friendly" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what song is a genre of glam
| SELECT "Song title" FROM table_5259 WHERE "Genre" = 'glam' | wikisql |
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
CREATE TABLE department (
dept_name text,
building text,
budget number
)
CREATE TABLE advisor (
s_id text,
i_id text
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
cre... | SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology' | spider |
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the last names of students in roo... | SELECT lastname FROM list WHERE classroom = 111 | spider |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND prescriptions.route = "ID" | mimicsql_data |
CREATE TABLE diagnoses (
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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "LEFT FEMUR FRACTURE" | mimicsql_data |
CREATE TABLE table_46012 (
"Year" real,
"Best teenage/Young Adult" text,
"Reader's Vote" text,
"Best Non-Fiction" text,
"Lifetime Achievement" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times was the reader's vote na and the lifetime ac... | SELECT COUNT("Year") FROM table_46012 WHERE "Reader's Vote" = 'na' AND "Lifetime Achievement" = 'na' | wikisql |
CREATE TABLE table_29273243_1 (
written_by VARCHAR,
no_in_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote episode number 11?
| SELECT written_by FROM table_29273243_1 WHERE no_in_season = 11 | 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 demographic.age, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
... | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id | nvbench |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
... | SELECT Fname, COUNT(Fname) FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.AllergyType = "food") GROUP BY Fname ORDER BY COUNT(Fname) | nvbench |
CREATE TABLE table_2668243_17 (
result VARCHAR,
candidates VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the result for james lent (j) 52.3% silas wood (aj) 47.7%
| SELECT result FROM table_2668243_17 WHERE candidates = "James Lent (J) 52.3% Silas Wood (AJ) 47.7%" | sql_create_context |
CREATE TABLE table_name_36 (
state VARCHAR,
charter_range VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What state had an active chapter from 1906-1991?
| SELECT state FROM table_name_36 WHERE charter_range = "1906-1991" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vascular catheter placement - central venous' AND DATETIME(treatment.trea... | eicu |
CREATE TABLE table_19063 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the bleeding time with condition being liver failu... | SELECT "Bleeding time" FROM table_19063 WHERE "Condition" = 'Liver failure, end-stage' | wikisql |
CREATE TABLE table_14602 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the outcome for 6 march 2000
| SELECT "Outcome" FROM table_14602 WHERE "Date" = '6 march 2000' | wikisql |
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 hz_info.person_info_JGDM, hz_info.person_info_JGMC, COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDBM = 'T31.744' GROUP BY hz_info.person_info_JGDM | css |
CREATE TABLE table_18801 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the mens doubles and womens singles is wang sh... | SELECT "Mens doubles" FROM table_18801 WHERE "Womens singles" = 'Wang Shixian' | wikisql |
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
pap... | SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM author, cite, paper, writes WHERE author.authorname = 'ohad shamir' AND paper.paperid = cite.citedpaperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC | scholar |
CREATE TABLE table_44440 (
"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 laps have 50 points?
| SELECT "Laps" FROM table_44440 WHERE "Points" = '50' | wikisql |
CREATE TABLE table_39195 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"Podiums" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wins where there total for Series named formula 3 euro series as... | SELECT COUNT("Wins") FROM table_39195 WHERE "Series" = 'formula 3 euro series' AND "Podiums" > '2' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int... | SELECT DISTINCT number FROM course WHERE (description LIKE '%Investigations%' OR name LIKE '%Investigations%') AND department = 'EECS' | advising |
CREATE TABLE table_name_74 (
opponent VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What opponent has a result of 3 6, 6 2, 4 6?
| SELECT opponent FROM table_name_74 WHERE result = "3–6, 6–2, 4–6" | sql_create_context |
CREATE TABLE table_name_77 (
nation VARCHAR,
rank INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the nation with rank more than 9
| SELECT nation FROM table_name_77 WHERE rank > 9 | sql_create_context |
CREATE TABLE table_name_34 (
played INTEGER,
goals_against VARCHAR,
position VARCHAR,
draws VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of played for position less than 9 and draws more than 19 with goals against more than 27
| SELECT SUM(played) FROM table_name_34 WHERE position < 9 AND draws > 19 AND goals_against > 27 | sql_create_context |
CREATE TABLE table_name_86 (
surface VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the surface for Adrian Ungur as an opponent?
| SELECT surface FROM table_name_86 WHERE opponent = "adrian ungur" | sql_create_context |
CREATE TABLE table_2463 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT "Miles (km)" FROM table_2463 WHERE "Driver" = 'Jeff Gordon' | wikisql |
CREATE TABLE table_42088 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Name with Goals that are 135?
| SELECT "Name" FROM table_42088 WHERE "Goals" = '135' | wikisql |
CREATE TABLE table_19870 (
"Eviction No." real,
"Nominee" text,
"Vote to Save" text,
"Vote to Evict" text,
"Net vote" text,
"Eviction result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What nominees had a net vote of 34.46%?
| SELECT "Nominee" FROM table_19870 WHERE "Net vote" = '34.46%' | wikisql |
CREATE TABLE table_name_33 (
round VARCHAR,
opponents VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the round with ajax opponents
| SELECT round FROM table_name_33 WHERE opponents = "ajax" | sql_create_context |
CREATE TABLE table_60881 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country does Greg Norman represent?
| SELECT "Country" FROM table_60881 WHERE "Player" = 'greg norman' | wikisql |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_M... | SELECT COUNT(*) FROM mzjzjlb WHERE JZKSMC = '小儿骨质疏松科' AND JZKSRQ BETWEEN '2007-07-31' AND '2007-12-11' | css |
CREATE TABLE table_name_46 (
year_joined VARCHAR,
enrollment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which year did the school with enrollment of 413 join?
| SELECT year_joined FROM table_name_46 WHERE enrollment = 413 | sql_create_context |
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club... | SELECT Position, COUNT(*) FROM player WHERE Points < 30 GROUP BY Position | nvbench |
CREATE TABLE table_11915 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home score with an away team of 9.17... | SELECT "Home team score" FROM table_11915 WHERE "Away team score" = '9.17 (71)' | wikisql |
CREATE TABLE table_name_44 (
time VARCHAR,
name VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is the name matt targett and the lane higher than 7?
| SELECT COUNT(time) FROM table_name_44 WHERE name = "matt targett" AND lane > 7 | sql_create_context |
CREATE TABLE table_68738 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Pts." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which entrant has fewer than 12 points, a Climax engine, and a Lotus 24 chassis?
| SELECT "Entrant" FROM table_68738 WHERE "Pts." < '12' AND "Engine" = 'climax' AND "Chassis" = 'lotus 24' | wikisql |
CREATE TABLE table_name_38 (
city_location VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did the Gould Rex Mays Classic 150 occur?
| SELECT city_location FROM table_name_38 WHERE race_name = "gould rex mays classic 150" | sql_create_context |
CREATE TABLE table_name_44 (
draw VARCHAR,
jury VARCHAR,
televote VARCHAR,
artist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Draw has a Televote larger than 18, and an Artist of elizabeth anastasiou, and a Jury larger than 4?
| SELECT COUNT(draw) FROM table_name_44 WHERE televote > 18 AND artist = "elizabeth anastasiou" AND jury > 4 | sql_create_context |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time... | 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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SALT LAKE CITY' AND date_day.day_number = 21 AND date_day.month_number =... | atis |
CREATE TABLE table_61949 (
"English name" text,
"Thai name" text,
"Transcription" text,
"Color" text,
"Sanskrit word" text,
"Planet" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Color has a Transcription of wan suk?
| SELECT "Color" FROM table_61949 WHERE "Transcription" = 'wan suk' | wikisql |
CREATE TABLE table_21624 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For series number 256, what was the original air date?
| SELECT "Original air date" FROM table_21624 WHERE "Series #" = '256' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '030-80604' AND STRFTIME('%y', patient.hospitaldischargetime) >= '2104' ORDER BY patient.hospitaldischargetime DESC LIMIT 1 | eicu |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0855489' AND t_kc21.MED_ORG_DEPT_NM = '骨科') AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-08-29' AND '2020-01-27' | 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 T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | nvbench |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number ... | SELECT DISTINCT name, number FROM course WHERE credits = 10 AND department = 'EECS' | advising |
CREATE TABLE table_name_45 (
result VARCHAR,
game_site VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the result for arrowhead stadium
| SELECT result FROM table_name_45 WHERE game_site = "arrowhead stadium" | sql_create_context |
CREATE TABLE financial_transactions (
transaction_id number,
previous_transaction_id number,
account_id number,
card_id number,
transaction_type text,
transaction_date time,
transaction_amount number,
transaction_comment text,
other_transaction_details text
)
CREATE TABLE customers ... | SELECT customer_id, customer_first_name FROM customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM customers_cards AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = "Credit" | spider |
CREATE TABLE table_name_29 (
agricultural_panel INTEGER,
industrial_and_commercial_panel VARCHAR,
national_university_of_ireland VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest number of members on the Agricultural Panel, when the Indu... | SELECT MIN(agricultural_panel) FROM table_name_29 WHERE industrial_and_commercial_panel = 9 AND national_university_of_ireland > 3 | sql_create_context |
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.JCFF FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND ... | css |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'abn react-external... | mimic_iii |
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid ... | SELECT DISTINCT paper.paperid, paper.year FROM author, paper, writes WHERE author.authorname = 'balakrishnan prabhakaran' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admission_type = "URGENT" | mimicsql_data |
CREATE TABLE table_40781 (
"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 totals does Chile have when the number of silvers is more than 0?
| SELECT COUNT("Total") FROM table_40781 WHERE "Nation" = 'chile' AND "Silver" > '0' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.