instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 t_kc22 WHERE t_kc22.MED_ORG_DEPT_NM = '创伤骨科' AND t_kc22.STA_DATE BETWEEN '2001-12-15' AND '2006-08-16' AND t_kc22.SOC_SRT_DIRE_CD = '4859' | css |
CREATE TABLE table_name_62 (
nominated_work VARCHAR,
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Nominated Work earlier than 2003?
| SELECT nominated_work FROM table_name_62 WHERE year < 2003 | sql_create_context |
CREATE TABLE table_13825 (
"Brand" text,
"Model" text,
"Type" text,
"Modem" text,
"Storage" text,
"CPU speed" text,
"CPU chip" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the type of the RCA RW-2110, which has 2 MB of storage and ... | SELECT "Type" FROM table_13825 WHERE "Modem" = 'v.90' AND "Storage" = '2 mb' AND "Brand" = 'rca' AND "Model" = 'rw-2110' | wikisql |
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 SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-2639') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | eicu |
CREATE TABLE table_79314 (
"Area" text,
"State/ Province" text,
"CSA/CMA 2009 population" real,
"Projected 2025 population" text,
"Projected increase 2009-2025" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the projected population of IN-MI?... | SELECT "Projected 2025 population" FROM table_79314 WHERE "State/ Province" = 'in-mi' | wikisql |
CREATE TABLE table_23722304_2 (
bore__mm_ VARCHAR,
vehicle_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the bore where the vehicle code is t214?
| SELECT bore__mm_ FROM table_23722304_2 WHERE vehicle_code = "T214" | sql_create_context |
CREATE TABLE table_name_87 (
player VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player has a total of 297?
| SELECT player FROM table_name_87 WHERE total = 297 | sql_create_context |
CREATE TABLE table_name_31 (
vehicle_flight__number VARCHAR,
pilot VARCHAR,
velocity__km_h_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Vehicle Flight # has Pilot Peterson and Velocity (km/h) of 649?
| SELECT vehicle_flight__number FROM table_name_31 WHERE pilot = "peterson" AND velocity__km_h_ = 649 | sql_create_context |
CREATE TABLE captain (
CLASS VARCHAR,
age INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the average and minimum age of captains in different class?
| SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS | 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 mzjzjlb (
HXPLC number,
HZXM ... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON 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.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AN... | css |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14054) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | mimic_iii |
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 diagnosis (
diagn... | SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 's/p aneurysm resection/repair' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY STRFTIME('%y', diagnosis.diagnosistime)) AS t1 | eicu |
CREATE TABLE table_name_65 (
driver VARCHAR,
points VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What driver has over 19 points and a grid of over 2?
| SELECT driver FROM table_name_65 WHERE points > 19 AND grid > 2 | sql_create_context |
CREATE TABLE table_name_43 (
word__number INTEGER,
subframe__number INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total word count with a subframe count greater than 3?
| SELECT SUM(word__number) FROM table_name_43 WHERE subframe__number > 3 | sql_create_context |
CREATE TABLE product (
max_page_size VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the list of page size which have more than 3 product listed
| SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3 | sql_create_context |
CREATE TABLE table_27495117_3 (
manner_of_departure VARCHAR,
outgoing_manager VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many teams had an outgoing manager of antonio g mez
| SELECT COUNT(manner_of_departure) FROM table_27495117_3 WHERE outgoing_manager = "Antonio Gómez" | sql_create_context |
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREATE TABLE Catalog_Contents (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
parent_entry_id INTEGER,
prev... | SELECT attribute_name, COUNT(attribute_name) FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 GROUP BY attribute_name ORDER BY COUNT(attribute_name) DESC | nvbench |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_2668329_11 (
party VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is Peter Little's party?
| SELECT party FROM table_2668329_11 WHERE incumbent = "Peter Little" | sql_create_context |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name var... | 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 ((flight.arrival_time <= 1800 AND flight.arrival_time >= 1600) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LOS ANGELES' AND flight... | atis |
CREATE TABLE table_35187 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the grid for anthony davidson when the laps were less than 8?
| SELECT COUNT("Grid") FROM table_35187 WHERE "Driver" = 'anthony davidson' AND "Laps" < '8' | wikisql |
CREATE TABLE table_43047 (
"Volume" text,
"Series" text,
"Title" text,
"Cover" text,
"Published" text,
"ISBN" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the series with an ISBN of 978-1-59582-523-0 (tpb)?
| SELECT "Series" FROM table_43047 WHERE "ISBN" = '978-1-59582-523-0 (tpb)' | wikisql |
CREATE TABLE table_name_47 (
year VARCHAR,
title VARCHAR,
award VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was Black Swan up for the Gotham Awards?
| SELECT COUNT(year) FROM table_name_47 WHERE title = "black swan" AND award = "gotham awards" | 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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '61021790' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 5648.4) | css |
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 COUNT(*) 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 txmzjzjlb.JZKSRQ BETWEEN '2005-05-11' AND '2021-10-27' AND txmzjzjlb.YLJGDM = '4321914' UNI... | css |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT DATE(CreationDate), COUNT(Tags) FROM Posts WHERE Tags LIKE '%r%' GROUP BY DATE(CreationDate) | sede |
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 COUNT(*) FROM t_kc22 WHERE t_kc22.MED_ORG_DEPT_NM = '牙体牙髓科' AND t_kc22.STA_DATE BETWEEN '2000-06-19' AND '2009-11-02' AND t_kc22.SOC_SRT_DIRE_NM = '利培酮片(薄膜衣)' | css |
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 COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '魏俊发' AND t_kc22.STA_DATE BETWEEN '2000-08-07' AND '2002-12-06' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸胺碘酮片' | css |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other drugs and medicinal substances causing adverse effects in therapeutic use" | mimicsql_data |
CREATE TABLE table_62083 (
"Companion (in order from star)" text,
"Mass" text,
"Semimajor axis ( AU )" text,
"Orbital period ( s day )" text,
"Eccentricity" text,
"Inclination" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Semimajor axis (... | SELECT "Semimajor axis ( AU )" FROM table_62083 WHERE "Mass" = '≥ 3.5 ± 1.4 m⊕' | wikisql |
CREATE TABLE table_35831 (
"RNA Segment (Gene)" real,
"Size ( s base pair )" real,
"Protein" text,
"Molecular weight kDa" text,
"Location" text,
"Copies per particle" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many copies per particle do... | SELECT "Copies per particle" FROM table_35831 WHERE "Protein" = 'nsp2' | wikisql |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND DAYS_1.day_name = ... | atis |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester... | advising |
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 t_kc21.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7883638' GROUP BY t_kc21.MED_ORG_DEPT_CD | css |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ... | SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY AVG(T1.stars) | nvbench |
CREATE TABLE table_name_12 (
d_erp VARCHAR,
city_of_license VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the D ERP in San Martin Texmelucan, Puebla?
| SELECT d_erp FROM table_name_12 WHERE city_of_license = "san martin texmelucan, puebla" | sql_create_context |
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 * FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '95841621' AND hz_info.YLJGDM = '3219418' AND NOT mzjzjlb.JZZDSM LIKE '%煤%' | css |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 64292) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ph') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-4 mont... | mimic_iii |
CREATE TABLE table_39222 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the incumbent that is a republican and first elected before 1864?
| SELECT "Incumbent" FROM table_39222 WHERE "Party" = 'republican' AND "First elected" < '1864' | wikisql |
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 COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '凤慧捷' AND t_kc22.STA_DATE BETWEEN '2003-03-14' AND '2017-06-09' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
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_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC | 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 COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '0862388' AND IN_HOSP_DATE BETWEEN '2000-02-09' AND '2011-08-18' AND CLINIC_TYPE = '购药' | css |
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 demographic.dischtime FROM demographic WHERE demographic.name = "Betty Campbell" | mimicsql_data |
CREATE TABLE courses (
course_id number,
author_id number,
subject_id number,
course_name text,
course_description text
)
CREATE TABLE student_course_enrolment (
registration_id number,
student_id number,
course_id number,
date_of_enrolment time,
date_of_completion time
)
CREAT... | SELECT course_description FROM courses WHERE course_name = "database" | spider |
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 hz_info (
KH text,
KLX number... | SELECT mzjzjlb.JZLSH 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 NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2009-07-30') | css |
CREATE TABLE table_name_93 (
label VARCHAR,
region VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What label is from the Region of Spain?
| SELECT label FROM table_name_93 WHERE region = "spain" | sql_create_context |
CREATE TABLE table_55537 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the grid total for kazuyoshi hoshino with under 71 laps?
| SELECT SUM("Grid") FROM table_55537 WHERE "Driver" = 'kazuyoshi hoshino' AND "Laps" < '71' | wikisql |
CREATE TABLE table_204_89 (
id number,
"team" text,
"truck(s)" text,
"#" number,
"driver(s)" text,
"primary sponsor(s)" text,
"listed owner(s)" text,
"crew chief" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams have ford f-... | SELECT COUNT("team") FROM table_204_89 WHERE "truck(s)" = 'ford f-150' | squall |
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Benign neoplasm of spinal meninges" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_name_7 (
date VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date was the x gran premio di napoli?
| SELECT date FROM table_name_7 WHERE race_name = "x gran premio di napoli" | 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 txmzjzjlb.YLJGDM 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 = '赵芳荃' UNION SELECT ftxmzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN ftxmzjzjlb ON person_... | css |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
item... | SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 3745 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1 | mimic_iii |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospita... | SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '035-11731' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-5 year') | eicu |
CREATE TABLE table_203_20 (
id number,
"player" text,
"year" number,
"round" text,
"result" text,
"opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- is dean winstanley listed above or below kyle anderson ?
| SELECT (SELECT id FROM table_203_20 WHERE "player" = 'dean winstanley') < (SELECT id FROM table_203_20 WHERE "player" = 'kyle anderson') | squall |
CREATE TABLE table_name_44 (
tie_no VARCHAR,
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- /What is Tie No, when Date is 18 February 1956, and when Away Team is Tottenham Hotspur?
| SELECT tie_no FROM table_name_44 WHERE date = "18 february 1956" AND away_team = "tottenham hotspur" | sql_create_context |
CREATE TABLE table_41574 (
"Week of" text,
"Tier" text,
"Winner" text,
"Runner-up" text,
"Semi finalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Week, when Semi Finalists is Sandrine Testud Yone Kamio?
| SELECT "Week of" FROM table_41574 WHERE "Semi finalists" = 'sandrine testud yone kamio' | wikisql |
CREATE TABLE table_55680 (
"Riding" text,
"Candidate" text,
"Gender" text,
"Residence" text,
"Occupation" text,
"Votes" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What occupation does Mary Louise Lorefice have?
| SELECT "Occupation" FROM table_55680 WHERE "Candidate" = 'mary louise lorefice' | wikisql |
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state text
)
CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
)
CREATE TABLE ... | SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1 | spider |
CREATE TABLE table_2588 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the episode titled... | SELECT "Original air date" FROM table_2588 WHERE "Title" = 'Route 666 (Part 1)' | wikisql |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE trip (
id INTEGER,
d... | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 ORDER BY COUNT(date) | nvbench |
CREATE TABLE table_10908676_7 (
title VARCHAR,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title written by David Mamet?
| SELECT title FROM table_10908676_7 WHERE written_by = "David Mamet" | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
trea... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE STRFTIME('%y', treatment.treatmenttime) <= '2100' GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4 | eicu |
CREATE TABLE table_20848 (
"City" text,
"Chinese" text,
"Pinyin" text,
"Province" text,
"Urban Population (2010)" real,
"Administrative Population (2010)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total administrative population... | SELECT COUNT("Administrative Population (2010)") FROM table_20848 WHERE "City" = 'Shanghai' | wikisql |
CREATE TABLE table_13619105_3 (
location_attendance VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did they play and how many attended in the game against minnesota?
| SELECT location_attendance FROM table_13619105_3 WHERE team = "Minnesota" | sql_create_context |
CREATE TABLE table_name_16 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for 2013 when 2012 is 2r?
| SELECT 2013 FROM table_name_16 WHERE 2012 = "2r" | sql_create_context |
CREATE TABLE table_15796054_3 (
order__number VARCHAR,
original_artist VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the order number for the beatles and result is safe
| SELECT order__number FROM table_15796054_3 WHERE original_artist = "The Beatles" AND result = "Safe" | sql_create_context |
CREATE TABLE table_2604 (
"Rank" real,
"Athlete" text,
"Nation" text,
"Olympics" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total(min. 2 medals)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank did the nation with athlete... | SELECT COUNT("Rank") FROM table_2604 WHERE "Athlete" = 'Peter Snell Category:Articles with hCards' | wikisql |
CREATE TABLE table_70070 (
"Institution" text,
"Team" text,
"City" text,
"Province" text,
"First season" real,
"Head coach" text,
"Enrollment" real,
"Endowment" text,
"Football stadium" text,
"Capacity" real
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT MIN("Enrollment") FROM table_70070 WHERE "Capacity" > '35,650' | 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 gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '蒋芳馥' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '蒋芳馥' GROUP BY fgwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_name_91 (
react INTEGER,
name VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average React, when Name is 'Candice Davis', and when Lane is less than 3?
| SELECT AVG(react) FROM table_name_91 WHERE name = "candice davis" AND lane < 3 | sql_create_context |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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,
... | SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND ... | css |
CREATE TABLE table_name_73 (
gold_medals VARCHAR,
ensemble VARCHAR,
silver_medals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many gold medals for bellbrook HS with less than 1 silver?
| SELECT COUNT(gold_medals) FROM table_name_73 WHERE ensemble = "bellbrook hs" AND silver_medals < 1 | sql_create_context |
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
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 Allergy_Type (
Allergy VARCHAR(20),
... | SELECT LName, Age FROM Student WHERE StuID IN (SELECT StuID FROM Has_Allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_Allergy WHERE Allergy = "Cat") | nvbench |
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "84129" | mimicsql_data |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sinus tachycardia' AND DATETIME(diagnosis.di... | eicu |
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE... | SELECT meter_500, meter_100 FROM swimmer ORDER BY meter_100 | nvbench |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id nu... | SELECT EmailHash FROM Users WHERE NOT EmailHash IS NULL | sede |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE pr... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN... | mimic_iii |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 5 | eicu |
CREATE TABLE table_12266757_1 (
womens_doubles VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where were the Womens Doubles in the 1951/1952 season and who won?
| SELECT womens_doubles FROM table_12266757_1 WHERE season = "1951/1952" | sql_create_context |
CREATE TABLE table_41051 (
"Date" text,
"Opponent" text,
"Location" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Location of the game on 11/08/1975*?
| SELECT "Location" FROM table_41051 WHERE "Date" = '11/08/1975*' | wikisql |
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)... | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Name ORDER BY Document_Date | nvbench |
CREATE TABLE table_name_55 (
played INTEGER,
wins VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the played when the wins is 21 and the positions is higher than 3?
| SELECT SUM(played) FROM table_name_55 WHERE wins = 21 AND position > 3 | sql_create_context |
CREATE TABLE table_name_84 (
tonnage_grt INTEGER,
nationality VARCHAR,
ship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the least tonnage grt when the nationality is british and the ship is kidalton?
| SELECT MIN(tonnage_grt) FROM table_name_84 WHERE nationality = "british" AND ship = "kidalton" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-168146')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_T... | eicu |
CREATE TABLE table_42612 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Unit" text,
"Location" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the notes where the authors are Zhou & Zhang?
| SELECT "Notes" FROM table_42612 WHERE "Authors" = 'zhou & zhang' | wikisql |
CREATE TABLE table_name_61 (
attendance VARCHAR,
week VARCHAR,
game_site VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- After week 2, how many people attended the game at Rich Stadium against the Miami Dolphins?
| SELECT COUNT(attendance) FROM table_name_61 WHERE game_site = "rich stadium" AND opponent = "miami dolphins" AND week > 2 | sql_create_context |
CREATE TABLE table_13824 (
"Brand" text,
"Model" text,
"Type" text,
"Modem" text,
"Storage" text,
"CPU speed" text,
"CPU chip" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which CPU chip(s) is used in the Classic type hardware?
| SELECT "CPU chip" FROM table_13824 WHERE "Type" = 'classic' | wikisql |
CREATE TABLE table_31395 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the origi... | SELECT "Original air date" FROM table_31395 WHERE "Written by" = 'Liz Feldman' | wikisql |
CREATE TABLE table_68400 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the record when the attendance was more than 20,228 and rockies was the opponent ... | SELECT "Record" FROM table_68400 WHERE "Attendance" > '20,228' AND "Opponent" = 'rockies' AND "Date" = 'june 8' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'cd8 cells, percent')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'star... | mimic_iii |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513')) AND microlab.culturesite = 'urine, catheter specimen' AND DA... | eicu |
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 COUNT(DISTINCT MED_SER_ORG_NO) FROM t_kc21 WHERE PERSON_NM = '苏家欣' AND IN_HOSP_DATE BETWEEN '2000-02-24' AND '2009-04-29' | css |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Radical neck dissection, unilateral" | mimicsql_data |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT YR_MONTH, COUNT(*) AS NumAnswerers FROM (SELECT (TIME_TO_STR(p.CreationDate, '%y') + (TIME_TO_STR(p.CreationDate, '%m') - 1) / 12.0) AS YR_MONTH, u.Id AS UID, COUNT(*) AS NumAnswers FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id AND p.PostTypeId = 2 GROUP BY (TIME_TO_STR(p.CreationDate, '%y') + (T... | sede |
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show ... | SELECT stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY director | nvbench |
CREATE TABLE table_name_59 (
round INTEGER,
player VARCHAR,
pick VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Player of dan federman, and a Pick larger than 114 involves which highest round?
| SELECT MAX(round) FROM table_name_59 WHERE player = "dan federman" AND pick > 114 | sql_create_context |
CREATE TABLE table_65426 (
"Rank" real,
"Heat" real,
"Lane" real,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Heat has a Rank of 8?
| SELECT MAX("Heat") FROM table_65426 WHERE "Rank" = '8' | wikisql |
CREATE TABLE table_70122 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the venue for eng by 6 wkts
| SELECT "Venue" FROM table_70122 WHERE "Result" = 'eng by 6 wkts' | wikisql |
CREATE TABLE table_name_91 (
score VARCHAR,
visitor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score has mtl. maroons as the visitor?
| SELECT score FROM table_name_91 WHERE visitor = "mtl. maroons" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.