context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the founder , and group by attribute founder by a bar chart, and show Y in descending order. | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T1.Code DESC | nvbench |
CREATE TABLE table_36164 (
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"1996[2]" real
) | 1950 larger than 80, and a 1960 of 196, and a 1990 larger than 131 what is the lowest 1996[2]? | SELECT MIN("1996[2]") FROM table_36164 WHERE "1950" > '80' AND "1960" = '196' AND "1990" > '131' | wikisql |
CREATE TABLE table_name_71 (
pole_position VARCHAR,
circuit VARCHAR,
winning_team VARCHAR
) | What is Pole Position, when Circuit is Adelaide Street Circuit, and when Winning Team is Piccola Scuderia Corse? | SELECT pole_position FROM table_name_71 WHERE circuit = "adelaide street circuit" AND winning_team = "piccola scuderia corse" | sql_create_context |
CREATE TABLE table_name_25 (
losing_team VARCHAR,
date VARCHAR
) | Who was the losing team on June 16? | SELECT losing_team FROM table_name_25 WHERE date = "june 16" | sql_create_context |
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... | 在医疗就诊10526392718中,56223040这名患者最高的自费项目是哪个 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM 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 = '10526392718' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.SELF_PAY_AMO) DES... | css |
CREATE TABLE table_8267 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | What was the tie number when the away team was Wrexham? | SELECT "Tie no" FROM table_8267 WHERE "Away team" = 'wrexham' | wikisql |
CREATE TABLE table_24538587_11 (
i_o_bus VARCHAR,
brand_name__list_ VARCHAR,
socket VARCHAR,
codename__main_article_ VARCHAR
) | What i/o buses are associated with the LGA 1155 socket, a code name of Sandy Bridge (desktop) and a brand name of Core i3-21xx? | SELECT i_o_bus FROM table_24538587_11 WHERE socket = "LGA 1155" AND codename__main_article_ = "Sandy Bridge (Desktop)" AND brand_name__list_ = "Core i3-21xx" | sql_create_context |
CREATE TABLE table_2886617_3 (
nationality VARCHAR,
position VARCHAR,
college_junior_club_team VARCHAR
) | Which nationality has left wing as the position and college/junior/team is portland winterhawks (whl)? | SELECT nationality FROM table_2886617_3 WHERE position = "Left Wing" AND college_junior_club_team = "Portland Winterhawks (WHL)" | sql_create_context |
CREATE TABLE table_36918 (
"Nation" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
) | Which Lead has a Second of katrin kuusk? | SELECT "Lead" FROM table_36918 WHERE "Second" = 'katrin kuusk' | wikisql |
CREATE TABLE table_name_70 (
winning_driver VARCHAR,
name VARCHAR
) | Tell me the winning driver for avusrennen | SELECT winning_driver FROM table_name_70 WHERE name = "avusrennen" | sql_create_context |
CREATE TABLE table_name_90 (
opponent_in_the_final VARCHAR,
tournament VARCHAR
) | Who is the opponent in the Tournament of Lahore final? | SELECT opponent_in_the_final FROM table_name_90 WHERE tournament = "lahore" | sql_create_context |
CREATE TABLE mzjybgb (
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,
... | 从06年7月29日至14年1月26日之间患者陈怡宁所有检验结果指标记录中的仪器名称都叫什么?编号都是什么? | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AN... | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | tell me the name and days for which patient with patient id 2560 was admitted in hospital. | SELECT demographic.name, demographic.days_stay FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 从2004年05月16日直到2020年12月13日期间转诊门诊的就诊记录数量在这个医疗机构8183928里一共有多少? | SELECT COUNT(*) FROM mzjzjlb WHERE YLJGDM = '8183928' AND JZKSRQ BETWEEN '2004-05-16' AND '2020-12-13' AND ZZBZ > 0 | css |
CREATE TABLE table_name_47 (
date VARCHAR,
attendance VARCHAR
) | Which date did 64,443 people attend a game? | SELECT date FROM table_name_47 WHERE attendance = "64,443" | 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,... | 那些年纪大于21岁的病患的医疗记录中其医务费总金额平均一下是多些? | SELECT AVG(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_AGE > 21) | css |
CREATE TABLE table_25604014_9 (
no_in_season INTEGER,
directed_by VARCHAR
) | Name the most number in season for leslie hill | SELECT MAX(no_in_season) FROM table_25604014_9 WHERE directed_by = "Leslie Hill" | sql_create_context |
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... | what is the four drug most frequently prescribed to the patients aged 40s within 2 months after they have been diagnosed with sepsis - severe since 5 years ago? | SELECT t3.drugname FROM (SELECT t2.drugname, 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 = 'sepsis - severe' AND DATETIME(diagnosis.diagnosist... | eicu |
CREATE TABLE table_name_7 (
nationality VARCHAR,
position VARCHAR,
college_high_school_club VARCHAR
) | What is the nationality of the person drafted to Position F from Kentucky State? | SELECT nationality FROM table_name_7 WHERE position = "f" AND college_high_school_club = "kentucky state" | 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 ... | 13948798患者头部的各项指标检验结果是什么? | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.... | css |
CREATE TABLE table_24408 (
"Name" text,
"Career" text,
"Matches" real,
"Innings" real,
"Not Out" real,
"Runs scored" real,
"High Score" text,
"50s" real,
"100s" real,
"Average" text
) | Name the most runs scored | SELECT MAX("Runs scored") FROM table_24408 | wikisql |
CREATE TABLE table_2454550_1 (
race_name VARCHAR,
fastest_lap VARCHAR
) | In what race did Buddy Rice hav fastest lap? | SELECT race_name FROM table_2454550_1 WHERE fastest_lap = "Buddy Rice" | 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... | 统计一下医疗记录中入院诊断为Q34.984在医院9479649里的最低和最高医疗费总额是多少? | SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.MED_SER_ORG_NO = '9479649' AND qtb.IN_DIAG_DIS_CD = 'Q34.984' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.MED_SER_ORG_NO = '9479649' AND gyb.IN_DIAG_DIS_CD = 'Q34.984' UNION S... | css |
CREATE TABLE table_52919 (
"Date" text,
"Competition" text,
"Venue" text,
"Result" text,
"Score" text,
"Goals" text
) | What competition was played at Shay Stadium? | SELECT "Competition" FROM table_52919 WHERE "Venue" = 'shay stadium' | wikisql |
CREATE TABLE weather (
date text,
max_temperature_f number,
mean_temperature_f number,
min_temperature_f number,
max_dew_point_f number,
mean_dew_point_f number,
min_dew_point_f number,
max_humidity number,
mean_humidity number,
min_humidity number,
max_sea_level_pressure_inc... | What are the ids of the stations in San Francisco that normally have more than 10 bikes available? | SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10 | spider |
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... | find the average age of black haitian patients who are single. | SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "BLACK/HAITIAN" | mimicsql_data |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number... | The fastest shots on the west. | SELECT Q.Id AS "post_link", Q.CreationDate AS Asked, A.LastEditDate AS Answered, CAST((JULIANDAY(A.LastEditDate) - JULIANDAY(Q.CreationDate)) AS INT) AS Seconds FROM Posts AS Q, Posts AS A WHERE A.ParentId = Q.Id AND A.OwnerUserId != Q.OwnerUserId AND A.OwnerUserId >= 1 AND Q.OwnerUserId >= 1 AND A.LastEditDate >= Q.Cr... | sede |
CREATE TABLE table_43996 (
"Rank" text,
"Time" text,
"Athlete" text,
"Nation" text,
"Date" text,
"Race" text
) | What is the time of the peachtree road race in kenya? | SELECT "Time" FROM table_43996 WHERE "Nation" = 'kenya' AND "Race" = 'peachtree road race' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is the number of patients whose diagnoses long title is twin birth, mate liveborn, born in hospital, delivered by cesarean section and drug type is base? | 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 = "Twin birth, mate liveborn, born in hospital, delivered by cesarean section" AND prescriptio... | mimicsql_data |
CREATE TABLE table_37912 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | Loss of de la rosa (8 8) has what average attendance? | SELECT AVG("Attendance") FROM table_37912 WHERE "Loss" = 'de la rosa (8–8)' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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,
... | .9% normal saline had been given to patient 8098 ever until 03/20/2104? | SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8098)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '.9% norma... | mimic_iii |
CREATE TABLE table_41166 (
"Episode Number" real,
"Air Date" text,
"Guest Host" text,
"Musical Guest (Song performed)" text,
"Who knows the most about the guest host? panelists" text
) | Who were the panelists on episode number 4? | SELECT "Who knows the most about the guest host? panelists" FROM table_41166 WHERE "Episode Number" = '4' | 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_DIRE_CD text,
MED_DIRE_NM text,... | 在医疗就诊95767550137中,负责费用明细项目23684776575的医疗机构科室编码及名称分别是什么? | SELECT t_kc22.MED_ORG_DEPT_CD, t_kc22.MED_ORG_DEPT_NM FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '23684776575' | css |
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 patient (
uniquep... | how many hours has elapsed since the last time patient 006-133605 had a per iv flush: forearm l intake on the current icu visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | What has Dr. Brian Zikmund-fisher taught ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... | advising |
CREATE TABLE table_31935 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text
) | Which Event resulted in a Win for Opponent, Shane Ott? | SELECT "Event" FROM table_31935 WHERE "Res." = 'win' AND "Opponent" = 'shane ott' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semest... | Which one of the easiest ULCS courses has the biggest class size ? | SELECT DISTINCT department, name, number FROM course WHERE course_id IN (SELECT PROGRAM_COURSE_ID FROM program_course AS PROGRAM_COURSE WHERE PROGRAM_WORKLOAD = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%ULCS%')) AND num_enrolled = (... | advising |
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
) | For each director, return the director's name together with the value of that rating and ignore movies whose director is NULL. Could you plot the result with a bar chart? | SELECT director, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" | nvbench |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_dista... | show me the airlines that fly from TORONTO to SAN FRANCISCO | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_n... | atis |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | 在这个编号为09463847362住院就诊中,住院中医诊断的名称是什么?对应的编号是什么 | SELECT wdmzjzjlb.ZYZYZDZZBM, wdmzjzjlb.ZYZYZDZZMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '09463847362' UNION SELECT bdmzjzjlb.ZYZYZDZZBM, bdmzjzjlb.ZYZYZDZZMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '09463847362' | css |
CREATE TABLE table_name_15 (
silver INTEGER,
nation VARCHAR
) | How many silver medals does Cuba have? | SELECT SUM(silver) FROM table_name_15 WHERE nation = "cuba" | sql_create_context |
CREATE TABLE table_55347 (
"Candidate" text,
"Money Raised, 2Q" text,
"Loans Received, 2Q" text,
"Money Spent, 2Q" text,
"Total Receipts" text,
"Cash On Hand" text
) | What were the total receipts when the money raised in 2Q was $33,120,440? | SELECT "Total Receipts" FROM table_55347 WHERE "Money Raised, 2Q" = '$33,120,440' | wikisql |
CREATE TABLE table_name_10 (
place VARCHAR,
player VARCHAR
) | Where was Steve Stricker from? | SELECT place FROM table_name_10 WHERE player = "steve stricker" | sql_create_context |
CREATE TABLE table_37943 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | Which Score has a Record of 36 61? | SELECT "Score" FROM table_37943 WHERE "Record" = '36–61' | wikisql |
CREATE TABLE table_44666 (
"Rider" text,
"Manufacturer" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
) | Who is the rider whose time/retired is accident? | SELECT "Rider" FROM table_44666 WHERE "Time/Retired" = 'accident' | wikisql |
CREATE TABLE table_60076 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | What is the team 1 with cementarnica as team 2? | SELECT "Team 1" FROM table_60076 WHERE "Team 2" = 'cementarnica' | wikisql |
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... | Number of 10+ score posts per month. Android questions per day in 2011 | SELECT YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 AS "QDate", COUNT(CreationDate) AS Count FROM Posts AS q WHERE Score >= 10 AND q.CreationDate > 2014 GROUP BY YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 ORDER BY YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 | sede |
CREATE TABLE table_name_21 (
player VARCHAR,
school VARCHAR,
division VARCHAR,
team VARCHAR
) | What Player is from the west Division and the Team of special teams and is from the School Toledo Western Michigan? | SELECT player FROM table_name_21 WHERE division = "west" AND team = "special teams" AND school = "toledo western michigan" | sql_create_context |
CREATE TABLE table_name_40 (
silver VARCHAR,
total INTEGER
) | What is the total number of silver medals of the nation with more than 16 total medals? | SELECT COUNT(silver) FROM table_name_40 WHERE total > 16 | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TAB... | count the number of patients who have been discharged from a hospital in 2101. | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) = '2101' | eicu |
CREATE TABLE table_26288 (
"Episode #" real,
"Prod #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Originalairdate" text,
"Filmed" text
) | What month and year was 'storm warning (part one)' filmed? | SELECT "Filmed" FROM table_26288 WHERE "Title" = 'Storm Warning (part one)' | wikisql |
CREATE TABLE table_name_26 (
laps INTEGER,
manufacturer VARCHAR,
grid VARCHAR
) | What's the smallest amount of laps that suzuki ran with a grid value of 8? | SELECT MIN(laps) FROM table_name_26 WHERE manufacturer = "suzuki" AND grid = 8 | sql_create_context |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostNoticeTypes (
Id... | All My Answers Sorted by Votes. | SELECT COUNT(*) AS UpVotes, p2.Title FROM Posts AS p INNER JOIN Votes AS v ON v.PostId = p.Id INNER JOIN Posts AS p2 ON p2.Id = p.ParentId AND p2.PostTypeId = 1 WHERE p.OwnerUserId = @UserId AND p.PostTypeId = 2 AND v.VoteTypeId = 2 GROUP BY p2.Title ORDER BY UpVotes DESC | sede |
CREATE TABLE table_name_15 (
round INTEGER,
college_junior_club_team__league_ VARCHAR
) | What is the highest round that has a player selected from Clarkson University? | SELECT MAX(round) FROM table_name_15 WHERE college_junior_club_team__league_ = "clarkson university" | sql_create_context |
CREATE TABLE table_46555 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | what is the highest gold when the nation is total and the total is less than 24? | SELECT MAX("Gold") FROM table_46555 WHERE "Nation" = 'total' AND "Total" < '24' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | what are the four most frequent procedures that followed in the same hospital visit for the patients who were diagnosed with bone fracture(s) - right lower extremity in this year? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, 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 = 'bone ... | eicu |
CREATE TABLE table_77954 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What home team has an Away team of richmond? | SELECT "Home team" FROM table_77954 WHERE "Away team" = 'richmond' | wikisql |
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 (
... | count the number of patients whose insurance is self pay and diagnoses long title is other hamartoses, not elsewhere classified? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Self Pay" AND diagnoses.long_title = "Other hamartoses, not elsewhere classified" | mimicsql_data |
CREATE TABLE table_36733 (
"Year" text,
"Champion" text,
"Runner-up" text,
"Score" text,
"Surface" text
) | What is the score of the match with anders j rryd as the runner-up? | SELECT "Score" FROM table_36733 WHERE "Runner-up" = 'anders järryd' | wikisql |
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
) | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of manufacturer , and group by attribute headquarter. | SELECT Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | how many black/cape verdean newborn patients were in the hospital? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.ethnicity = "BLACK/CAPE VERDEAN" | mimicsql_data |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of last_name and commission_pct , show x axis in desc order. | SELECT LAST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC | nvbench |
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
) | For those products with a price between 60 and 120, return a scatter chart about the correlation between code and manufacturer . | SELECT Code, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | nvbench |
CREATE TABLE table_name_47 (
place VARCHAR,
player VARCHAR
) | Name the place for ed oliver | SELECT place FROM table_name_47 WHERE player = "ed oliver" | sql_create_context |
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
) | Just show the id and name of each editor using a bar chart. | SELECT T1.Name, T1.Editor_ID FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID | nvbench |
CREATE TABLE table_train_261 (
"id" int,
"allergy_to_biological_products" bool,
"renal_disease" bool,
"bursing_mothers" bool,
"metabolic_bone_disease" bool,
"liver_disease" bool,
"allergy_to_drug" bool,
"alcohol_abuse" bool,
"drug_abuse" bool,
"NOUSE" float
) | nursing mothers | SELECT * FROM table_train_261 WHERE bursing_mothers = 1 | criteria2sql |
CREATE TABLE table_51850 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | I want the venue for 23 july 1992 | SELECT "Venue" FROM table_51850 WHERE "Date" = '23 july 1992' | wikisql |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
... | Is 182 not a requirement for any of the upper level classes ? | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%topic0%' OR name LIKE '%topic0%') AND department = 'EECS' | advising |
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 the number of patients that survived and had a procedure icd9 code of 3995. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "3995" | mimicsql_data |
CREATE TABLE table_name_84 (
run_2 VARCHAR,
run_1 VARCHAR
) | What is Run 2, when Run 1 is 2:09.09? | SELECT run_2 FROM table_name_84 WHERE run_1 = "2:09.09" | sql_create_context |
CREATE TABLE table_2160215_1 (
original_japanese VARCHAR,
english___manga_uk__ VARCHAR
) | Who was the original Japanese cast if Sean Barrett acted on the English (Manga UK) version? | SELECT original_japanese FROM table_2160215_1 WHERE english___manga_uk__ = "Sean Barrett" | sql_create_context |
CREATE TABLE table_name_13 (
result VARCHAR,
rank VARCHAR
) | what is the result when the rank is 12? | SELECT result FROM table_name_13 WHERE rank = 12 | sql_create_context |
CREATE TABLE table_1242447_2 (
hebrew_word VARCHAR,
strongs__number VARCHAR
) | What is the hebrew word listed for strongs # 5418? | SELECT hebrew_word FROM table_1242447_2 WHERE strongs__number = "5418" | sql_create_context |
CREATE TABLE table_5065 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Which Game has a Score of w 90 82 (ot)? | SELECT "Game" FROM table_5065 WHERE "Score" = 'w 90–82 (ot)' | wikisql |
CREATE TABLE table_32067 (
"Place" real,
"Team" text,
"Wins" real,
"Ties" real,
"Losses" real,
"Points" text
) | Name the average place for ties less than 1 and losess more than 3 with points of 6 qc | SELECT AVG("Place") FROM table_32067 WHERE "Ties" < '1' AND "Points" = '6 qc' AND "Losses" > '3' | wikisql |
CREATE TABLE table_34596 (
"Number" real,
"Name" text,
"Position" text,
"Height" text,
"Weight" real,
"Class" text,
"Hometown" text
) | Number of 13 that has what highest weight? | SELECT MAX("Weight") FROM table_34596 WHERE "Number" = '13' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 患者曹静婉过去的住院诊断怎么样? | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '曹静婉' | css |
CREATE TABLE table_70296 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | Name the score with record of 68-66 | SELECT "Score" FROM table_70296 WHERE "Record" = '68-66' | wikisql |
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,... | show me the least expensive flight leaving MIAMI on sunday after 1200 and arriving CLEVELAND | SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, date_day AS DATE... | atis |
CREATE TABLE table_33605 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the score for the Essendon home team? | SELECT "Home team score" FROM table_33605 WHERE "Home team" = 'essendon' | wikisql |
CREATE TABLE table_18381 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What was the result when Ray Roberts was elected? | SELECT "Result" FROM table_18381 WHERE "Incumbent" = 'Ray Roberts' | wikisql |
CREATE TABLE table_name_18 (
league_goals INTEGER,
total_apps VARCHAR
) | What are the average league goals that have 2 (1) as the total apps? | SELECT AVG(league_goals) FROM table_name_18 WHERE total_apps = "2 (1)" | sql_create_context |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id... | Get votes in the last X days. Helper query that grabs all vote instances in the last X days | SELECT * FROM Votes WHERE CreationDate >= CURRENT_TIMESTAMP() - @numDaysBegin | sede |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many patients are diagnosed for diabetes with neurological manifestations type i (juvenile type) and not stated as uncontrolled and lab tested with blood fluid ? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diabetes with neurological manifestations, type I [juvenile type], not stated as uncontrolled" AND lab.fluid = ... | mimicsql_data |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varc... | show me flights from SAN FRANCISCO to SEATTLE | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
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 d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)... | tell me the two year survival rate of patients who have been prescribed tetracycline hcl after they were diagnosed with crbl thrmbs w infrct? | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... | mimic_iii |
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(... | For those employees who did not have any job in the past, show me about the change of department_id over hire_date in a line chart. | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
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,
... | how many emergency hospital admission patients have coronary atherosclerosis of native coronary artery diagnoses? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.short_title = "Crnry athrscl natve vssl" | mimicsql_data |
CREATE TABLE table_26009 (
"Pos" real,
"Constructor" text,
"Chassis" text,
"Starts" real,
"Finishes" real,
"Wins" real,
"Podiums" real,
"Stage wins" real,
"Power stage wins" real,
"Points" real
) | If finishes is 10, what is the POS minimum? | SELECT MIN("Pos") FROM table_26009 WHERE "Finishes" = '10' | wikisql |
CREATE TABLE table_name_24 (
wickets INTEGER,
average VARCHAR,
overs VARCHAR,
player VARCHAR
) | What is the average wickets that have overs greater than 44, danish kaneria as the player, with an average greater than 13.8? | SELECT AVG(wickets) FROM table_name_24 WHERE overs > 44 AND player = "danish kaneria" AND average > 13.8 | sql_create_context |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cine... | What is the number of films of each director? Return a pie chart. | SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | specify the type of admission of patient kelly gallardo | SELECT demographic.admission_type FROM demographic WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
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... | what were the top four medicines that were frequently prescribed until 4 years ago? | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 4 | eicu |
CREATE TABLE table_name_68 (
venue VARCHAR,
extra VARCHAR
) | Which venue had an extra of Junior Race? | SELECT venue FROM table_name_68 WHERE extra = "junior race" | sql_create_context |
CREATE TABLE table_name_18 (
general_classification VARCHAR,
team_classification VARCHAR
) | What is the general classification when the team classification is japan? | SELECT general_classification FROM table_name_18 WHERE team_classification = "japan" | sql_create_context |
CREATE TABLE table_name_41 (
wins INTEGER,
against VARCHAR
) | What is the least amount of wins when against is 1314? | SELECT MIN(wins) FROM table_name_41 WHERE against = 1314 | sql_create_context |
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 transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | when did patient 95057's first lab test take place in 12/this year? | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95057) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', labevents.charttime) = '12' ORDER BY labevents... | mimic_iii |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | 在医院2963519编号为62495309的病患入院诊断疾病名称包含人格的医疗就诊记录编号号码是多少? | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '62495309' AND qtb.MED_SER_ORG_NO = '2963519' AND qtb.IN_DIAG_DIS_NM LIKE '%人格%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '62495309' AND gyb.MED_SER_ORG_NO = '2963519' AND gyb.IN_DIAG_DIS_NM LIKE '%人格%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb ... | css |
CREATE TABLE table_7388 (
"Player" text,
"Club" text,
"League" real,
"FA Cup" real,
"FA Trophy" real,
"League Cup" real,
"Total" real
) | What is the total number of FA trophies of player Neil Grayson, who has more than 2 FA cups and a league greater than 17? | SELECT COUNT("FA Trophy") FROM table_7388 WHERE "FA Cup" > '2' AND "Player" = 'neil grayson' AND "League" > '17' | wikisql |
CREATE TABLE table_14339 (
"Club" text,
"Visa 1" text,
"Visa 2" text,
"Visa 3" text,
"Visa 4" text,
"Visa 5" text
) | Which Visa 3 has a Visa 1 of michael mcglinchey? | SELECT "Visa 3" FROM table_14339 WHERE "Visa 1" = 'michael mcglinchey' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.