context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 想知道有哪些医院给患者李红豆开了奥氮平片这个药 | SELECT t_kc22.t_kc21_MED_SER_ORG_NO FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '李红豆' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '奥氮平片') | css |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | 经过门诊诊断确诊为疾病J15.862的那个编号为93176419的患者的检测指标694263的结果定量及其单位分别是多少? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON 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 WHERE mzjzjlb.JZZDBM = 'J15.862' AND hz_info.RYB... | css |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
... | Are there any courses required prior to taking IOE 333 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_36048 (
"State" text,
"Name" text,
"Hometown" text,
"Age 1" real,
"Talent" text
) | What is the age of the contestant from Reno, NV? | SELECT "Age 1" FROM table_36048 WHERE "Hometown" = 'reno, nv' | wikisql |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW t... | 姓名是吕经艺的患者的哪些检验报告单上的检验结论指标都正常的?具体的检验报告单号是啥? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '吕经艺' AND NOT ... | css |
CREATE TABLE table_27713583_6 (
game VARCHAR,
team VARCHAR
) | What game number is the Washington team. | SELECT COUNT(game) FROM table_27713583_6 WHERE team = "Washington" | sql_create_context |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment tex... | Kill 11.04 crap questions with Fire. Unanswered 11.04 questions sorted by score and time | SELECT P.Id AS "post_link", P.CreationDate, P.Score FROM Posts AS P, PostTags AS PT, Tags AS T WHERE (T.Id = PT.TagId AND P.Id = PT.PostId) AND T.TagName = '11.04' AND AcceptedAnswerId IS NULL ORDER BY P.Score, P.CreationDate DESC | sede |
CREATE TABLE table_73628 (
"Institution" text,
"Location" text,
"Team Name" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Year Joined" real
) | How many entries are there for founded when the location was springfield, ohio? | SELECT COUNT("Founded") FROM table_73628 WHERE "Location" = 'Springfield, Ohio' | wikisql |
CREATE TABLE table_1594772_2 (
team__a_ VARCHAR,
match_date VARCHAR
) | Namethe team for feb 27, 1996 | SELECT team__a_ FROM table_1594772_2 WHERE match_date = "Feb 27, 1996" | sql_create_context |
CREATE TABLE table_10143 (
"Season" text,
"Club" text,
"League" text,
"Apps" real,
"Goals" real
) | Which league has 12 goals? | SELECT "League" FROM table_10143 WHERE "Goals" = '12' | wikisql |
CREATE TABLE table_59084 (
"German" text,
"Low German" text,
"Plautdietsch" text,
"Dutch" text,
"English" text
) | Which English has German of leben? | SELECT "English" FROM table_59084 WHERE "German" = 'leben' | wikisql |
CREATE TABLE table_62927 (
"Campus" text,
"Year opened" text,
"Students" text,
"Size" text,
"Location" text
) | What campus opened in 1970? | SELECT "Campus" FROM table_62927 WHERE "Year opened" = '1970' | wikisql |
CREATE TABLE table_name_77 (
opponent VARCHAR,
attendance VARCHAR
) | What Opponent has the Attendance of 14,029? | SELECT opponent FROM table_name_77 WHERE attendance = "14,029" | sql_create_context |
CREATE TABLE table_8450 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | Who did he play on a hard surface? | SELECT "Opponents" FROM table_8450 WHERE "Surface" = 'hard' | wikisql |
CREATE TABLE table_28180840_15 (
semifinal__week_ VARCHAR,
age_s_ VARCHAR
) | How many performers are 29 that made it to the semi finals? | SELECT semifinal__week_ FROM table_28180840_15 WHERE age_s_ = "29" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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 te... | 查一下患者53607326踝部检验的各项指标结果 | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE table_name_48 (
visitor VARCHAR,
date VARCHAR
) | Who is the visitor of the game on March 7? | SELECT visitor FROM table_name_48 WHERE date = "march 7" | sql_create_context |
CREATE TABLE table_name_71 (
part_number_s_ VARCHAR,
sspec_number VARCHAR,
l2_cache VARCHAR,
release_date VARCHAR
) | what is the part number(s) when l2 cache is 512 kb, release date is june 2001 and sSpec number is sl5lv, sl5pu, sl6bw, sl6jm? | SELECT part_number_s_ FROM table_name_71 WHERE l2_cache = "512 kb" AND release_date = "june 2001" AND sspec_number = "sl5lv, sl5pu, sl6bw, sl6jm" | sql_create_context |
CREATE TABLE table_27758 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Combination Classification" text,
"Team classification" text
) | Who was awarded mountains classification when Alessandro petacchi won? | SELECT "Mountains classification" FROM table_27758 WHERE "Winner" = 'Alessandro Petacchi' | wikisql |
CREATE TABLE table_58505 (
"Grid" real,
"Driver" text,
"Constructor" text,
"Qual" real,
"Rank" real,
"Laps" real,
"Time/Retired" text
) | Which time/retired has a qual of 144.02? | SELECT "Time/Retired" FROM table_58505 WHERE "Qual" = '144.02' | 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 ... | 检验报告单92482714366对应的患者姓名在门诊就诊中叫什么? | SELECT person_info.XM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ... | css |
CREATE TABLE table_1341663_6 (
party VARCHAR,
district VARCHAR
) | What party was the winning one in the elections in the California 30 district? | SELECT party FROM table_1341663_6 WHERE district = "California 30" | sql_create_context |
CREATE TABLE table_name_6 (
grid VARCHAR,
laps VARCHAR,
time VARCHAR
) | What is the total grid number that has 14 laps and a time of +29.483? | SELECT COUNT(grid) FROM table_name_6 WHERE laps = 14 AND time = "+29.483" | sql_create_context |
CREATE TABLE table_58970 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text
) | Where is the nationality of Arg Esp moving to? | SELECT "Moving to" FROM table_58970 WHERE "Nat." = 'arg esp' | wikisql |
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 are the five most frequently given procedures for patients with an age of 20s since 2 years ago? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B... | mimic_iii |
CREATE TABLE table_6770 (
"SANSKRT" text,
"CHINESE" text,
"VIETNAMESE" text,
"JAPANESE" text,
"KOREAN" text
) | Which VIETNAMESE has a CHINESE of / b r m du ? | SELECT "VIETNAMESE" FROM table_6770 WHERE "CHINESE" = '不如密多 / bùrúmìduō' | wikisql |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence... | what airlines have nonstop early afternoon flights from BOSTON to DENVER | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | atis |
CREATE TABLE catalog_structure (
catalog_level_number number,
catalog_id number,
catalog_level_name text
)
CREATE TABLE attribute_definitions (
attribute_id number,
attribute_name text,
attribute_data_type text
)
CREATE TABLE catalog_contents_additional_attributes (
catalog_entry_id number... | Find the list of attribute data types possessed by more than 3 attribute definitions. | SELECT attribute_data_type FROM attribute_definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3 | spider |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests i... | Would there be a 285 lab ? | SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 285 | advising |
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 (
... | give me the number of patients whose diagnoses short title is asthma nos w (ac) exac and lab test fluid is urine? | 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.short_title = "Asthma NOS w (ac) exac" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE table_3505 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
) | What is the pa when the skip is fran ois gagn ? | SELECT "PA" FROM table_3505 WHERE "Skip" = 'François Gagné' | 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... | what is maximum age of patients whose ethnicity is white - russian and days of hospital stay is 29? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.days_stay = "29" | mimicsql_data |
CREATE TABLE table_65000 (
"Date" text,
"Venue" text,
"Score" text,
"Comp" text,
"Report" text
) | What is the Report on November 15, 2000? | SELECT "Report" FROM table_65000 WHERE "Date" = 'november 15, 2000' | wikisql |
CREATE TABLE table_69073 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | What was score of the game when the record was 72-74? | SELECT "Score" FROM table_69073 WHERE "Record" = '72-74' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevent... | list the top three most frequent diagnoses that a patient was diagnosed with in the same month after receiving vaccination nec in 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, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_42232 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | How much gold received by nation of uzbekistan (uzb)? | SELECT MAX("Gold") FROM table_42232 WHERE "Nation" = 'uzbekistan (uzb)' | wikisql |
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,
... | 看看参保人76143414从2010.8.24到2019.3.19这期间,在门诊发生的西药费有多少总额 | SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '76143414' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-08-24' AND '2019-03-19' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fg... | css |
CREATE TABLE table_21513 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What is the high amount of points on February 11? | SELECT "High points" FROM table_21513 WHERE "Date" = 'February 11' | wikisql |
CREATE TABLE table_69157 (
"Club" text,
"Sport" text,
"Began play" text,
"League" text,
"Venue" text
) | The nll participate in what sport? | SELECT "Sport" FROM table_69157 WHERE "League" = 'nll' | wikisql |
CREATE TABLE table_name_22 (
built VARCHAR,
fuel__trans VARCHAR
) | What is the manufacturer, found under the Built column, that made locomotives with a Fuel/Trans of diesel-electric? | SELECT built FROM table_name_22 WHERE fuel__trans = "diesel-electric" | sql_create_context |
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE music_festival (
id number,
music_festival text,
date_of_ceremony text,
category text,
volume number,
result text
)
CREATE TABLE a... | What are the famous title of the artists associated with volumes with more than 2 weeks on top? | SELECT T1.famous_title FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T2.weeks_on_top > 2 | spider |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense... | What is your favorite data analysis cartoon?. | SELECT * FROM Comments WHERE PostId = 423 | sede |
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
) | What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision Plot them as bar chart, show by the bars in descending. | SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' ORDER BY state DESC | nvbench |
CREATE TABLE table_36077 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | Which series episode has a Netflix episode of S03E16? | SELECT "Series Ep." FROM table_36077 WHERE "Netflix" = 's03e16' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM tex... | 在2014年2月21日到2017年10月12日期间,4874036医疗机构有过多少次特需门诊的就诊记录 | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '4874036' AND mzjzjlb.JZKSRQ BETWEEN '2014-02-21' AND '2017-10-12' AND mzjzjlb.TXBZ > 0 | css |
CREATE TABLE table_name_89 (
points INTEGER,
opponent VARCHAR,
game VARCHAR
) | How many Points have an Opponent of @ los angeles kings and a Game larger than 4? | SELECT AVG(points) FROM table_name_89 WHERE opponent = "@ los angeles kings" AND game > 4 | sql_create_context |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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 ... | 患者43539557患有牙本质过敏症,门诊诊断的检测指标945661的结果定量及其单位都均为? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jy... | css |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transa... | Show the transaction type and the number of transactions by a bar chart, could you sort x-axis from low to high order? | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY transaction_type | nvbench |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
la... | when was the last time that patient 017-45919 had maximum chloride value on this hospital visit? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-45919' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'chloride'... | eicu |
CREATE TABLE table_204_38 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text
) | what is the number of away games ? | SELECT COUNT(*) FROM table_204_38 WHERE "opponent#" = 'away' | squall |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
Par... | Posts with only sql or sql-server. | SELECT PostId AS "post_link", COUNT(t1.Id), COUNT(t3.Id) FROM PostTags AS pt LEFT OUTER JOIN Tags AS t1 ON TagId = t1.Id AND t1.TagName IN ('sql', 'sql-server') LEFT OUTER JOIN Tags AS t3 ON TagId = t3.Id AND t3.TagName NOT IN ('sql', 'sql-server') WHERE PostId = 20284725 GROUP BY PostId | sede |
CREATE TABLE table_1341663_10 (
incumbent VARCHAR,
candidates VARCHAR
) | how many times was the candidates dan mica (d) 55.3% bill james (r) 44.7%? | SELECT COUNT(incumbent) FROM table_1341663_10 WHERE candidates = "Dan Mica (D) 55.3% Bill James (R) 44.7%" | 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... | 这位患者谢晴雪出院诊断疾病名称包括性在病院1203816的医疗就诊记录编码是什么? | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '谢晴雪' AND qtb.MED_SER_ORG_NO = '1203816' AND qtb.OUT_DIAG_DIS_NM LIKE '%性%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '谢晴雪' AND gyb.MED_SER_ORG_NO = '1203816' AND gyb.OUT_DIAG_DIS_NM LIKE '%性%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.... | css |
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 ... | 申请人的检验报告单92936716541的工号以及姓名是什么? | SELECT zyjybgb.SQRGH, zyjybgb.SQRXM FROM zyjybgb WHERE zyjybgb.BGDH = '92936716541' UNION SELECT mzjybgb.SQRGH, mzjybgb.SQRXM FROM mzjybgb WHERE mzjybgb.BGDH = '92936716541' | css |
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition (
Competition_ID in... | For the names and the players of clubs, count the names by names in a bar chart, list from high to low by the x-axis. | SELECT T1.name, COUNT(T1.name) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID GROUP BY T1.name ORDER BY T1.name DESC | nvbench |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | How are people using the 'Leaving a half-answer as a comment' comment?. | SELECT PostId AS "post_link", * FROM Comments WHERE Text LIKE '%Leaving a half-answer as a comment%' | sede |
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CR... | What is the average high temperature for each day of week Plot them as bar chart, I want to sort in ascending by the Y-axis. | SELECT day_of_week, AVG(high_temperature) FROM weekly_weather GROUP BY day_of_week ORDER BY AVG(high_temperature) | 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 zyjzjlb (
YLJGDM text,
JZLSH ... | 门诊诊断患者许智鑫为疾病P13.012的二氧化碳的单位和结果定量分别是什么呢? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_name_81 (
nation VARCHAR,
bronze VARCHAR,
silver VARCHAR,
total VARCHAR
) | What is the Nation with less than 1 silver, and the total is 1, and bronze is less than 0? | SELECT nation FROM table_name_81 WHERE silver < 1 AND total = 1 AND bronze = 0 | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 列出吴英华这名患者在医院9013968的诊断信息不含循环的就诊记录 | SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '吴英华' AND hz_info.YLJGDM = '9013968' AND NOT wdmzjzjlb.JZZDSM LIKE '%循环%' UNION SELECT * FROM person_info JO... | css |
CREATE TABLE table_44270 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | What is the total of Played where the Goals For is higher than 60, the Lost is 8, and the Position is less than 1? | SELECT SUM("Played") FROM table_44270 WHERE "Goals For" > '60' AND "Lost" = '8' AND "Position" < '1' | wikisql |
CREATE TABLE table_31470 (
"Event" real,
"Circuit" text,
"GT3 Pro Cup Winner" text,
"GT3 Pro / Am Cup Winner" text,
"GT3 Citation Cup Winner" text,
"GT4 Cup Winner" text
) | List all GT4 Cup winners played on the Spa-Francorchamps Report. | SELECT "GT4 Cup Winner" FROM table_31470 WHERE "Circuit" = 'Spa-Francorchamps Report' | wikisql |
CREATE TABLE table_40629 (
"City" text,
"Jan." text,
"Feb." text,
"Mar." text,
"Apr." text,
"May." text,
"Jun." text,
"Jul." text,
"Aug." text,
"Sep." text,
"Oct." text,
"Nov." text,
"Dec." text
) | What were the Oct. temperatures for the city that had Nov. temperatures of 51/30? | SELECT "Oct." FROM table_40629 WHERE "Nov." = '51/30' | wikisql |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | Give me a pie to show the average of weight from different sex. | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex | nvbench |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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
)
... | in 2105 was patient 50065 prescribed quinidine sulfate? | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 50065) AND prescriptions.drug = 'quinidine sulfate' AND STRFTIME('%y', prescriptions.startdate) = '2105' | mimic_iii |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | give me the number of patients whose diagnoses short title is retention urine nos? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Retention urine NOS" | mimicsql_data |
CREATE TABLE table_23928 (
"Name" text,
"#" real,
"Height" text,
"Weight" real,
"Position" text,
"Year" text,
"Home Town" text,
"High School" text
) | What is the height of the player from Gulfport, MS? | SELECT "Height" FROM table_23928 WHERE "Home Town" = 'Gulfport, MS' | wikisql |
CREATE TABLE table_name_80 (
result VARCHAR,
date VARCHAR
) | What is Result, when Date is 2003? | SELECT result FROM table_name_80 WHERE date = "2003" | sql_create_context |
CREATE TABLE table_203_707 (
id number,
"rank" number,
"npc" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | the total number of medals won by australia was how many ? | SELECT "total" FROM table_203_707 WHERE "npc" = 'australia' | squall |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 为患者69016896检测指标301582的医务人员工号及姓名都是什么,从14年10月26日到15年11月3日这一年内? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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.YLJGD... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | what are the three most commonly ordered drugs since 2103 for patients 50s? | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', medication.drugstarttime) >= '2103' GROUP BY medication.drugn... | eicu |
CREATE TABLE table_19539 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | Lorne Henning has the lowest pick# of? | SELECT MIN("Pick #") FROM table_19539 | wikisql |
CREATE TABLE table_name_2 (
period VARCHAR,
model VARCHAR
) | In what time period was the Cessna 208 built? | SELECT period FROM table_name_2 WHERE model = "cessna 208" | sql_create_context |
CREATE TABLE table_16372244_1 (
all_games VARCHAR,
team VARCHAR
) | What is the all games for Maryland? | SELECT all_games FROM table_16372244_1 WHERE team = "Maryland" | sql_create_context |
CREATE TABLE table_59492 (
"Name" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"Total Apps" text,
"Total Goals" real
) | What is the total goals for Mark Ward? | SELECT MIN("Total Goals") FROM table_59492 WHERE "Name" = 'mark ward' | 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... | 哪些何静姝患者的检验报告单对应的检验结果指标均异常以及检验报告单号都是多少呢? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '何静姝' AND NOT ... | css |
CREATE TABLE table_59657 (
"Year recorded" text,
"Title" text,
"Genre" text,
"Label" text,
"Year inducted" text
) | What genre is the song recorded in 1929? | SELECT "Genre" FROM table_59657 WHERE "Year recorded" = '1929' | wikisql |
CREATE TABLE qtb (
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... | 就诊号98859690285全部的医疗费用 | SELECT qtb.MED_AMOUT FROM qtb WHERE qtb.MED_CLINIC_ID = '98859690285' UNION SELECT gyb.MED_AMOUT FROM gyb WHERE gyb.MED_CLINIC_ID = '98859690285' UNION SELECT zyb.MED_AMOUT FROM zyb WHERE zyb.MED_CLINIC_ID = '98859690285' UNION SELECT mzb.MED_AMOUT FROM mzb WHERE mzb.MED_CLINIC_ID = '98859690285' | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | how many patients had int insert dual-cham dev on urgent admission? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Int insert dual-cham dev" | mimicsql_data |
CREATE TABLE table_74968 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | Which Prothrombin time has a Platelet count of unaffected, and a Bleeding time of unaffected, and a Partial thromboplastin time of normal or mildly prolonged? | SELECT "Prothrombin time" FROM table_74968 WHERE "Platelet count" = 'unaffected' AND "Bleeding time" = 'unaffected' AND "Partial thromboplastin time" = 'normal or mildly prolonged' | 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 was hired before 2002-06-21, visualize a line chart about the change of manager_id over hire_date . | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE table_12043 (
"Year" real,
"Film name" text,
"Music director" text,
"Lyricist" text,
"Language" text
) | What 1972 Hindi film had Ravindra Jain directing the music? | SELECT "Film name" FROM table_12043 WHERE "Year" > '1972' AND "Language" = 'hindi' AND "Lyricist" = 'ravindra jain' AND "Music director" = 'ravindra jain' | wikisql |
CREATE TABLE table_27268 (
"English" text,
"Slovianski" text,
"\u0421\u043b\u043e\u0432\u0458\u0430\u043d\u0441\u043a\u0438" text,
"Russian" text,
"Ukrainian" text,
"Belarusian" text,
"Polish" text,
"Czech" text,
"Slovak" text,
"Upper Sorbian" text,
"Slovene" text,
"Croat... | What is every value for Croatian when value for English is dog? | SELECT "Croatian" FROM table_27268 WHERE "English" = 'dog' | wikisql |
CREATE TABLE table_11111116_7 (
title VARCHAR,
written_by VARCHAR
) | What was the titles of the episodes written by ken lazebnik? | SELECT title FROM table_11111116_7 WHERE written_by = "Ken LaZebnik" | sql_create_context |
CREATE TABLE table_name_23 (
high_points VARCHAR,
series VARCHAR
) | With a 0-2 series, what is the high points? | SELECT high_points FROM table_name_23 WHERE series = "0-2" | sql_create_context |
CREATE TABLE table_name_95 (
series VARCHAR,
opponent VARCHAR,
game VARCHAR
) | Opponent of edmonton oilers, and a Game of 3 is what series? | SELECT series FROM table_name_95 WHERE opponent = "edmonton oilers" AND game = 3 | sql_create_context |
CREATE TABLE table_name_9 (
per_capita_income VARCHAR,
county VARCHAR
) | What is the per capital income for Charles county? | SELECT per_capita_income FROM table_name_9 WHERE county = "charles" | sql_create_context |
CREATE TABLE table_203_37 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"performer(s)" text,
"length" text
) | which song comes directly before down the charts ? | SELECT "title" FROM table_203_37 WHERE "#" = (SELECT "#" FROM table_203_37 WHERE "title" = '"down the charts"') - 1 | squall |
CREATE TABLE table_38214 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What is the score of the 1996 Emarate cup on March 25, 1996? | SELECT "Score" FROM table_38214 WHERE "Competition" = '1996 emarate cup' AND "Date" = 'march 25, 1996' | wikisql |
CREATE TABLE table_27700 (
"Round" real,
"Circuit" text,
"Location" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Supporting" text
) | How many rounds did Alex Ardoin achieved a fastest lap? | SELECT COUNT("Round") FROM table_27700 WHERE "Fastest lap" = 'Alex Ardoin' | wikisql |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
hi... | how much does it cost to RENTAL CAR in TACOMA | SELECT DISTINCT ground_service.ground_fare FROM city, ground_service WHERE city.city_name = 'TACOMA' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | atis |
CREATE TABLE table_24101118_1 (
socket VARCHAR,
brand_name VARCHAR
) | what is the socket that has a brand name of core 2 extreme? | SELECT socket FROM table_24101118_1 WHERE brand_name = "Core 2 Extreme" | sql_create_context |
CREATE TABLE table_18256 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | how many district with incumbent being lindy boggs | SELECT COUNT("District") FROM table_18256 WHERE "Incumbent" = 'Lindy Boggs' | 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... | what is the minimum age of patients who have a government insurance policy and the year of death is before 2133? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.dod_year < "2133.0" | mimicsql_data |
CREATE TABLE table_12034 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which venue did North Melbourne play away with a crowd greater than 30,000? | SELECT "Venue" FROM table_12034 WHERE "Crowd" > '30,000' AND "Away team" = 'north melbourne' | wikisql |
CREATE TABLE classification (
id int,
msid int,
gid int
)
CREATE TABLE genre (
gid int,
genre text
)
CREATE TABLE tags (
id int,
msid int,
kid int
)
CREATE TABLE cast (
id int,
msid int,
aid int,
role text
)
CREATE TABLE actor (
aid int,
gender text,
name ... | Who was the actor that played ' Vinny Gambini ' in the movie ' My Cousin Vinny ' ? | SELECT actor.name FROM actor, cast, movie WHERE cast.aid = actor.aid AND cast.role = 'Vinny Gambini' AND movie.mid = cast.msid AND movie.title = 'My Cousin Vinny' | imdb |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_... | what is the ingesting method of methimazole? | SELECT DISTINCT prescriptions.route FROM prescriptions WHERE prescriptions.drug = 'methimazole' | mimic_iii |
CREATE TABLE table_name_63 (
date VARCHAR,
surface VARCHAR,
event VARCHAR
) | When has a surface of road and an event of half marathon? | SELECT date FROM table_name_63 WHERE surface = "road" AND event = "half marathon" | sql_create_context |
CREATE TABLE table_20766 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text
) | What is the largest crowd when essendon is the home team? | SELECT MAX("Crowd") FROM table_20766 WHERE "Home team" = 'Essendon' | wikisql |
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,
... | 编码为18482943的团伙成员最常去的医生排序是什么? | SELECT gwyjzb.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '18482943' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '18482943' GROUP BY fgwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) ... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.