context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_3315 (
"Position" real,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Corrected time d:hh:mm:ss" text
) | What is the position for sail number aus 03? | SELECT MIN("Position") FROM table_3315 WHERE "Sail number" = 'AUS 03' | wikisql |
CREATE TABLE table_name_30 (
number INTEGER,
cars_per_set INTEGER
) | What is the largest number of cars per set that is less than 9? | SELECT MAX(number) FROM table_name_30 WHERE cars_per_set < 9 | sql_create_context |
CREATE TABLE view_unit_status (
apt_id number,
apt_booking_id number,
status_date time,
available_yn others
)
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking... | Show the facility codes of apartments with more than 4 bedrooms. | SELECT T1.facility_code FROM apartment_facilities AS T1 JOIN apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 | spider |
CREATE TABLE table_224844_4 (
vacator VARCHAR,
district VARCHAR
) | Who left a seat open for the district of connecticut at-large | SELECT vacator FROM table_224844_4 WHERE district = "Connecticut At-large" | sql_create_context |
CREATE TABLE table_22513 (
"Number" real,
"Sanskrit" text,
"International Alphabet of Sanskrit Transliteration" text,
"Sanskrit gloss" text,
"Western name" text,
"Greek" text,
"Gloss" text,
"Tattva (Element)" text,
"Quality" text,
"Ruling Planet" text
) | When mithuna is the international alphabet of sanskrit transliteration what is the ruling planet? | SELECT "Ruling Planet" FROM table_22513 WHERE "International Alphabet of Sanskrit Transliteration" = 'Mithuna' | wikisql |
CREATE TABLE table_29385 (
"Player" text,
"Team" text,
"Matches" real,
"Overs" text,
"Wickets" real,
"Average" text,
"Economy" text,
"BBI" text,
"4wi" real,
"5wi" real
) | Who is the player when the bbi is 5/27? | SELECT "Player" FROM table_29385 WHERE "BBI" = '5/27' | wikisql |
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 distribution of hire_date and the sum of salary bin hire_date by time in a bar chart, list in desc by the Y please. | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) DESC | nvbench |
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... | 患者72267378以前就诊的地方在哪? | SELECT mzjzjlb.YLJGDM 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 = '72267378' UNION SELECT zyjzjlb.YLJGDM FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX ... | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 70649441899那个门诊在哪年哪月的哪一天就诊 | SELECT mzjzjlb.JZKSRQ FROM mzjzjlb WHERE mzjzjlb.JZLSH = '70649441899' | css |
CREATE TABLE table_204_87 (
id number,
"courthouse" text,
"city" text,
"street address" text,
"jurisdiction" text,
"dates of use" text,
"named for" text
) | which jurisdiction is listed the most ? | SELECT "jurisdiction" FROM table_204_87 GROUP BY "jurisdiction" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_name_31 (
office VARCHAR,
prohibition_ticket VARCHAR
) | What office did Henry Hagner run for on the prohibition ticket? | SELECT office FROM table_name_31 WHERE prohibition_ticket = "henry hagner" | sql_create_context |
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
) | Bar chart x axis name y axis the number of name, show in descending by the Y-axis please. | SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY COUNT(Name) DESC | nvbench |
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 mzjzjlb (
YLJGDM text,
JZLSH ... | 编号66554229的患者在10年3月11日到14年9月19日内被开出了多少检验报告单? | SELECT (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '66554229' AND jybgb.BGRQ BETWEEN '2010-03-11' AND '2014-09-19'... | css |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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,
... | 由门诊诊断为矽肺Ⅲ期的病号的检测指标586304数值的平均值以及最值各自是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJ... | css |
CREATE TABLE table_11677691_9 (
college VARCHAR,
hometown VARCHAR
) | Which college is present in the hometown of Crete, Illinois? | SELECT college FROM table_11677691_9 WHERE hometown = "Crete, Illinois" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number... | had patient 031-3355 been given a electrolyte administration - oral procedure since 2103? | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND treatment.treatmentname = 'electrolyte administration - oral... | eicu |
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 microlab (
microl... | what is the monthly minimum amount of indwelling catheter that patient 002-52932 had until 03/22/2104? | SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-52932')) AND intakeoutput.celllabel = 'indwe... | eicu |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 门诊上一般被诊断为慢性支气管炎的患者的检测指标454629数值的平均值以及最值会是怎样的数据 | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDSM = '慢性支气管炎' AND jyjgzbb.JCZBDM = '4... | css |
CREATE TABLE table_50749 (
"2010 ARWU Rankings" text,
"2010 QS World Rankings" text,
"2010 QS Asian Rankings" text,
"2010 eduniversal Rankings" text,
"2009 QS Asian Rankings: Int\u2019l faculty review" text,
"2009 QS Asian Rankings: Int\u2019l student review" real,
"2000 Singapore \u201cAsia... | What's the ARWU ranking that has the int' student review of 144, a median rank of less than 10, and 2000 Singapore Asiaweek of none? | SELECT "2010 ARWU Rankings" FROM table_50749 WHERE "2000 Singapore \u201cAsiaweek\u201d Rankings" = 'none' AND "Median ranks" < '10' AND "2009 QS Asian Rankings: Int\u2019l student review" = '144' | wikisql |
CREATE TABLE table_13250 (
"National team" text,
"Club" text,
"Year" text,
"Apps" real,
"Goals" real
) | Which National team has a Club of arsenal, and Apps smaller than 4, and a Year of 2010? | SELECT "National team" FROM table_13250 WHERE "Club" = 'arsenal' AND "Apps" < '4' AND "Year" = '2010' | wikisql |
CREATE TABLE table_name_47 (
attendance VARCHAR,
visitor VARCHAR
) | How many people attended the game that had the Clippers as visiting team? | SELECT attendance FROM table_name_47 WHERE visitor = "clippers" | sql_create_context |
CREATE TABLE table_27778 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
) | What was his position when he garnered 38 points? | SELECT "Position" FROM table_27778 WHERE "Points" = '38' | wikisql |
CREATE TABLE table_1341663_11 (
incumbent VARCHAR,
first_elected VARCHAR
) | How many sitting politicians were originally elected in 1972? | SELECT COUNT(incumbent) FROM table_1341663_11 WHERE first_elected = 1972 | sql_create_context |
CREATE TABLE table_201_24 (
id number,
"episode number" number,
"original airdate" text,
"title" text,
"disc" number,
"description" text
) | how many episodes had their original airdate in february ? | SELECT COUNT("episode number") FROM table_201_24 WHERE "original airdate" = 2 | squall |
CREATE TABLE table_32050 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | Tell me the tournament for score in the final of 1 6, 3 6 | SELECT "Tournament" FROM table_32050 WHERE "Score in the final" = '1–6, 3–6' | wikisql |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TAB... | is there a flight from BOSTON to ATLANTA which leaves BOSTON in the afternoon and arrives close to 5pm | 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 <= 1715 AND flight.arrival_time >= 1645) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.to... | atis |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | DENVER to ATLANTA | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA... | atis |
CREATE TABLE table_204_729 (
id number,
"year" text,
"show" text,
"role" text,
"channel" text,
"notes" text
) | how many roles did this actor have before 2010 ? | SELECT COUNT("role") FROM table_204_729 WHERE "year" < 2010 | squall |
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... | 从01年7月3日开始到18年10月2日结束编号为6425807的医院门诊医疗记录的数量总共有多少? | SELECT COUNT(*) FROM mzb WHERE mzb.MED_TYPE = '6425807' AND mzb.IN_HOSP_DAYS BETWEEN '2001-07-03' AND '2018-10-02' | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 在2003年4月11日到2012年1月23日这段时间医院5023348有多少科室在门诊就诊期间开出的检验报告单比19张多的? | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.B... | css |
CREATE TABLE table_13729 (
"Year" real,
"Competition Description" text,
"Location" text,
"Apparatus" text,
"Rank-Final" text,
"Score-Final" real,
"Rank-Qualifying" text,
"Score-Qualifying" real
) | What was the location of the competition with a Rank-Final of 1st and a Score-Qualifying under 28.975? | SELECT "Location" FROM table_13729 WHERE "Rank-Final" = '1st' AND "Score-Qualifying" < '28.975' | wikisql |
CREATE TABLE table_name_24 (
call_sign VARCHAR,
erp_w VARCHAR,
class VARCHAR,
frequency_mhz VARCHAR
) | Class of d, and a Frequency MHz smaller than 107.7, and a ERP W smaller than 232 has what call sign? | SELECT call_sign FROM table_name_24 WHERE class = "d" AND frequency_mhz < 107.7 AND erp_w < 232 | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TA... | how many procedures for ddavp injection are performed since 6 years ago? | SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'ddavp injection' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-6 year') | eicu |
CREATE TABLE table_name_18 (
begin VARCHAR,
state_territory VARCHAR,
icao VARCHAR
) | What begin has victoria as the state/territory and a ICA0 of ymml? | SELECT begin FROM table_name_18 WHERE state_territory = "victoria" AND icao = "ymml" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | what is diagnoses long title of diagnoses icd9 code 7756? | SELECT diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "7756" | mimicsql_data |
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... | 列出患者金嘉丽的医疗记录中每一次被开出的药品金额不低于4769.0元的医疗就诊编号 | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '金嘉丽' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 4769.0) | css |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | Most viewed posts for tag. | SELECT ViewCount, Score, ((Score + 0.0) / (ViewCount + 0.0)) AS Strength, Title, Tags FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id WHERE PostTags.TagId = 1 AND ((Score + 0.0) / (ViewCount + 0.0)) > 0.00724 ORDER BY ViewCount DESC LIMIT 50 | sede |
CREATE TABLE rooms (
roomid text,
roomname text,
beds number,
bedtype text,
maxoccupancy number,
baseprice number,
decor text
)
CREATE TABLE reservations (
code number,
room text,
checkin text,
checkout text,
rate number,
lastname text,
firstname text,
adults... | Return the decor of the room named 'Recluse and defiance'. | SELECT decor FROM rooms WHERE roomname = "Recluse and defiance" | spider |
CREATE TABLE table_41050 (
"Date" text,
"Opponent" text,
"Location" text,
"Result" text,
"Attendance" real
) | What team was the opponent on 09/20/1975? | SELECT "Opponent" FROM table_41050 WHERE "Date" = '09/20/1975' | wikisql |
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
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_I... | What are the names of the technicians and how many machines are they assigned to repair, show from high to low by the x axis. | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY Name DESC | nvbench |
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 ... | what was the last type of the hospital admission of patient 60136 since 2105? | SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 60136 AND STRFTIME('%y', admissions.admittime) >= '2105' ORDER BY admissions.admittime DESC LIMIT 1 | mimic_iii |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStat... | An extremely noisy query for finding users who hate SO. | SELECT * FROM Users WHERE (AboutMe LIKE '%rude%' OR AboutMe LIKE '%belittle%') AND (AboutMe LIKE '%Stack Overflow%' OR AboutMe LIKE '%StackOverflow%' OR AboutMe LIKE '%stack overflow%' OR AboutMe LIKE '%stackoverflow%') | sede |
CREATE TABLE table_34673 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" real
) | What is the best time for a rusport driver with a qual 2 time of 1:10.166? | SELECT MAX("Best") FROM table_34673 WHERE "Team" = 'rusport' AND "Qual 2" = '1:10.166' | wikisql |
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE music_festival (
id... | Return the average age across all artists. | SELECT AVG(age) FROM artist | spider |
CREATE TABLE tourist_attractions (
tourist_attraction_id number,
attraction_type_code text,
location_id number,
how_to_get_there text,
name text,
description text,
opening_hours text,
other_details text
)
CREATE TABLE photos (
photo_id number,
tourist_attraction_id number,
n... | Tell me the name of the staff in charge of the attraction called 'US museum'. | SELECT T1.name FROM staff AS T1 JOIN tourist_attractions AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id WHERE T2.name = "US museum" | spider |
CREATE TABLE table_60479 (
"Edition" text,
"Round" text,
"Date" text,
"Surface" text,
"Opponent" text,
"Result" text
) | What round had a result of 6 7 (6 8) , 1 6? | SELECT "Round" FROM table_60479 WHERE "Result" = '6–7 (6–8) , 1–6' | wikisql |
CREATE TABLE table_17551 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | What is the original air date for 'Oliver's Jaded Past'? | SELECT "Original air date" FROM table_17551 WHERE "Title" = 'Oliver''s Jaded Past' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | how many patients whose gender is f and diagnoses short title is lap surg convert to open? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Lap surg convert to open" | mimicsql_data |
CREATE TABLE table_33171 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
) | What was the score of the Jeff Tarango game? | SELECT "Score" FROM table_33171 WHERE "Partner" = 'jeff tarango' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | give the number of patients under the age of41 who had the procedure for insertion of drug-eluting coronary artery stent(s). | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "41" AND procedures.long_title = "Insertion of drug-eluting coronary artery stent(s)" | mimicsql_data |
CREATE TABLE table_name_96 (
venue VARCHAR,
score VARCHAR,
date VARCHAR
) | what is the venue when the score is 1 goal and the date is october 11, 1997? | SELECT venue FROM table_name_96 WHERE score = "1 goal" AND date = "october 11, 1997" | sql_create_context |
CREATE TABLE table_3258 (
"Date" text,
"Time (ET)" text,
"Event #" real,
"Event" text,
"Winner" text,
"Prize" text,
"Entries" text,
"Prize Pool" text,
"Elapsed Time" text
) | Name the time for entries being 907 | SELECT "Time (ET)" FROM table_3258 WHERE "Entries" = '907' | wikisql |
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_office text,
prof_extension text,
prof_high_degree text
)
CREATE TABLE employee (
emp_num number,
emp_lname text,
emp_fname text,
emp_initial text,
emp_jobcode text,
emp_hiredate time,
emp_dob time
)
CREATE T... | Find the first names of all professors in the Accounting department who is teaching some course and the class room. | SELECT T2.emp_fname, T1.class_room FROM class AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting' | spider |
CREATE TABLE table_224672_2 (
type VARCHAR,
term_ended VARCHAR
) | What branch of government was the term that ended on January 3, 2001? | SELECT type FROM table_224672_2 WHERE term_ended = "January 3, 2001" | sql_create_context |
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... | count the number of patients whose primary disease is s/p fall and year of death is less than or equal to 2112? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2112.0" | mimicsql_data |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CR... | Which CHE classes do n't meet on Friday ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course_offering.friday = 'N' AND course.department = 'CHE' AND semester.semester = 'WN' AND se... | advising |
CREATE TABLE table_1574 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
) | Name the replaced by when outgoing manager is kent nielsen | SELECT "Replaced by" FROM table_1574 WHERE "Outgoing manager" = 'Kent Nielsen' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | Find out the number of government insurance patients who had a lactate lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "Lactate" | mimicsql_data |
CREATE TABLE table_17875 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
) | what's player with position being forward and current club being real madrid | SELECT "Player" FROM table_17875 WHERE "Position" = 'Forward' AND "Current Club" = 'Real Madrid' | wikisql |
CREATE TABLE airport_aircraft (
id number,
airport_id number,
aircraft_id number
)
CREATE TABLE pilot (
pilot_id number,
name text,
age number
)
CREATE TABLE match (
round number,
location text,
country text,
date text,
fastest_qualifying text,
winning_pilot text,
w... | What are the maximum and minimum number of transit passengers of all aiports. | SELECT MAX(transit_passengers), MIN(transit_passengers) FROM airport | spider |
CREATE TABLE table_26396 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) | Who was the writer for the episode originally airing on March 1, 2004? | SELECT "Written by" FROM table_26396 WHERE "Original air date" = 'March 1, 2004' | wikisql |
CREATE TABLE products_booked (
booking_id number,
product_id number,
returned_yn text,
returned_late_yn text,
booked_count number,
booked_amount number
)
CREATE TABLE products_for_hire (
product_id number,
product_type_code text,
daily_hire_cost number,
product_name text,
pr... | How many different product types are there? | SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire | spider |
CREATE TABLE table_name_6 (
teams VARCHAR,
league VARCHAR,
away VARCHAR
) | What team played in the Bundesliga league with an Away record of 2-1? | SELECT teams FROM table_name_6 WHERE league = "bundesliga" AND away = "2-1" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImage... | questions from 2010.01.01 to 2010 10.10. | SELECT * FROM Posts WHERE CreationDate >= '2010-01-01 00:00:00' AND CreationDate < '2010-01-10 00:00:00' AND PostTypeId = 2 ORDER BY CreationDate DESC | sede |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime ti... | what was the name of a drug patient 28048 was last prescribed until 51 months ago? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28048) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-51 month') ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_40650 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
) | What was Jimmy Jones' rank when the matches were smaller than 285? | SELECT MAX("Rank") FROM table_40650 WHERE "Name" = 'jimmy jones' AND "Matches" < '285' | wikisql |
CREATE TABLE table_26032940_2 (
movie_title_and_year VARCHAR,
main_cast VARCHAR
) | What movie did dana wynter , mel ferrer , theodore bikel star in? | SELECT movie_title_and_year FROM table_26032940_2 WHERE main_cast = "Dana Wynter , Mel Ferrer , Theodore Bikel" | sql_create_context |
CREATE TABLE table_name_30 (
silver INTEGER,
gold VARCHAR,
nation VARCHAR
) | What is the low silver total for switzerland with over 0 golds? | SELECT MIN(silver) FROM table_name_30 WHERE gold > 0 AND nation = "switzerland" | sql_create_context |
CREATE TABLE table_1195 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | When marshmallow cookies is segment b what episode is it on netflix? | SELECT "Netflix" FROM table_1195 WHERE "Segment B" = 'Marshmallow Cookies' | wikisql |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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... | 看看病人水慧颖在医院1586101的门诊就诊中科室名有急诊二字的就诊记录的流水号 | 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 hz_info.YLJGDM = '1586101' AND mzjzjlb.JZKSMC LIKE '%急诊%' | css |
CREATE TABLE table_name_97 (
draws INTEGER,
points VARCHAR,
goal_difference VARCHAR,
goals_against VARCHAR
) | What is the average Draws, when Goal Difference is greater than -3, when Goals Against is 30, and when Points is greater than 45? | SELECT AVG(draws) FROM table_name_97 WHERE goal_difference > -3 AND goals_against = 30 AND points > 45 | sql_create_context |
CREATE TABLE table_27268238_4 (
matches INTEGER
) | What is the smallest amount of matches? | SELECT MIN(matches) FROM table_27268238_4 | sql_create_context |
CREATE TABLE table_16828 (
"Model name" text,
"Power (ps)" real,
"Torque (Nm@rpm)" text,
"Displacement (cm\u00b3)" real,
"Engine code" text,
"Comment" text
) | What is the model of the engine d5244 t7? | SELECT "Model name" FROM table_16828 WHERE "Engine code" = 'D5244 T7' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId num... | What is the total number of users on StackOverflow. | SELECT * FROM Users WHERE DisplayName = 'BalusC' | sede |
CREATE TABLE table_61361 (
"Outcome" text,
"Date" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | What Score in the final has a Surface of hard, a Championship of washington, d.c. , u.s., and an Opponent in the final of ivan lendl? | SELECT "Score in the final" FROM table_61361 WHERE "Surface" = 'hard' AND "Championship" = 'washington, d.c. , u.s.' AND "Opponent in the final" = 'ivan lendl' | 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... | 请提供潘虹颖这位参保人从09.7.2起,截止到14.3.8期间门诊检查费的金额 | SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '潘虹颖' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2009-07-02' AND '2014-03-08' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversa... | Who are answering the same questions as me? List those users that have answered at least two questions which I have also answered. List those users that have answered at least two questions which I have also answered | SELECT COUNT(DISTINCT myAnswer.ParentId) AS QuestionCount, otherAnswer.OwnerUserId AS "user_link" FROM Posts AS myAnswer, Posts AS otherAnswer WHERE otherAnswer.OwnerUserId != @MyUserId AND myAnswer.OwnerUserId = @MyUserId AND myAnswer.ParentId = otherAnswer.ParentId AND otherAnswer.PostTypeId = 2 AND myAnswer.PostType... | sede |
CREATE TABLE table_24423 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | What week #(s featured sara bareilles as the original artist? | SELECT "Week #" FROM table_24423 WHERE "Original artist" = 'Sara Bareilles' | wikisql |
CREATE TABLE table_name_93 (
ship_type VARCHAR,
tonnage VARCHAR
) | With a tonnage of 225 what is the ship type? | SELECT ship_type FROM table_name_93 WHERE tonnage = "225" | sql_create_context |
CREATE TABLE table_77142 (
"Blocks" text,
"Opponent" text,
"Home/Away" text,
"Minutes played" real,
"Points" real,
"Rebounds" real,
"Assists" real
) | How many minutes were played when there were 18 points and the opponent was Chicago Bulls? | SELECT COUNT("Minutes played") FROM table_77142 WHERE "Points" = '18' AND "Opponent" = 'chicago bulls' | wikisql |
CREATE TABLE browser (
id int,
name text,
market_share real
)
CREATE TABLE accelerator_compatible_browser (
accelerator_id int,
browser_id int,
compatible_since_year int
)
CREATE TABLE Web_client_accelerator (
id int,
name text,
Operating_system text,
Client text,
Connectio... | Find the number of web accelerators used for each Operating system, show from high to low by the total number. | SELECT Operating_system, COUNT(*) FROM Web_client_accelerator GROUP BY Operating_system ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_33922 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | what city is the toamasina airport in? | SELECT "City" FROM table_33922 WHERE "Airport" = 'toamasina airport' | wikisql |
CREATE TABLE table_69752 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | What date was the match on a clay surface against Andrea Hlav kov ? | SELECT "Date" FROM table_69752 WHERE "Surface" = 'clay' AND "Opponent" = 'andrea hlaváčková' | wikisql |
CREATE TABLE table_name_54 (
year INTEGER,
award VARCHAR,
nominated_work VARCHAR,
category VARCHAR
) | What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award? | SELECT MAX(year) FROM table_name_54 WHERE nominated_work = "the mineola twins" AND category = "outstanding actress in a play" AND award = "drama desk award" | sql_create_context |
CREATE TABLE table_203_644 (
id number,
"pos." number,
"driver" text,
"co-driver" text,
"car" text,
"time" text,
"difference" text,
"points" number
) | which driver and co driver have the most points ? | SELECT "driver", "co-driver" FROM table_203_644 ORDER BY "points" DESC LIMIT 1 | squall |
CREATE TABLE table_67438 (
"Status" text,
"Name" text,
"First Performance" text,
"Last Performance" text,
"Style" text
) | When was the first performance with a replacement cast? | SELECT "First Performance" FROM table_67438 WHERE "Status" = 'replacement cast' | wikisql |
CREATE TABLE table_54727 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What company constructed the car with more than 0 laps and shows 5 for grid? | SELECT "Constructor" FROM table_54727 WHERE "Laps" > '0' AND "Grid" = '5' | 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... | what is the top five most common procedures that followed in the same hospital encounter for patients who received mechanical ventilation - pressure controlled until 2104? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'mecha... | eicu |
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 admission location and procedure short title of subject name dominga garvin? | SELECT demographic.admission_location, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Dominga Garvin" | mimicsql_data |
CREATE TABLE table_26498 (
"Administrative division" text,
"Area (km\u00b2) 2011**" text,
"Population 2001 Census (Adjusted)" real,
"Population 2011 Census (Adjusted)" real,
"Population density (/km\u00b2 2011)" text
) | In what division was there a population density in km2 of 1,604.3 in 2011? | SELECT "Administrative division" FROM table_26498 WHERE "Population density (/km\u00b2 2011)" = '1,604.3' | wikisql |
CREATE TABLE table_name_73 (
venue VARCHAR,
city VARCHAR
) | What venue is in Long Beach? | SELECT venue FROM table_name_73 WHERE city = "long beach" | sql_create_context |
CREATE TABLE table_37214 (
"Name" text,
"Birth" text,
"Marriage" text,
"Became Duchess" text,
"Ceased to be Duchess" text,
"Death" text,
"Spouse" text
) | Which Birth has a Became Duchess of 17 april 1711 husband's ascension? | SELECT "Birth" FROM table_37214 WHERE "Became Duchess" = '17 april 1711 husband''s ascension' | wikisql |
CREATE TABLE table_203_788 (
id number,
"year" number,
"author" text,
"illustrator" text,
"title" text,
"publisher" text
) | which other author , besides lewis carroll , has won the kurt maschler award twice ? | SELECT "author" FROM table_203_788 WHERE "author" <> 'lewis carroll' GROUP BY "author" HAVING COUNT(*) = 2 | squall |
CREATE TABLE table_53128 (
"Record" text,
"Date" text,
"Driver" text,
"Time" text,
"Speed/Avg. Speed" text
) | What is the record time at the Nascar Camping World Truck Series? | SELECT "Time" FROM table_53128 WHERE "Record" = 'nascar camping world truck series' | wikisql |
CREATE TABLE table_name_44 (
circuit VARCHAR,
winning_constructor VARCHAR
) | Which circuit was Delage the winning constructor for? | SELECT circuit FROM table_name_44 WHERE winning_constructor = "delage" | sql_create_context |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location... | what was the total amount of output patient 92846 had in the previous day? | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92846)) AND DATETIME(outputevents.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of... | mimic_iii |
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 diagnoses (
... | what is the number of patients whose drug code is busp10? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "BUSP10" | mimicsql_data |
CREATE TABLE table_name_28 (
screen_size VARCHAR,
pixels VARCHAR,
dimensions_w×h×d__mm_ VARCHAR,
model VARCHAR
) | What is the screen size and pixel amount of model p5000 when the dimensions are 98 64.5 41? | SELECT screen_size, pixels FROM table_name_28 WHERE dimensions_w×h×d__mm_ = "98×64.5×41" AND model = "p5000" | sql_create_context |
CREATE TABLE table_203_8 (
id number,
"player" text,
"rec." number,
"yards" number,
"avg." number,
"td's" number,
"long" number
) | which player had the most receptions but no touchdowns ? | SELECT "player" FROM table_203_8 WHERE "td's" = 0 ORDER BY "rec." DESC LIMIT 1 | squall |
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... | 有多少科室的最短医疗住院时长多于12天,在5265726这个医院 | SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5265726' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MIN(t_kc21.IN_HOSP_DAYS) > 12) AS T | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.