context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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... | 0497811这家医院全部就诊记录中大病支付的额度比上总医疗费的值里的最小值按照不一样的科室编码和入院诊断疾病编码算算看 | SELECT qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '0497811' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_CD UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY) FROM gyb JOIN t_kc24 ON gyb... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmenti... | what are the four most frequently prescribed medications for patients who were also prescribed with vancocin at the same time until 2101? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'vancocin' AND STRFTIME('%y', medication.drugstartti... | eicu |
CREATE TABLE table_72463 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What day was the attendance at the staples center 18,176? | SELECT "Date" FROM table_72463 WHERE "Location Attendance" = 'Staples Center 18,176' | wikisql |
CREATE TABLE table_name_58 (
country VARCHAR,
react VARCHAR,
points VARCHAR
) | Which country has a reaction time of under 0.242 seconds and over 1041 points? | SELECT country FROM table_name_58 WHERE react < 0.242 AND points > 1041 | sql_create_context |
CREATE TABLE table_16689920_1 (
distance VARCHAR,
jockey VARCHAR,
date VARCHAR
) | What is the distance for jockey Kent Desormeaux on 6/7/08? | SELECT distance FROM table_16689920_1 WHERE jockey = "Kent Desormeaux" AND date = "6/7/08" | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | accepted answers with \\ bug. | SELECT p.Id AS "post_link", 'site://posts/' + CAST(p.Id AS TEXT) + '/edit|' + 'Edit' AS "edit_link", p.CreationDate FROM Posts AS p JOIN Posts AS q ON q.AcceptedAnswerId = p.Id WHERE (REPLACE(REPLACE(p.Body, '\\', ''), ' ', 'X') LIKE '%\XXXX%') AND (p.OwnerUserId = @UserId OR 0 = @UserID) ORDER BY p.CreationDate | sede |
CREATE TABLE table_name_78 (
total VARCHAR,
set_1 VARCHAR,
score VARCHAR,
date VARCHAR
) | What is the Total with a Score of 3 0, and a Date of 14 oct, and has a Set 1 of 15 12? | SELECT total FROM table_name_78 WHERE score = "3–0" AND date = "14 oct" AND set_1 = "15–12" | sql_create_context |
CREATE TABLE table_34235 (
"Season" text,
"Order" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Penalties" real,
"Points For" real,
"Points Against" real,
"Points Diff" real,
"Coach" text
) | What's the average loss when the points were 545? | SELECT AVG("Lost") FROM table_34235 WHERE "Points For" = '545' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | For those employees who did not have any job in the past, give me the comparison about the average of salary over the hire_date bin hire_date by weekday by a bar chart. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
CREATE TABLE table_25836 (
"Model" text,
"Engine" text,
"Displacement" text,
"Max. power output" text,
"Peak torque" text,
"0\u2013100km/h,s 0-62mph,s" text,
"Top speed" text,
"CO 2 emissions" text,
"Years" text,
"Note" text,
"Engine code" text
) | List the model with that can accelerate from 0-62 MPH in 9.2 seconds. | SELECT "Model" FROM table_25836 WHERE "0\u2013100km/h,s 0-62mph,s" = '9.2' | wikisql |
CREATE TABLE table_name_88 (
college VARCHAR,
player VARCHAR
) | which college has a player called Riley Clayton? | SELECT college FROM table_name_88 WHERE player = "riley clayton" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRG... | 把医疗机构2360255的科室321在二零一一年十一月二十四日到二零一六年四月十九日内处理的住院就诊记录查看一下 | SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '2360255' AND zyjzjlb.JZKSDM = '321' AND zyjzjlb.RYDJSJ BETWEEN '2011-11-24' AND '2016-04-19' | css |
CREATE TABLE table_64389 (
"Rank" real,
"Heat" real,
"Athlete" text,
"Country" text,
"Time" real
) | how many times is the rank more than 29, the athlete is barbara pierre and the heat less than 5? | SELECT COUNT("Time") FROM table_64389 WHERE "Rank" > '29' AND "Athlete" = 'barbara pierre' AND "Heat" < '5' | wikisql |
CREATE TABLE table_204_249 (
id number,
"km" number,
"municipality" text,
"location" text,
"interescting highway" text,
"notes" text
) | what is the total of location ? | SELECT COUNT("location") FROM table_204_249 | squall |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count ... | TOP 100 users of a Tag. | WITH CTE AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.DisplayName, TagName, u.Location, COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON... | sede |
CREATE TABLE table_41239 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Unit" text,
"Location" text
) | What authors have clarno formation as the unit, actinidia oregonensis as the name? | SELECT "Authors" FROM table_41239 WHERE "Unit" = 'clarno formation' AND "Name" = 'actinidia oregonensis' | wikisql |
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
artist_id number,
ticket_price number
)
CREATE TABLE exhibition_record (
exhibition_id number,
date text,
attendance number
)
CREATE TABLE artist (
artist_id number,
name text,
country text,
year_j... | Count the number of artists. | SELECT COUNT(*) FROM artist | spider |
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,
... | 在医疗就诊53925703697中是不是所有费用明细项目都已结算完成? | SELECT (SELECT SUM(t_kc22.STA_FLG) FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '53925703697') = (SELECT COUNT(*) FROM t_kc22 WHERE t_kc21_t_kc22.MED_CLINIC_ID = '53925703697') | css |
CREATE TABLE table_6367 (
"Date" real,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Competition" text
) | Whihc Date is the lowest one that has a Competition of league, and a Venue of away, and an Opponent of swindon wildcats, and an Attendance larger than 1,201? | SELECT MIN("Date") FROM table_6367 WHERE "Competition" = 'league' AND "Venue" = 'away' AND "Opponent" = 'swindon wildcats' AND "Attendance" > '1,201' | wikisql |
CREATE TABLE table_name_58 (
driver VARCHAR,
constructor VARCHAR,
time_retired VARCHAR,
grid VARCHAR,
laps VARCHAR
) | What is the name of the driver with a grid less than 14, laps smaller than 53 and a Time/Retired of collision, and a Constructor of ferrari? | SELECT driver FROM table_name_58 WHERE grid < 14 AND laps < 53 AND time_retired = "collision" AND constructor = "ferrari" | sql_create_context |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
... | during this year, what are the four most frequently performed procedures for patients during the same month after receiving a skin closure nec? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi... | mimic_iii |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find job_id and the sum of employee_id , and group by attribute job_id, and visualize them by a bar chart. | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID | nvbench |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | 哪些是俞以轩患者的检验报告单对应的检验结果指标均正常以及列出检验报告单号是多少? | 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 month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
... | FIRST class price SAN FRANCISCO PITTSBURGH round trip | 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, fare, fare_basis, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_c... | atis |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_... | For those employees who did not have any job in the past, find job_id and the average of salary , and group by attribute job_id, and visualize them by a bar chart, could you list by the bar from low to high? | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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,
... | what is drug type of subject name paul edwards? | SELECT prescriptions.drug_type FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Paul Edwards" | mimicsql_data |
CREATE TABLE table_16564 (
"Character" text,
"Portrayed by" text,
"Relationship" text,
"First appearance" text,
"Last appearance" text
) | Which characters had their first experience in the episode 'consequences'? | SELECT "Character" FROM table_16564 WHERE "First appearance" = 'Consequences' | wikisql |
CREATE TABLE table_name_3 (
gold_medals VARCHAR,
ensemble VARCHAR,
bronze_medals VARCHAR
) | When the Mandarins won more than 1 bronze medals, how many gold medals did they win? | SELECT COUNT(gold_medals) FROM table_name_3 WHERE ensemble = "mandarins" AND bronze_medals > 1 | sql_create_context |
CREATE TABLE table_name_38 (
tournament VARCHAR,
runner_s__up VARCHAR
) | What tournament was Kirk Triplett a runner-up in? | SELECT tournament FROM table_name_38 WHERE runner_s__up = "kirk triplett" | sql_create_context |
CREATE TABLE people (
People_ID int,
Name text,
Age real,
Height real,
Hometown text
)
CREATE TABLE gymnast (
Gymnast_ID int,
Floor_Exercise_Points real,
Pommel_Horse_Points real,
Rings_Points real,
Vault_Points real,
Parallel_Bars_Points real,
Horizontal_Bar_Points real... | What are the hometowns of gymnasts and the corresponding number of gymnasts. | SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | what was the name of the drug patient 004-29334 was allergic to in 12/2105? | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-29334')) AND STRFTIME('%y-%m', allergy.allergytime) = '2105-12' | eicu |
CREATE TABLE table_name_97 (
gold VARCHAR,
bronze VARCHAR,
sport VARCHAR
) | What is the winner of gold that also has 1 in the sport of cycling? | SELECT gold FROM table_name_97 WHERE bronze = "↓ 1" AND sport = "cycling" | sql_create_context |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE ... | What courses could I take to prepare for RESTORA 881 ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'RESTORA' AND number = 881 | advising |
CREATE TABLE table_29797 (
"No(s). in series" real,
"No(s). in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code(s)" real,
"U.S. viewers (millions)" text
) | What is the original air date of the episode titled 'The one where Chandler doesn't like dogs'? | SELECT "Original air date" FROM table_29797 WHERE "Title" = 'The One Where Chandler Doesn''t Like Dogs' | wikisql |
CREATE TABLE table_name_12 (
engine VARCHAR,
driver VARCHAR
) | What engine did Riccardo Patrese use? | SELECT engine FROM table_name_12 WHERE driver = "riccardo patrese" | sql_create_context |
CREATE TABLE table_22689 (
"Rank" real,
"Peak" text,
"Country" text,
"Island" text,
"Elevation (m)" real,
"Prominence (m)" real,
"Col (m)" real
) | What is the col (m) of the Barurumea Ridge peak? | SELECT MAX("Col (m)") FROM table_22689 WHERE "Peak" = 'Barurumea Ridge' | wikisql |
CREATE TABLE table_name_47 (
born___died VARCHAR,
connection_with_australia VARCHAR
) | The person that was born in Sydney died in what year? | SELECT born___died FROM table_name_47 WHERE connection_with_australia = "born in sydney" | sql_create_context |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test... | What can I expect as prereqs for the course where Tim Howell is the GSI ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.pre_course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.course_id INNER JOIN course_offering ON COURSE_1.course_id = cour... | advising |
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 Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname... | A bar chart showing the first name of all the faculty members who participated in some activity, together with the number of activities they participated in, and show by the x-axis in desc. | SELECT Fname, COUNT(*) FROM Faculty AS T1 JOIN Faculty_Participates_in AS T2 ON T1.FacID = T2.FacID GROUP BY T1.FacID ORDER BY Fname DESC | nvbench |
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,
... | 请排列出孔曼青患者在2001年8月29日到2015年3月17日内被开出的所有药品的编码、名称、数量、单价、金额分别是多少? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '孔曼青' AND gwyjzb.IN_HOSP_DATE BETWEEN '2001-08-29' AND '2015-03-17' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_... | css |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | how many patients whose age is less than 64 and drug route is tp? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "64" AND prescriptions.route = "TP" | mimicsql_data |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
... | Show the name of each party and the corresponding number of delegates from that party. Plot them as pie chart. | SELECT T2.Party, SUM(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party | nvbench |
CREATE TABLE table_5697 (
"Model" text,
"Engine" text,
"Displacement" text,
"Power" text,
"Torque" text
) | Which engine had a 48kw (65 ps) @ 5600 rpm power? | SELECT "Engine" FROM table_5697 WHERE "Power" = '48kw (65 ps) @ 5600 rpm' | wikisql |
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),
... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of salary over the hire_date bin hire_date by weekday, list by the mean salary in desc. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE chart... | list the top five most frequent diagnoses that the patients were diagnosed with within 2 months after being diagnosed with alcohol cirrhosis liver until 2104. | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions... | mimic_iii |
CREATE TABLE chip_model (
model_name text,
launch_year number,
ram_mib number,
rom_mib number,
slots text,
wifi text,
bluetooth text
)
CREATE TABLE screen_mode (
graphics_mode number,
char_cells text,
pixels text,
hardware_colours number,
used_kb number,
map text,
... | What is the average ROM size of phones produced by the company named 'Nokia Corporation'? | SELECT AVG(T1.rom_mib) FROM chip_model AS T1 JOIN phone AS T2 ON T1.model_name = T2.chip_model WHERE T2.company_name = "Nokia Corporation" | spider |
CREATE TABLE table_69973 (
"Name [b ]" text,
"Term [c ]" text,
"Games" real,
"Win%" real,
"PWin%" text
) | What is the win% for the game 80 and a PWin% of , and a Term [c ] of 1987 1988? | SELECT "Win%" FROM table_69973 WHERE "Games" = '80' AND "PWin%" = '—' AND "Term [c ]" = '1987–1988' | wikisql |
CREATE TABLE table_42751 (
"Inf. Stem" text,
"Sing. Pres." text,
"Plur. Pres." text,
"Sing. Pret." text,
"Plur. Pret." text,
"Subj. Pres." text,
"Subj. Pret." text,
"Past Part." text
) | What is the singular present that is associated with a singular preterite of ou and a subjunctive present of ie? | SELECT "Sing. Pres." FROM table_42751 WHERE "Sing. Pret." = 'ou' AND "Subj. Pres." = 'ie' | wikisql |
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... | 编码为65326355810的住院就诊的患者卡号和卡类型都是啥啊? | SELECT zyjzjlb.KH, zyjzjlb.KLX FROM zyjzjlb WHERE zyjzjlb.JZLSH = '65326355810' | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | how many patients whose admission year is less than 2187 and drug name is neo*iv*gentamicin? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2187" AND prescriptions.drug = "NEO*IV*Gentamicin" | mimicsql_data |
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... | 在15年2月3日到2020年3月14日这五年内,医疗机构1852087统共是处理了几次异地就诊? | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '1852087' AND IN_HOSP_DATE BETWEEN '2015-02-03' AND '2020-03-14' AND (REMOTE_SETTLE_FLG = '异地1' OR REMOTE_SETTLE_FLG = '异地2') | css |
CREATE TABLE table_24192 (
"Season" real,
"Season premiere" text,
"Season finale" text,
"TV Season" text,
"Rank" text,
"Viewers (in millions)" text
) | Name the number of rank for season 6 | SELECT COUNT("Rank") FROM table_24192 WHERE "Season" = '6' | wikisql |
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... | Give me the comparison about All_Games_Percent over the ACC_Regular_Season by a bar chart, and could you order in desc by the names please? | SELECT ACC_Regular_Season, All_Games_Percent FROM basketball_match ORDER BY ACC_Regular_Season DESC | nvbench |
CREATE TABLE table_24004 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Cardinals points" real,
"Opponents" real,
"Record" text
) | What game date had the record of 1-2? | SELECT "Date" FROM table_24004 WHERE "Record" = '1-2' | wikisql |
CREATE TABLE table_15211 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | Decision of parent, and a Home of philadelphia, and a Record of 20 16 7 is on what date? | SELECT "Date" FROM table_15211 WHERE "Decision" = 'parent' AND "Home" = 'philadelphia' AND "Record" = '20–16–7' | wikisql |
CREATE TABLE table_name_80 (
college VARCHAR,
pick__number VARCHAR
) | What college is draft pick #327 from? | SELECT college FROM table_name_80 WHERE pick__number = "327" | sql_create_context |
CREATE TABLE table_name_88 (
class VARCHAR,
number_at_lincoln VARCHAR,
number_at_doncaster VARCHAR
) | Which Class has a Number at Lincoln larger than 0 and a Number at Doncaster of 8? | SELECT class FROM table_name_88 WHERE number_at_lincoln > 0 AND number_at_doncaster = 8 | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type t... | what is the drug that patient 69761 was prescribed for during the same hospital visit after having received nephrotomy in 04/this year? | SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 69761 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_proce... | mimic_iii |
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE technician (
technician_id real,
Nam... | What are the number of the names of the technicians that are assigned to repair machines with more point values than 70? | SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id WHERE T2.value_points > 70 GROUP BY Name | 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... | calculate the maximum age of male patients who died before 2168. | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.dod_year < "2168.0" | mimicsql_data |
CREATE TABLE table_24475186_2 (
pa VARCHAR,
blank_ends VARCHAR,
l VARCHAR
) | How many pa were blank ends 7 and 5? | SELECT COUNT(pa) FROM table_24475186_2 WHERE blank_ends = 7 AND l = 5 | sql_create_context |
CREATE TABLE table_42623 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | What is the Points with an Against smaller than 16? | SELECT AVG("Points") FROM table_42623 WHERE "Against" < '16' | wikisql |
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... | 03年6月6日到08年9月28日这一段时间有几个医生就诊过患者彭俊捷? | SELECT COUNT(mzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX ... | css |
CREATE TABLE table_74373 (
"Rank" real,
"Rider" text,
"Mon 30 May" text,
"Tues 31 May" text,
"Wed 1 June" text,
"Thurs 2 June" text,
"Fri 3 June" text
) | What is the rank of the rider whose Tues 31 May time was 19' 02.34 118.903mph? | SELECT "Rank" FROM table_74373 WHERE "Tues 31 May" = '19'' 02.34 118.903mph' | wikisql |
CREATE TABLE happy_hour (
HH_ID int,
Shop_ID int,
Month text,
Num_of_shaff_in_charge int
)
CREATE TABLE member (
Member_ID int,
Name text,
Membership_card text,
Age int,
Time_of_purchase int,
Level_of_membership int,
Address text
)
CREATE TABLE shop (
Shop_ID int,
A... | Find the address and staff number of the shops that do not have any happy hour. Plot them as pie chart. | SELECT Address, Num_of_staff FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM happy_hour) | nvbench |
CREATE TABLE table_203_156 (
id number,
"team" text,
"outgoing manager" text,
"manner of departure" text,
"date of vacancy" text,
"replaced by" text,
"date of appointment" text,
"position in table" text
) | which manager has the earliest date of appointment ? | SELECT "outgoing manager" FROM table_203_156 ORDER BY "date of appointment" LIMIT 1 | squall |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | what is the name of the drug prescribed to patient 033-4763 within the same day after receiving a intracranial/cerebral perfusion pressure monitoring - fiberoptic monitor in 11/2104? | SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-4763') AND treatment.treatmen... | eicu |
CREATE TABLE STUDENT (
Major VARCHAR,
major VARCHAR
) | Which major has the most students? | SELECT major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | what are the three most frequent procedures performed during the previous year? | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE player (
player_id number,
player text,
years_played text,
total_wl text,
singles_wl text,
doubles_wl text,
team number
)
CREATE TABLE match_season (
season number,
player text,
position text,
country number,
team number,
draft_pick_number number,
dr... | What are the players who played for Columbus Crew, and how many years did each play for? | SELECT T1.player, T1.years_played FROM player AS T1 JOIN team AS T2 ON T1.team = T2.team_id WHERE T2.name = "Columbus Crew" | spider |
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... | 在哪几次医疗记录中患者00352468所开的药品价格均低于6550.61元?这些就诊时的编号是多少? | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '00352468' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 6550.61) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '00352468' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_... | css |
CREATE TABLE table_15823956_1 (
region_1 VARCHAR,
series VARCHAR
) | What is the region 1 date for series 4 | SELECT region_1 FROM table_15823956_1 WHERE series = "4" | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | how many patients took a pressure support lab test until 4 years ago? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'pressure support' AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-4 year')) | eicu |
CREATE TABLE table_19047_2 (
championship VARCHAR,
score_in_the_final VARCHAR
) | What tournament did she win with a final score of 4 6, 7 5, 6 2? | SELECT championship FROM table_19047_2 WHERE score_in_the_final = "4–6, 7–5, 6–2" | sql_create_context |
CREATE TABLE table_78063 (
"Track" real,
"Recorded" text,
"Catalogue" text,
"Release Date" text,
"Song Title" text,
"Time" text
) | Tell me the release date record on 10/29/76 and a time on 2:50 | SELECT "Release Date" FROM table_78063 WHERE "Time" = '2:50' AND "Recorded" = '10/29/76' | wikisql |
CREATE TABLE table_68934 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text,
"Location" text
) | Name the opponent with decision | SELECT "Opponent" FROM table_68934 WHERE "Method" = 'decision' | wikisql |
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,
... | 在05年3月16日到2014年5月31日间病患18467147主要看了什么疾病? | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '18467147' AND t_kc21.IN_HOSP_DATE BETWEEN '2005-03-16' AND '2014-05-31' GROUP BY t_kc21.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1 | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | give me the number of patients whose admission location is transfer from hosp/extram and primary disease is abdominal pain? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "ABDOMINAL PAIN" | mimicsql_data |
CREATE TABLE table_name_74 (
location VARCHAR,
tournament VARCHAR
) | Where was the security pacific senior classic? | SELECT location FROM table_name_74 WHERE tournament = "security pacific senior classic" | sql_create_context |
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 allergy (
allergy... | give me the length of stay of patient 006-161415's first hospital stay? | SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '006-161415' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE table_24583 (
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | what is the total number o production code where us viewers is 2.76? | SELECT COUNT("Production code") FROM table_24583 WHERE "U.S. viewers (million)" = '2.76' | wikisql |
CREATE TABLE table_name_93 (
date VARCHAR,
record VARCHAR,
home VARCHAR,
decision VARCHAR
) | What was the date of the 24 27 6 Lightning home game against Tampa Bay that had a decision of Ramo? | SELECT date FROM table_name_93 WHERE home = "tampa bay" AND decision = "ramo" AND record = "24–27–6" | sql_create_context |
CREATE TABLE table_203_631 (
id number,
"year" number,
"name of show" text,
"episodes" text,
"other guests" text,
"winner(s)" text
) | what is the number of other guests in the 2002 show a trio delights ? | SELECT "other guests" FROM table_203_631 WHERE "year" = 2002 AND "name of show" = 'a trio delights' | squall |
CREATE TABLE table_name_89 (
lead VARCHAR,
nation VARCHAR
) | Who has the lead in Norway? | SELECT lead FROM table_name_89 WHERE nation = "norway" | sql_create_context |
CREATE TABLE channel (
Share_in_percent INTEGER,
OWNER VARCHAR
) | find the total percentage share of all channels owned by CCTV. | SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | sql_create_context |
CREATE TABLE table_name_61 (
finish INTEGER,
start VARCHAR
) | For any races with a start of 14 what was the lowest finish? | SELECT MIN(finish) FROM table_name_61 WHERE start = 14 | sql_create_context |
CREATE TABLE table_name_98 (
points INTEGER,
games VARCHAR,
name VARCHAR
) | What is the lowest value for Points, when Games is greater than 34, and when Name is Andrew Panko? | SELECT MIN(points) FROM table_name_98 WHERE games > 34 AND name = "andrew panko" | sql_create_context |
CREATE TABLE ref_service_types (
service_type_code text,
parent_service_type_code text,
service_type_description text
)
CREATE TABLE products (
product_id text,
product_name text,
product_price number,
product_description text,
other_product_service_details text
)
CREATE TABLE marketin... | Show the minimum, average, maximum order quantity of all invoices. | SELECT MIN(order_quantity), AVG(order_quantity), MAX(order_quantity) FROM invoices | spider |
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... | 从08年9月20日开始15年10月18日结束参保人26631603的门诊手术费是多少钱? | SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '26631603' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2008-09-20' AND '2015-10-18' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' | css |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
... | is the heart rate of patient 14671 second measured on the current intensive care unit visit less than first measured on the current intensive care unit visit. | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_i... | mimic_iii |
CREATE TABLE table_22656 (
"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
) | What is the lowest SOL? | SELECT MIN("SOL") FROM table_22656 | wikisql |
CREATE TABLE table_47280 (
"Date" text,
"Round" text,
"Opponents" text,
"H / A" text,
"Result F \u2013 A" text,
"Scorers" text,
"Attendance" real
) | What is the H/A in the semi-final round where oldham athletic were the opponents? | SELECT "H / A" FROM table_47280 WHERE "Opponents" = 'oldham athletic' AND "Round" = 'semi-final' | wikisql |
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... | 有多少份检验报告单是在门诊就诊的00107790166开出的? | SELECT COUNT(*) FROM zyjybgb WHERE zyjybgb.JZLSH = '00107790166' UNION SELECT COUNT(*) FROM mzjybgb WHERE mzjybgb.JZLSH = '00107790166' | css |
CREATE TABLE table_53570 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text
) | What's the college of the player with a height of 6-4 and went to lake howell high school? | SELECT "College" FROM table_53570 WHERE "Height" = '6-4' AND "School" = 'lake howell high school' | wikisql |
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... | 从2000年9月28日到2007年1月25日这段时间内患者奚霞辉所有检验结果指标记录中的仪器编号以及名称都是啥? | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHE... | css |
CREATE TABLE table_6612 (
"Title" text,
"Year" real,
"Platform(s)" text,
"Director" text,
"Producer" text
) | What platform was used for the game directed by Bryan Walker after 2006? | SELECT "Platform(s)" FROM table_6612 WHERE "Year" > '2006' AND "Director" = 'bryan walker' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId ... | Questions that survived the great [identification-request] cleanup of 2016. See https://anime.meta.stackexchange.com/q/3994/ | SELECT PostId AS "post_link" FROM PostHistory WHERE PostHistoryTypeId = 14 AND CreationDate BETWEEN '2016-06-09' AND '2016-06-10' | sede |
CREATE TABLE table_24915874_1 (
horse VARCHAR,
jockey VARCHAR
) | Who was the horse when the jockey was Peter Wells? | SELECT horse FROM table_24915874_1 WHERE jockey = "Peter Wells" | sql_create_context |
CREATE TABLE table_name_30 (
television_service VARCHAR,
package_option VARCHAR,
language VARCHAR
) | What is the television service that has package with sky tv, and it in Italian English? | SELECT television_service FROM table_name_30 WHERE package_option = "sky tv" AND language = "italian english" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
... | give me the number of patients whose insurance is government and procedure short title is incision of aorta? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Incision of aorta" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.