context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
acti... | What is the correlation between faculty members who participated in at least one activity and the number of activities they participated in? Visualize with a scatter chart. | SELECT COUNT(*), T1.FacID FROM Faculty AS T1 JOIN Faculty_Participates_in AS T2 ON T1.FacID = T2.FacID GROUP BY T1.FacID | nvbench |
CREATE TABLE table_name_69 (
opponent_in_the_final VARCHAR,
date VARCHAR
) | Who played the final match on November 23, 1998? | SELECT opponent_in_the_final FROM table_name_69 WHERE date = "november 23, 1998" | sql_create_context |
CREATE TABLE table_68956 (
"Sport" text,
"Competition name" text,
"Competing entities" text,
"Age groups" text,
"Held every" text
) | what is the sport when the age group is 21 or younger and the competition name is world youth netball championships? | SELECT "Sport" FROM table_68956 WHERE "Age groups" = '21 or younger' AND "Competition name" = 'world youth netball championships' | wikisql |
CREATE TABLE table_38616 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | What is the lowest number of played games of the team with less than 12 drawns, 41 against, and less than 69 points? | SELECT MIN("Played") FROM table_38616 WHERE "Drawn" < '12' AND "Against" = '41' AND "Points" < '69' | wikisql |
CREATE TABLE table_27304 (
"Team" text,
"#" real,
"Primary Sponsor" text,
"Driver(s)" text,
"Listed Owner(s)" text,
"Engine" text,
"Chassis" text
) | What chassis is on the car repped by team rahal letterman lanigan racing? | SELECT "Chassis" FROM table_27304 WHERE "Team" = 'Rahal Letterman Lanigan Racing' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Return a bar chart about the distribution of All_Road and School_ID , list by the y-axis from low to high. | SELECT All_Road, School_ID FROM basketball_match ORDER BY School_ID | nvbench |
CREATE TABLE table_name_85 (
home_team VARCHAR,
attendance VARCHAR
) | What is the home team at the game with an Attendance of 2,029? | SELECT home_team FROM table_name_85 WHERE attendance = "2,029" | sql_create_context |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescript... | Comments containing the given two keywords (case insensitive). | SELECT Id AS "comment_link", Text, UserId AS "user_link", CreationDate FROM Comments WHERE (Text LIKE '%##Word1?student##%' COLLATE Latin1_General_CI_AI) AND (Text LIKE '%##Word2?homework##%' COLLATE Latin1_General_CI_AI) ORDER BY CreationDate | sede |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | what is the daily maximum value of potassium of patient 007-11182 on the last hospital visit? | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-11182' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospital... | eicu |
CREATE TABLE table_79622 (
"Model" text,
"Years" text,
"Type/code" text,
"Power@rpm" text,
"Torque@rpm" text
) | What year was the SL 350 Model? | SELECT "Years" FROM table_79622 WHERE "Model" = 'sl 350' | wikisql |
CREATE TABLE table_name_66 (
attendance VARCHAR,
venue VARCHAR
) | Which Attendance that has a Venue of ryavallen? | SELECT attendance FROM table_name_66 WHERE venue = "ryavallen" | sql_create_context |
CREATE TABLE table_204_121 (
id number,
"year" text,
"game" text,
"developer" text,
"setting" text,
"platform" text,
"notes" text
) | what game was produced in 1997 , theme hospital or mad tv 2 ? | SELECT "game" FROM table_204_121 WHERE "year" = 1997 AND "game" IN ('theme hospital', 'mad tv 2') | squall |
CREATE TABLE table_59402 (
"State" text,
"Born/Died" text,
"Active service" text,
"Chief Judge" text,
"Senior status" text,
"Appointed by" text,
"Reason for termination" text
) | Which Senior status has Appointed by of l. johnson category:articles with hcards, and Born/Died of 1918 2009? | SELECT "Senior status" FROM table_59402 WHERE "Appointed by" = 'l. johnson category:articles with hcards' AND "Born/Died" = '1918–2009' | wikisql |
CREATE TABLE table_name_36 (
college VARCHAR,
pick__number VARCHAR
) | Pick # of 331 went to which college? | SELECT college FROM table_name_36 WHERE pick__number = 331 | sql_create_context |
CREATE TABLE table_204_532 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
) | the club placed 19th before placing what place ? | SELECT "place" FROM table_204_532 WHERE "season" > (SELECT "season" FROM table_204_532 WHERE "place" = 19) ORDER BY "season" LIMIT 1 | squall |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE i... | how many hours have elapsed since the first time patient 027-178044 received a anticoagulant administration - low molecular weight heparin treatment in this hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-17804... | eicu |
CREATE TABLE table_2503 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Language(s)" text,
"Director" text,
"Result" text
) | Name the year for japanese | SELECT "Year (Ceremony)" FROM table_2503 WHERE "Language(s)" = 'Japanese' | wikisql |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count num... | Your question is not welcome here!. | SELECT c.Id, c.PostId, c.Score, c.Text, c.UserId, 'https://askubuntu.com/questions/' + CAST(PostId AS TEXT(6)) AS "Link" FROM Comments AS c WHERE UPPER(Text) LIKE UPPER('%belongs on%') ORDER BY CreationDate | sede |
CREATE TABLE table_1805191_14 (
candidates VARCHAR,
first_elected VARCHAR,
party VARCHAR
) | Who were the candidates when the first elected was a republican in 1998? | SELECT candidates FROM table_1805191_14 WHERE first_elected = 1998 AND party = "Republican" | sql_create_context |
CREATE TABLE table_name_19 (
opp_team VARCHAR,
big_ten_team VARCHAR
) | Who was Purdue's opponent? | SELECT opp_team FROM table_name_19 WHERE big_ten_team = "purdue" | sql_create_context |
CREATE TABLE table_30311 (
"Year Location" text,
"Mens Singles" text,
"Womens Singles" text,
"Mens Doubles" text,
"Womens Doubles" text
) | How many players are there for mens singles when chen qi ma lin played mens doubles? | SELECT COUNT("Mens Singles") FROM table_30311 WHERE "Mens Doubles" = 'Chen Qi Ma Lin' | wikisql |
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 ... | during their current hospital encounter how many days have passed since patient 97395's last diagnosis of lumbosacral neuritis nos? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'lumbosacral neuritis nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM adm... | mimic_iii |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
... | statistics on user displaynames per reputation. shows number of users per reputation group (logarithm) that kept their default username or changed it. | SELECT *, ROUND(CAST('default' AS FLOAT) / 'total' * 100, 1) AS percentage FROM (SELECT SUM(CASE WHEN DisplayName = 'user' + CAST(Id AS TEXT) THEN 1 ELSE 0 END) AS "default", SUM(CASE WHEN DisplayName LIKE 'user%' AND NOT DisplayName = 'user' + CAST(Id AS TEXT) THEN 1 ELSE 0 END) AS "merged?", SUM(CASE WHEN NOT Display... | sede |
CREATE TABLE table_75816 (
"Chord" text,
"Root" text,
"Major third" text,
"Perfect fifth" text,
"Minor seventh" text
) | What is the Perfect fifth with a Minor that is seventh of d? | SELECT "Perfect fifth" FROM table_75816 WHERE "Minor seventh" = 'd' | wikisql |
CREATE TABLE table_66987 (
"Ship" text,
"Pennant number" text,
"Laid down" text,
"Launched" text,
"Completed" text
) | Name the pennant number for completion of 30 october 1934 and launched 29 march 1934 | SELECT "Pennant number" FROM table_66987 WHERE "Launched" = '29 march 1934' AND "Completed" = '30 october 1934' | wikisql |
CREATE TABLE table_name_93 (
week INTEGER,
date VARCHAR
) | What is the Week number on October 5, 2003? | SELECT MIN(week) FROM table_name_93 WHERE date = "october 5, 2003" | sql_create_context |
CREATE TABLE table_34953 (
"Region/country" text,
"1985-1990" real,
"1990-1995" real,
"1995-2000" real,
"2000-2005" real
) | What's China's highest 1985-1990 assuming a 2000-2005 larger than 3.08? | SELECT MAX("1985-1990") FROM table_34953 WHERE "Region/country" = 'china' AND "2000-2005" > '3.08' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age te... | indicate the daily maximum amount of respiration for patient 011-31229 in 08/2105. | SELECT MAX(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-31229')) AND NOT vitalperiodic.respiration IS ... | eicu |
CREATE TABLE table_47505 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What New Delhi Competition has a Result of Loss? | SELECT "Competition" FROM table_47505 WHERE "Venue" = 'new delhi' AND "Result" = 'loss' | wikisql |
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 Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | , I want to list from high to low by the total number of card number. | SELECT card_type_code, SUM(card_number) FROM Customers_Cards GROUP BY card_type_code ORDER BY SUM(card_number) DESC | nvbench |
CREATE TABLE table_name_25 (
country VARCHAR,
to_par VARCHAR,
score VARCHAR
) | What country has a To par of +1 and the score of 71-76-70=217? | SELECT country FROM table_name_25 WHERE to_par = "+1" AND score = 71 - 76 - 70 = 217 | sql_create_context |
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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CR... | a flight from BALTIMORE to SAN FRANCISCO arriving between 1700 and 2000 | SELECT DISTINCT flight_id FROM flight WHERE (((arrival_time <= 2000 AND arrival_time >= 1700) AND to_airport IN (SELECT AIRPORT_SERVICEalias1.airport_code FROM airport_service AS AIRPORT_SERVICEalias1 WHERE AIRPORT_SERVICEalias1.city_code IN (SELECT CITYalias1.city_code FROM city AS CITYalias1 WHERE CITYalias1.city_nam... | atis |
CREATE TABLE table_40982 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
) | What is the number of Matches for Vits Rimkus with a Rank of less than 3? | SELECT AVG("Matches") FROM table_40982 WHERE "Name" = 'vits rimkus' AND "Rank" < '3' | wikisql |
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,
... | 被诊断为疾病F95.742的患者张兴邦,他的检测指标517400的结果定量和单位如何 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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... | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | how many hours it has been since the first time patient 011-55642 was diagnosed with acute respiratory failure during their current hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-55642... | eicu |
CREATE TABLE table_name_5 (
result VARCHAR,
round VARCHAR
) | What was the result of the second round? | SELECT result FROM table_name_5 WHERE round = "second round" | sql_create_context |
CREATE TABLE table_name_93 (
colours VARCHAR,
house_name VARCHAR
) | What colours have a House Name of ogun? | SELECT colours FROM table_name_93 WHERE house_name = "ogun" | sql_create_context |
CREATE TABLE table_train_238 (
"id" int,
"hemoglobin_a1c_hba1c" float,
"fasting_c_peptide" float,
"hba1c" float,
"allergy_to_mammalian_derived_drug_preparations" bool,
"body_mass_index_bmi" float,
"renal_transplantation" bool,
"NOUSE" float
) | fasting c _ peptide greater than or equal to 0.8 ng / ml. | SELECT * FROM table_train_238 WHERE fasting_c_peptide >= 0.8 | criteria2sql |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
econ... | show me the flights on DL that go through ATLANTA | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight, flight_stop WHERE city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight_stop.stop_airport = airport_service.airport_code AND flight.airline_code = 'DL' AND flight.flight_id = flight_stop.flight_id | atis |
CREATE TABLE table_name_24 (
total VARCHAR,
country VARCHAR
) | What was the total of the player from Spain? | SELECT total FROM table_name_24 WHERE country = "spain" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | Find the number of hispanic or latino-puerto rican patients who have lide4500i drug code. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.formulary_drug_cd = "LIDE4500I" | mimicsql_data |
CREATE TABLE table_736 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | how many first elected with district being north carolina 2 | SELECT COUNT("First elected") FROM table_736 WHERE "District" = 'North Carolina 2' | wikisql |
CREATE TABLE table_31667 (
"Year" text,
"Competition" text,
"Opponent" text,
"Score" text,
"Venue" text
) | Where was the match with a score of 18.6 (114) - 21.14 (140)? | SELECT "Venue" FROM table_31667 WHERE "Score" = '18.6 (114) - 21.14 (140)' | wikisql |
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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | what was the number of times that patient 17462 received .9% normal saline during this hospital visit? | SELECT COUNT(*) 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 = 17462 AND admissions.dischtime IS NULL)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WH... | mimic_iii |
CREATE TABLE table_203_357 (
id number,
"artist" text,
"song" text,
"soundtrack" text,
"episode(s)" text,
"notes" text
) | the artist ash only had one song that appeared in the o.c. what is the name of that song ? | SELECT "song" FROM table_203_357 WHERE "artist" = 'ash' | squall |
CREATE TABLE table_name_37 (
prominence__m_ INTEGER,
peak VARCHAR,
elevation__m_ VARCHAR
) | Which Prominence (m) has a Peak of nakanai mountains high point, and an Elevation (m) smaller than 2,316? | SELECT AVG(prominence__m_) FROM table_name_37 WHERE peak = "nakanai mountains high point" AND elevation__m_ < 2 OFFSET 316 | sql_create_context |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | For each record in schedule, show the number of films for each day in a bar chart, and show from low to high by the bar please. | SELECT Date, COUNT(Date) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Date ORDER BY Date | nvbench |
CREATE TABLE table_name_74 (
home_team VARCHAR,
away_team VARCHAR
) | Who was the home team when the away team was Telford United? | SELECT home_team FROM table_name_74 WHERE away_team = "telford united" | sql_create_context |
CREATE TABLE table_69236 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | What is the first leg with an agg of 10-2? | SELECT "1st leg" FROM table_69236 WHERE "Agg." = '10-2' | wikisql |
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... | 范寒雁这个病人在一六年十二月二十四日以前的检验报告单是在哪些住院就诊的?查一下这些住院就诊的流水编码 | SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '范寒雁' AND NOT zyjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ >= '2016-12-24') | css |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 医疗机构6692074目前在院一共多少人? | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '6692074' AND t_kc21.HOSP_STS > 0 | css |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | 列出在医院4562632患者73880776的某次出院诊断结果是什么,其中出院诊断医生姓魏? | SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '73880776' AND t_kc21.MED_SER_ORG_NO = '4562632' AND t_kc21.OUT_DIAG_DOC_NM LIKE '魏%' | css |
CREATE TABLE table_24547593_1 (
date VARCHAR,
circuit VARCHAR
) | How many dates was knockhill? | SELECT COUNT(date) FROM table_24547593_1 WHERE circuit = "Knockhill" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treat... | what is the amount of hours it has elapsed since the last time patient 027-203413 had a ivpb 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 competition (
country VARCHAR,
competition_type VARCHAR
) | Find the countries that have never participated in any competition with Friendly type. | SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly' | sql_create_context |
CREATE TABLE table_test_21 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"tachycardia" int,
"body_weight" float,
"renal_disease" bool,
"anaemia" bool,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"cardiogenic_shock" bool,
... | known severe renal failure ( egfr < 30 ml / min / 1.73 m2 ) or history of dialysis or renal transplant | SELECT * FROM table_test_21 WHERE renal_disease = 1 OR estimated_glomerular_filtration_rate_egfr < 30 OR history_of_dialysis = 1 OR renal_transplantation = 1 | criteria2sql |
CREATE TABLE fgwyjzb (
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,
... | 08630771病患在01年9月16日到21年7月12日之间在医疗机构8807369经历了多少次检查? | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '08630771' AND t_kc22.STA_DATE BETWEEN '2001-09-16' AND '2021-07-12' AND gwyjzb.MED_SER_ORG_NO = '8807369' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CL... | css |
CREATE TABLE table_37614 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
) | what was the score of bert yancey | SELECT "Score" FROM table_37614 WHERE "Player" = 'bert yancey' | wikisql |
CREATE TABLE fgwyjzb (
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,
... | 能知道医疗机构8227829金额排在前二十四名的项目吗 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '8227829' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.AMOUNT) DESC LIMIT 24 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_k... | css |
CREATE TABLE table_name_20 (
venue VARCHAR,
competition VARCHAR,
notes VARCHAR
) | What venue hsoted the european cross country championships with a notes of junior men individual 6.595km? | SELECT venue FROM table_name_20 WHERE competition = "european cross country championships" AND notes = "junior men individual 6.595km" | sql_create_context |
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 lab test category of subject id 2560? | SELECT lab."CATEGORY" FROM lab WHERE lab.subject_id = "2560" | mimicsql_data |
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
) | Draw a bar chart for what are the average prices of products, grouped by manufacturer name? | SELECT T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | nvbench |
CREATE TABLE table_5472 (
"Corps Name" text,
"Number of Finals Appearances" real,
"Year of First Appearance" real,
"Year of Most Recent Appearance" real,
"All Years of Finals Appearances" text
) | What is the average year of the most recent appearance of the Boston Crusaders, who had their first appearance after 1976? | SELECT AVG("Year of Most Recent Appearance") FROM table_5472 WHERE "Year of First Appearance" > '1976' AND "Corps Name" = 'boston crusaders' | wikisql |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases IN... | How many wines are there for each grape. | SELECT Grape, COUNT(*) FROM wine GROUP BY Grape | nvbench |
CREATE TABLE table_name_86 (
money___ INTEGER,
player VARCHAR
) | What are Tiger Woods' average earnings? | SELECT AVG(money___) AS $__ FROM table_name_86 WHERE player = "tiger woods" | sql_create_context |
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... | 08728091这个患者曾有过什么异常情况? | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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.... | css |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | how many days have elapsed since the first time patient 20898 was given a lactate lab test on the current hospital encounter? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'lactate') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20898 AND admissions.... | mimic_iii |
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... | count the number of patients whose primary disease is newborn and lab test fluid is blood? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE table_25055 (
"African rank" real,
"World rank" real,
"Nation" text,
"GDP per capita" text,
"Total GDP world rank" real
) | How many items are listed under gdp per capita under the nation of Burkina Faso? | SELECT COUNT("GDP per capita") FROM table_25055 WHERE "Nation" = 'Burkina Faso' | wikisql |
CREATE TABLE table_62268 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | What is Score, when Record is '2-0'? | SELECT "Score" FROM table_62268 WHERE "Record" = '2-0' | 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 ... | 从13年7月14日到15年10月11日,4563605的显微创伤外科在接诊过程中处理了多少住院就诊数 | SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '4563605' AND zyjzjlb.JZKSMC = '显微创伤外科' AND zyjzjlb.RYDJSJ BETWEEN '2013-07-14' AND '2015-10-11' | css |
CREATE TABLE transactions_lots (
transaction_id number,
lot_id number
)
CREATE TABLE lots (
lot_id number,
investor_id number,
lot_details text
)
CREATE TABLE purchases (
purchase_transaction_id number,
purchase_details text
)
CREATE TABLE transactions (
transaction_id number,
inv... | Show the average amount of transactions for different lots, ordered by average amount of transactions. | SELECT T2.lot_id, AVG(amount_of_transaction) FROM transactions AS T1 JOIN transactions_lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) | spider |
CREATE TABLE table_1771753_3 (
driver VARCHAR,
season VARCHAR
) | When 2005 is the season how many drivers are there? | SELECT COUNT(driver) FROM table_1771753_3 WHERE season = "2005" | sql_create_context |
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE publication (
abstract varchar,
cid in... | return me the keywords, which have been contained by more than 10 papers of ' H. V. Jagadish ' . | SELECT keyword.keyword FROM author, keyword, publication, publication_keyword, writes WHERE author.name = 'H. V. Jagadish' AND publication_keyword.kid = keyword.kid AND publication.pid = publication_keyword.pid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY keyword.keyword HAVING COUNT(DISTINCT (... | academic |
CREATE TABLE table_72326 (
"Perfect stem" text,
"Future stem" text,
"Imperfect stem" text,
"Short stem" text,
"Meaning" text
) | What is the perfect stem for pozten? | SELECT "Perfect stem" FROM table_72326 WHERE "Imperfect stem" = 'pozten' | wikisql |
CREATE TABLE table_name_11 (
college_junior_club_team__league_ VARCHAR,
round VARCHAR,
nationality VARCHAR
) | What college or club did the round 9 draft pick from Canada come from? | SELECT college_junior_club_team__league_ FROM table_name_11 WHERE round = 9 AND nationality = "canada" | sql_create_context |
CREATE TABLE table_name_20 (
year VARCHAR,
college VARCHAR,
pick VARCHAR,
position VARCHAR
) | How many years have a Pick of 12, and a Position of dt, and a College of penn state? | SELECT COUNT(year) FROM table_name_20 WHERE pick = "12" AND position = "dt" AND college = "penn state" | sql_create_context |
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 text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is drug type of subject name stephanie suchan? | SELECT prescriptions.drug_type FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
CREATE TABLE table_203_371 (
id number,
"round" number,
"opponent" text,
"result" text,
"bro." number,
"opp." number,
"date" text,
"venue" text,
"crowd" number,
"position" text
) | what was the total number of games played ? | SELECT COUNT(*) FROM table_203_371 | squall |
CREATE TABLE table_203_33 (
id number,
"conference" text,
"date" text,
"place" text,
"attendance" number,
"archive of presentations" text
) | what was the only conference to have an attendance over 1,000 ? | SELECT "conference" FROM table_203_33 WHERE "attendance" > 1000 | squall |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
... | Top user in Ahmedabad, India. | SELECT Users.Id AS user_id, Users.DisplayName, Users.Reputation, Users.WebsiteUrl, Users.Location, Tags.TagName FROM Users JOIN Posts ON Posts.OwnerUserId = Users.Id JOIN PostTags ON PostTags.PostId = Posts.Id JOIN Tags ON PostTags.TagId = Tags.Id WHERE LOWER(Users.Location) LIKE '%ahmedabad%' AND LOWER(Tags.TagName) =... | sede |
CREATE TABLE table_41334 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | How many laps had a time stat of accident for the rider carmelo morales when the grid was more than 25? | SELECT SUM("Laps") FROM table_41334 WHERE "Time" = 'accident' AND "Rider" = 'carmelo morales' AND "Grid" > '25' | wikisql |
CREATE TABLE table_16130 (
"No." real,
"#" real,
"Title" text,
"Director" text,
"Writer" text,
"US air date" text,
"Storyteller" text,
"Villains" text
) | Who are the villains in the episode titled 'The Tale of the Forever Game'? | SELECT "Villains" FROM table_16130 WHERE "Title" = 'The Tale of The Forever Game' | wikisql |
CREATE TABLE table_53444 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the date when the crowd was larger than 30,495? | SELECT "Date" FROM table_53444 WHERE "Crowd" > '30,495' | wikisql |
CREATE TABLE table_name_49 (
construction_completed VARCHAR,
listed VARCHAR,
name VARCHAR
) | What is the Construction that has a Listed 09/08/1983, and a Name of cecil lindsey? | SELECT construction_completed FROM table_name_49 WHERE listed = "09/08/1983" AND name = "cecil lindsey" | sql_create_context |
CREATE TABLE table_train_270 (
"id" int,
"gender" string,
"allergy_to_omega_3" bool,
"serum_low_density_lipoprotein_cholesterol" int,
"stimulated_c_peptide" float,
"allergy_to_dha" bool,
"allergy_to_vitamin_d" bool,
"serum_triglyceride" int,
"age" float,
"NOUSE" float
) | male and female 18 to 80 years of age | SELECT * FROM table_train_270 WHERE (gender = 'male' OR gender = 'female') AND (age >= 18 AND age <= 80) | criteria2sql |
CREATE TABLE table_203_366 (
id number,
"pos" number,
"class" text,
"no" number,
"team" text,
"drivers" text,
"chassis" text,
"engine" text,
"laps" number
) | what other team only completed 183 laps with holman & moody ? | SELECT "team" FROM table_203_366 WHERE "team" <> 'holman & moody' AND id = (SELECT id FROM table_203_366 WHERE "team" = 'holman & moody' AND "laps" = 183) | squall |
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_des... | Return the number of the completion date for all the tests that have 'Fail' result, and list Y in asc order. | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY COUNT(date_of_completion) | nvbench |
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
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_assignment (
technician_id int,
... | Show names of technicians who are assigned to repair machines with value point more than 70, and count them by a bar chart | SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id WHERE T2.value_points > 70 GROUP BY Name | nvbench |
CREATE TABLE table_30839 (
"By-election" real,
"Electorate" text,
"Date" text,
"Incumbent" text,
"Reason" text,
"Winner" text
) | When james seaton is the incumbent what is the reason? | SELECT "Reason" FROM table_30839 WHERE "Incumbent" = 'James Seaton' | wikisql |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | For each film, show the price and group them by cinema name in a stacked bar chart, and sort Name in desc order. | SELECT Name, Price FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Title, Name ORDER BY Name DESC | nvbench |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Ln... | How many students are advised by each rank of faculty? List the rank and the number of students in a bar chart, sort in desc by the the total number . | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester i... | What ASIANLAN prerequisites are needed for CS majors ? | SELECT DISTINCT course.department, course.name, course.number FROM program_course INNER JOIN course ON program_course.course_id = course.course_id WHERE course.department = 'ASIANLAN' | advising |
CREATE TABLE table_44042 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text
) | What opponent used the Ko method, and a 6-0 record? | SELECT "Opponent" FROM table_44042 WHERE "Method" = 'ko' AND "Record" = '6-0' | 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 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 did not have any job in the past, give me the trend about salary over hire_date , I want to sort by the HIRE_DATE from high to low please. | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC | nvbench |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | what is the number of patients whose ethnicity is american indian/alaska native and procedure icd9 code is 4575? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND procedures.icd9_code = "4575" | mimicsql_data |
CREATE TABLE table_name_4 (
position VARCHAR,
player VARCHAR,
nationality VARCHAR,
round VARCHAR
) | WHAT IS THE POSITION FOR CANADA, ROUND SMALLER THAN 7, PLAYER ZACH BOYCHUK? | SELECT position FROM table_name_4 WHERE nationality = "canada" AND round < 7 AND player = "zach boychuk" | sql_create_context |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
Par... | Probable tag creations for a specific user. | SELECT p.Id AS "post_link", t.TagName FROM (SELECT pt.TagId, MIN(p.CreationDate) AS CreationDate FROM PostTags AS pt INNER JOIN Posts AS p ON p.Id = pt.PostId GROUP BY pt.TagId) AS temp INNER JOIN PostTags AS pt ON pt.TagId = temp.TagId INNER JOIN Posts AS p ON p.Id = pt.PostId AND p.CreationDate = temp.CreationDate IN... | sede |
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... | count the number of patients whose admission type is elective and procedure icd9 code is 252? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "252" | mimicsql_data |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE ground_service (
... | what flights from DETROIT to ST. PETERSBURG | 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 = 'DETROIT' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. PE... | atis |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.