db_id
stringclasses
11 values
instruction
stringlengths
1.63k
14k
role
stringclasses
45 values
policy
unknown
input
stringlengths
23
477
output
stringlengths
23
2.22k
difficulty
stringclasses
3 values
metadata
dict
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP >= 300 AND T1.Admission = '+';
simple
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID)\nFROM Patient AS T1\nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID\nWHERE T2.ALP >= 300 AND T1.Admission = '+';", "permission": "allowed", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "ALP", "ID" ] }, "m...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP < 300 AND T1.Admission = '-'
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) \nFROM Patient AS T1 \nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID \nWHERE T2.ALP < 300 \nAND T1.Admission = '-'", "permission": "allowed", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "ALP", "ID" ] }, ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Please list the diagnosis of the patients whose total protein is lower than normal.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "ID", "TP" ] }, "missing_columns": { "laboratory": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
For the patients who are diagnosed with SJS, how many of them have a normal level of total protein?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SJS' AND T2.TP > 6.0 AND T2.TP < 8.5", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "ID", "TP" ]...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
What is the examination date of the patient whose albumin is the highest in the normal range?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT Date FROM Laboratory WHERE ALB > 3.5 AND ALB < 5.5 ORDER BY ALB DESC LIMIT 1", "permission": "denied", "query_columns": { "laboratory": [ "ALB" ] }, "missing_columns": { "laboratory": [ "ALB" ] }, "reason": "Missing column permissions: laboratory: ALB", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
How many male patients have a normal level of both albumin and total protein?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.ALB > 3.5 AND T2.ALB < 5.5 AND T2.TP BETWEEN 6.0 AND 8.5", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ALB", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
What is the anti Cardiolipin antibody concentration of the female patient with the highest uric acid level above 6.5?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT T3.`aCL IgG`, T3.`aCL IgM`, T3.`aCL IgA` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T1.SEX = 'F' AND T2.UA > 6.5 ORDER BY T2.UA DESC, T1.ID ASC LIMIT 1", "permission": "denied", "query_columns": { "patient": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
What is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT MAX(T2.ANA) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T1.ID = T3.ID WHERE T3.CRE < 1.5", "permission": "denied", "query_columns": { "patient": [ "ID" ], "examination": [ "ANA", "ID" ], "laboratory": [...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Please list the patient's ID whose creatinine level is normal and whose anti Cardiolipin antibody concentration level is the highest.
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T2.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.CRE < 1.5 AND T2.`aCL IgA` IS NOT NULL ORDER BY T2.`aCL IgA` DESC LIMIT 1", "permission": "denied", "query_columns": { "examination": [ "ID", "aCL IgA" ], "laboratory": [ "CRE", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Among the patients whose total bilirubin is over the normal range, how many of them have a peripheral pattern observed in the sheet of ANA examination?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-BIL` >= 2 AND T3.`ANA Pattern` LIKE '%P%'", "permission": "denied", "query_columns": { "patient": [ "ID" ], "examination": [ "ANA Pat...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
What is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T1.ANA FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` < 2.0 ORDER BY T2.`T-BIL` DESC LIMIT 1", "permission": "denied", "query_columns": { "examination": [ "ANA", "ID" ], "laboratory": [ "ID", "T-BIL" ] }, "miss...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
For the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-CHO` >= 250 AND T3.KCT = '-'", "permission": "denied", "query_columns": { "patient": [ "ID" ], "examination": [ "ID", "KCT" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Among the patients whose total cholesterol is within the normal range, how many of them have a P pattern observed in the sheet of ANA examination?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) AS qualified_patient_count\nFROM Patient AS T1\nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID \nINNER JOIN Examination AS T3 ON T1.ID = T3.ID \nWHERE \n T2.`T-CHO` < 250 \n AND T3.`ANA Pattern` = 'P';", "permission": "denied", "query_columns": { "patient": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Among the patients with the normal level of triglyceride, how many of them have other symptoms observed?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) \nFROM Examination AS T1 \nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID \nWHERE T2.TG < 200 \nAND T1.Symptoms IS NOT NULL", "permission": "denied", "query_columns": { "examination": [ "ID", "Symptoms" ], "laboratory": [ "ID", "TG" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
What is the disease name of the patient who has the highest level of triglyceride within the normal range?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T1.Diagnosis FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG < 200 ORDER BY T2.TG DESC LIMIT 1", "permission": "denied", "query_columns": { "examination": [ "Diagnosis", "ID" ], "laboratory": [ "ID", "TG" ] }, "missi...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 0 AND T1.CPK < 250", "permission": "denied", "query_columns": { "examination": [ "ID", "Thrombosis" ], "laboratory": [ "CPK", "ID" ] }, "missin...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.CPK < 250 AND (T3.KCT = '+' OR T3.RVVT = '+' OR T3.LAC = '+')", "permission": "denied", "query_columns": { "patient": [ "ID" ], "examination":...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
When is the birthday of the oldest patient whose blood glucose is abnormal?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU > 180 ORDER BY T1.Birthday ASC LIMIT 1", "permission": "denied", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "GLU", "ID" ] }, "missing_...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Among the patients with a normal blood glucose, how many of them don't have thrombosis?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.GLU < 180 AND T3.Thrombosis = 0", "permission": "denied", "query_columns": { "patient": [ "ID" ], "examination": [ "ID", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
How many patients accepted to the hospital have a normal level of white blood cells?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'
moderate
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'", "permission": "allowed", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "ID", "WBC" ] }, "mis...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
How many patients diagnosed with SLE have a normal white blood cell level?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.WBC BETWEEN 3.5 AND 9
simple
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.WBC BETWEEN 3.5 AND 9", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "ID", "WBC" ] }, "m...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Please list the patient's ID if he or she has an abnormal level of red blood cell and is followed at the outpatient clinic.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'
challenging
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'", "permission": "allowed", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "ID", "RBC" ] }...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Among the patients who have a normal platelet level, how many of them have other symptoms observed?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 100 AND T2.PLT < 400 AND T1.Diagnosis IS NOT NULL
moderate
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 100 AND T2.PLT < 400 AND T1.Diagnosis IS NOT NULL", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "ID", "PLT" ] ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.
SELECT T2.PLT FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'MCTD' AND T2.PLT BETWEEN 100 AND 400
moderate
{ "gold_sql": "SELECT T2.PLT FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'MCTD' AND T2.PLT BETWEEN 100 AND 400", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "ID", "PLT" ] }, "miss...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
For the male patients that have a normal prothrombin time, what is their average prothrombin time?
SELECT AVG(T2.PT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PT < 14 AND T1.SEX = 'M'
simple
{ "gold_sql": "SELECT AVG(T2.PT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PT < 14 AND T1.SEX = 'M'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ID", "PT" ] }, "missing_columns": {}, "reason"...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_2
{ "Laboratory": [ "ALP", "APTT", "C3", "C4", "CPK", "CRE", "CRP", "DNA-II", "FG", "GPT", "HGB", "ID", "IGA", "IGG", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RNP", "SSA", "T-CHO", "TAT", "TAT2", "U-PRO", "UA", ...
How many patients with severe thrombosis have a normal prothrombin time?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.PT < 14 AND T3.Thrombosis < 3 AND T3.Thrombosis > 0", "permission": "denied", "query_columns": { "patient": [ "ID" ], "examination": [ "...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Are there more in-patient or outpatient who were male? What is the deviation in percentage?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M'", "permission": "denied", "query_columns": { "patient": [ "Admission", "SEX" ] }, "missing_columns": { "patient": [...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the percentage of female patient were born after 1930?
SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "SEX" ] }, "missing_columns": {}, "reason": "All required columns ar...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For patient born between Year 1930 to 1940, how many percent of them were inpatient?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE STRFTIME('%Y', Birthday) BETWEEN '1930' AND '1940'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Birthday" ] }, "missing_columns": { "patie...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT SUM(CASE WHEN Admission = '-' THEN 1.0 ELSE 0 END) / NULLIF(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END), 0) FROM Patient WHERE Diagnosis = 'SLE'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Diagnosis" ] }, "missing_columns": { "pati...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "Date", "ID" ] }, "missing_columns": { "lab...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had.
SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109
simple
{ "gold_sql": "SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "examination": [ "Examinatio...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
List the patient ID, sex and birthday of patient with LDH beyond normal range.
SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "laboratory": [ "ID", "LDH" ] }, "mis...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
State the ID and age of patient with positive degree of coagulation.
SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) AS Age FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'
moderate
{ "gold_sql": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) AS Age FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "examination": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For patients with severe degree of thrombosis, list their ID, sex and disease the patient is diagnosed with.
SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 2
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 2", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID", "SEX" ], "examination": [ "ID", "Thrombosis" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
List all patients who were born in 1937 whose total cholesterol was beyond the normal range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250
moderate
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "ID", "T-CHO" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.
SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID", "SEX" ], "laboratory": [ "ALB", "ID" ] }, "m...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the percentage of female patient had total protein not within the normal range?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND (T2.TP < 6.0 OR T2.TP > 8.5) THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "l...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For in-patients, what is the average IgG concentration measured when they were age 50 or above?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT AVG(T2.`aCL IgG`)\nFROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID \nWHERE STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) >= 50 AND T1.Admission = '+'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Birthday", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(*) FROM Patient WHERE STRFTIME('%Y', Description) = '1997' AND SEX = 'F' AND Admission = '-'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Description", "SEX" ] }, "missing_columns": { "patient": [ "Admission" ] },...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What was the age of the youngest patient when they initially arrived at the hospital?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT MIN(STRFTIME('%Y', `First Date`) - STRFTIME('%Y', Birthday)) FROM Patient", "permission": "denied", "query_columns": { "patient": [ "Birthday", "First Date" ] }, "missing_columns": { "patient": [ "First Date" ] }, "reason": "Missing column permission...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many of the patients with the most serious thrombosis cases examined in 1997 are women?
SELECT COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1
moderate
{ "gold_sql": "SELECT COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "examination": [ "Exa...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the age gap between the youngest and oldest patient with a normal triglyceride recorded?
SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200
moderate
{ "gold_sql": "SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "ID", "TG"...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.
SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1
simple
{ "gold_sql": "SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID" ], "examination": ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the year that concluded on December 31, 1998, how many male patients on average were tested in the lab each month?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M'", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "Date", "ID" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
The oldest SJS patient's latest medical laboratory work was completed on what date, and what age was the patient when they initially arrived at the hospital?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT Max(T1.Date) AS LatestLabDate, STRFTIME('%Y', T2.`First Date`) - STRFTIME('%Y', T2.Birthday) AS AgeFirstArrived,T2.Birthday FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T2.ID = (SELECT ID FROM Patient WHERE Diagnosis = 'SJS' AND Birthday IS NOT NULL ORDER BY Birthday ASC...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the ratio of male to female patients among all those with abnormal uric acid counts?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T2.UA <= 8.0 AND T1.SEX = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.UA <= 6.5 AND T1.SEX = 'F' THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND JULIANDAY(T2.`Examination Date`) - JULIANDAY(T1.`First Date`) >= 365", "permission": "denied", "query_columns": { "patient": [ "Admission", "First Date", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many underage patients were examined during the course of the three-year period from 1990 to 1993?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < 18
challenging
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < 18", "permission": "allowed", "query_columns": { "patient": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many male patients have elevated total bilirubin count?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M'
simple
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ID", "T-BIL" ] }, "missing_col...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985 and 12/31/1995?
SELECT T2.Diagnosis FROM Examination AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC, T2.Diagnosis DESC LIMIT 1
challenging
{ "gold_sql": "SELECT T2.Diagnosis FROM Examination AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC, T2.Diagnosis DESC LIMIT 1", "permission": "allowed", "query_columns": { "examination": ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the average age of patients as of year 1999 examined in the laboratory for the October of the year 1991?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT AVG('1999' - STRFTIME('%Y', T2.Birthday)) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.Date BETWEEN '1991-10-01' AND '1991-10-30'", "permission": "denied", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "Date", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How old was the patient who had the highest hemoglobin count on the date of laboratory tests , and what is the doctor's diagnosis?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday), T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HGB = (SELECT MAX(HGB) FROM Laboratory)", "permission": "denied", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?
SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'
simple
{ "gold_sql": "SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'", "permission": "allowed", "query_columns": { "examination": [ "ANA", "Examination Date", "ID" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?
SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'
simple
{ "gold_sql": "SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'", "permission": "allowed", "query_columns": { "laboratory": [ "ID", "T-CHO" ] }, "missing_columns": {}, "reason": "All required columns are permitted...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What was the gender of the first AORTITIS diagnosed patient?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT SEX FROM Patient WHERE Diagnosis = 'AORTITIS' AND `First Date` IS NOT NULL ORDER BY `First Date` ASC, ID DESC LIMIT 1", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID", "SEX" ] }, "missing_columns": { "patient": ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the patient who was diagnosed with SLE on 1994/2/19, what was his/her anti-Cardiolipin antibody concentration status on 1993/11/12?
SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'
moderate
{ "gold_sql": "SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'", "permission": "allowed", "query_columns": { "examination": [ "Diagnosis", "Examination Date",...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Was the patient a man or a woman whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9 AND T2.Date = '1992-06-12'", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "Date", "GPT", "ID" ] }, "missing_colu...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the patient who got the laboratory test of uric acid level as 8.4 on 1991-10-21, how old was he/she at that time?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT STRFTIME('%Y', T2.`Date`) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UA = 8.4 AND T2.`Date` = '1991-10-21'", "permission": "denied", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the patient who first came to the hospital on 1991/6/13 who was diagnosed with SJS, what is the total number of his/her Laboratory tests in 1995?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(*) FROM Laboratory WHERE ID = ( SELECT ID FROM Patient WHERE `First Date` = '1991-06-13' AND Diagnosis = 'SJS' ) AND STRFTIME('%Y', Date) = '1995'", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID" ], "laboratory": []...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the patient who was diagnosed SLE on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?
SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = ( SELECT ID FROM Examination WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' ORDER BY ID ASC LIMIT 1 ) AND T2.`Examination Date` = T1.`First Date`
challenging
{ "gold_sql": "SELECT T1.Diagnosis \nFROM Patient AS T1 \nINNER JOIN Examination AS T2 ON T1.ID = T2.ID \nWHERE T1.ID = ( \n SELECT ID \n FROM Examination \n WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' \n ORDER BY ID ASC \n LIMIT 1 \n) \nAND T2.`Examination Date` = T1.`First Date`", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?
SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'
simple
{ "gold_sql": "SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "examination": [ "Examination Da...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from November to December in 1981?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Bi...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Lists all patients by ID who were diagnosed with Behcet's and had their exams between 01/01/197 and 12/31/1997.
SELECT ID FROM Examination WHERE `Examination Date` BETWEEN '1997-01-01' AND '1997-12-31' AND Diagnosis = 'Behcet'
moderate
{ "gold_sql": "SELECT ID FROM Examination WHERE `Examination Date` BETWEEN '1997-01-01' AND '1997-12-31' AND Diagnosis = 'Behcet'", "permission": "allowed", "query_columns": { "examination": [ "Diagnosis", "Examination Date", "ID" ] }, "missing_columns": {}, "reason": "All required...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many patients who were examined between 1987/7/6 and 1996/1/31 had a GPT level greater than 30 and an ALB level less than 4? List them by their ID.
SELECT DISTINCT ID FROM Laboratory WHERE Date BETWEEN '1987-07-06' AND '1996-01-31' AND GPT > 30 AND ALB < 4
moderate
{ "gold_sql": "SELECT DISTINCT ID FROM Laboratory WHERE Date BETWEEN '1987-07-06' AND '1996-01-31' AND GPT > 30 AND ALB < 4", "permission": "allowed", "query_columns": { "laboratory": [ "ALB", "GPT", "ID" ] }, "missing_columns": {}, "reason": "All required columns are permitted", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many female patients born in 1964 were admitted to the hospital? List them by ID.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT ID FROM Patient WHERE STRFTIME('%Y', Birthday) = '1964' AND SEX = 'F' AND Admission = '+'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Birthday", "ID", "SEX" ] }, "missing_columns": { "patient": [ "Admission" ] },...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What number of patients with a degree of thrombosis level 2 and ANA pattern of only S, have a level of anti-Cardiolipin antibody (IgM) 20% higher than average?
SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')
challenging
{ "gold_sql": "SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')", "permission": "allowed", "query_columns": { "examination": [ "ANA Pattern", "Thrombosis", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Laboratory WHERE CAST(`U-PRO` AS REAL) > 0 AND CAST(`U-PRO` AS REAL) < 30", "permission": "denied", "query_columns": { "laboratory": [ "ID", "U-PRO", "UA" ] }, "missing_columns": { ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN Diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE STRFTIME('%Y', `First Date`) = '1981' AND SEX = 'M'", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID", "SEX" ] },...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
List all patients who were followed up at the outpatient clinic who underwent a laboratory test in October 1991 and had a total blood bilirubin level within the normal range.
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.`T-BIL` < 2.0 AND T2.Date LIKE '1991-10-%'", "permission": "denied", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "Date", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Excluding all P only ANA Pattern patients, how many of the remainder are women born between 1980 and 1989?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'P' AND STRFTIME('%Y', T1.Birthday) BETWEEN '1980' AND '1989' AND T1.SEX = 'F'
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'P' AND STRFTIME('%Y', T1.Birthday) BETWEEN '1980' AND '1989' AND T1.SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What sex is the patient who in a medical examination was diagnosed with PSS and in a laboratory examination had a blood level of C-reactive protein de 2+, createnine 1 and LDH 123?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT T1.SEX FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T3.ID = T2.ID WHERE T2.Diagnosis = 'PSS' AND T3.CRP = '2+' AND T3.CRE = 1.0 AND T3.LDH = 123", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the average blood albumin level for female patients with a PLT greater than 400 who have been diagnosed with SLE?
SELECT AVG(T2.ALB) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 400 AND T1.Diagnosis = 'SLE' AND T1.SEX = 'F'
moderate
{ "gold_sql": "SELECT AVG(T2.ALB) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 400 AND T1.Diagnosis = 'SLE' AND T1.SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID", "SEX" ], "laboratory": [ "ALB", "ID...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the most common sign of patients with SLE disease?
SELECT Symptoms FROM Examination WHERE Diagnosis = 'SLE' GROUP BY Symptoms ORDER BY COUNT(Symptoms) DESC LIMIT 1
simple
{ "gold_sql": "SELECT Symptoms FROM Examination WHERE Diagnosis = 'SLE' GROUP BY Symptoms ORDER BY COUNT(Symptoms) DESC LIMIT 1", "permission": "allowed", "query_columns": { "examination": [ "Diagnosis", "Symptoms" ] }, "missing_columns": {}, "reason": "All required columns are permitted...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
When was the medical information on patient number 48473 first documented, and what disease did she have?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT `First Date`, Diagnosis FROM Patient WHERE ID = 48473", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID" ] }, "missing_columns": { "patient": [ "First Date" ] }, "reason": "Missing column permissions: pati...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many female patients were given an APS diagnosis?
SELECT COUNT(ID) FROM Patient WHERE SEX = 'F' AND Diagnosis = 'APS'
simple
{ "gold_sql": "SELECT COUNT(ID) FROM Patient WHERE SEX = 'F' AND Diagnosis = 'APS'", "permission": "allowed", "query_columns": { "patient": [ "Diagnosis", "ID", "SEX" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 1198, "evidence": "f...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many patients who underwent testing in 1997 had protein levels outside the normal range?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT COUNT(DISTINCT ID) AS abnormal_protein_patient_count\nFROM Laboratory\nWHERE \n (TP <= 6.0 OR TP >= 8.5) \n AND STRFTIME('%Y', Date) = '1997';", "permission": "denied", "query_columns": { "laboratory": [ "ID", "TP" ] }, "missing_columns": { "laboratory": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What proportion of patients who had signs of thrombocytopenia had SLE diagnosed?
SELECT CAST(SUM(CASE WHEN Diagnosis LIKE '%SLE%' THEN 1 ELSE 0 END) AS REAL) * 100 / NULLIF(COUNT(DISTINCT ID), 0) AS proportion FROM Examination WHERE Symptoms = 'thrombocytopenia';
moderate
{ "gold_sql": "SELECT \n CAST(SUM(CASE WHEN Diagnosis LIKE '%SLE%' THEN 1 ELSE 0 END) AS REAL) * 100 / NULLIF(COUNT(DISTINCT ID), 0) AS proportion\nFROM Examination \nWHERE Symptoms = 'thrombocytopenia';", "permission": "allowed", "query_columns": { "examination": [ "Diagnosis", "ID", "Sy...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What percentage of patients who were born in 1980 and were diagnosed with RA are women?
SELECT CAST(SUM(CASE WHEN SEX = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE Diagnosis = 'RA' AND STRFTIME('%Y', Birthday) = '1980'
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN SEX = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE Diagnosis = 'RA' AND STRFTIME('%Y', Birthday) = '1980'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID", "SEX" ] }, "missi...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with Behcet disease did not stay in the hospital for treatment?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'Behcet' AND T1.SEX = 'M' AND STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1995' AND '1997' AND T1.Admission = '-'", "permission": "denied", "query_columns": { "patient": [ "Admissi...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many patients who were female got white blood cells that were below 3.5?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC < 3.5 AND T1.SEX = 'F'
simple
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC < 3.5 AND T1.SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ID", "WBC" ] }, "missing_columns": {}, "re...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How long did it take after patient number 821298 arrived at the hospital for the first time before her first evaluation began?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT MIN(JULIANDAY(T3.`Examination Date`)) - JULIANDAY(T1.`First Date`) FROM Patient AS T1 INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T1.ID = 821298", "permission": "denied", "query_columns": { "patient": [ "First Date", "ID" ], "examination": [ "Examination...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Was the patient with the number 57266's uric acid within a normal range?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CASE WHEN (T1.SEX = 'F' AND T2.UA > 6.5) OR (T1.SEX = 'M' AND T2.UA > 8.0) THEN true ELSE false END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 57266", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
When is the laboratory examination of patient '48473' where his/her AST glutamic oxaloacetic transaminase (GOT) index is above the normal range.
SELECT Date FROM Laboratory WHERE ID = 48473 AND GOT >= 60
simple
{ "gold_sql": "SELECT Date FROM Laboratory WHERE ID = 48473 AND GOT >= 60", "permission": "allowed", "query_columns": { "laboratory": [ "GOT", "ID" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 1206, "evidence": "AST glutamic oxaloacetic t...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
List all patients with their sex and date of birthday, whose AST glutamic oxaloacetic transaminase (GOT) index is within normal range for laboratory examination in 1994.
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT DISTINCT T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND STRFTIME('%Y', T2.Date) = '1994'", "permission": "denied", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "laboratory": [ "Date",...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Provide IDs for male patients with ALT glutamic pylvic transaminase (GPT) that have history of ALT glutamic pylvic transaminase (GPT) exceed the normal range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.GPT >= 60
moderate
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.GPT >= 60", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "GPT", "ID" ] }, "missing_columns": {}, "...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth.
SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT > 60 ORDER BY T1.Birthday ASC
moderate
{ "gold_sql": "SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT > 60 ORDER BY T1.Birthday ASC", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID" ], "laboratory": [ "GPT", "ID" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the average index of the lactate dehydrogenase (LDH) for all patients with lactate dehydrogenase (LDH) within the normal range.
SELECT AVG(LDH) FROM Laboratory WHERE LDH < 500
simple
{ "gold_sql": "SELECT AVG(LDH) FROM Laboratory WHERE LDH < 500", "permission": "allowed", "query_columns": { "laboratory": [ "LDH" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 1210, "evidence": "average index of the lactate dehydrogenase (LDH) ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Provide the ID and age of patient with lactate dehydrogenase (LDH) between 100-300 index above the normal range.
SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 600 AND T2.LDH < 800
moderate
{ "gold_sql": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 600 AND T2.LDH < 800", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laborato...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For patients with alkaliphophatase (ALP) within normal range, were they treated as inpatient or outpatient?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T1.Admission FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP < 300", "permission": "denied", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "ALP", "ID" ] }, "missing_columns": { "patient": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Name the ID of the patient who is born on the April 1st, 1982. Is his/her alkaliphophatase (ALP) within normal range?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T1.ID , CASE WHEN T2.ALP < 300 THEN 'normal' ELSE 'abNormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1982-04-01'", "permission": "denied", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "ALP",...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
List ID, sex and date of birth of the patient whose total protein (TP) is below the lower range of the normal index.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0", "permission": "denied", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "laboratory": [ "ID", "TP" ] }, "missin...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For all female patient with total protein (TP) beyond the normal index, what is the deviation of their TP index from the normal?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T2.TP - 8.5 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND T2.TP > 8.5", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ID", "TP" ] }, "missing_columns": { "labora...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Sort in descending order all patients by birthday for male patient with albumin not within range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND (T2.ALB <= 3.5 OR T2.ALB >= 5.5) ORDER BY T1.Birthday DESC
simple
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND (T2.ALB <= 3.5 OR T2.ALB >= 5.5) ORDER BY T1.Birthday DESC", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "laboratory": [...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For all patient born in 1982, state if their albumin is within normal range.
SELECT CASE WHEN T2.ALB >= 3.5 AND T2.ALB <= 5.5 THEN 'normal' ELSE 'abnormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1982'
moderate
{ "gold_sql": "SELECT CASE WHEN T2.ALB >= 3.5 AND T2.ALB <= 5.5 THEN 'normal' ELSE 'abnormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1982'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "labor...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
What is the percentage of the female patient whose uric acid (UA) beyond the normal range?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T2.UA > 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ID", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
For all patients with normal uric acid (UA), what is the average UA index based on their latest laboratory examination result?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT AVG(T2.UA) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.UA < 6.5 AND T1.SEX = 'F') OR (T2.UA < 8.0 AND T1.SEX = 'M') AND T2.Date = ( SELECT MAX(Date) FROM Laboratory )", "permission": "denied", "query_columns": { "patient": [ "ID", "SEX" ], ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing?
SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN = 29
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN = 29", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "laboratory": [ "ID", "UN" ] }, "missin...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
Provide the ID, sex, birthday of all patients diagnosed with 'RA' that are within the UN normal index.
SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN < 30 AND T1.Diagnosis = 'RA'
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN < 30 AND T1.Diagnosis = 'RA'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID", "SEX" ], "laboratory": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
DataOperator_3
{ "Examination": [ "*" ], "Laboratory": [ "ALB", "APTT", "C3", "C4", "CENTROMEA", "CPK", "CRE", "DNA", "DNA-II", "FG", "GLU", "GOT", "GPT", "HCT", "HGB", "ID", "IGA", "IGM", "LDH", "PIC", "PLT", "PT", "RBC", "RF", ...
How many male patients have creatinine index out of the normal range?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5 AND T1.SEX = 'M'
simple
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5 AND T1.SEX = 'M'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "CRE", "ID" ] }, "missing_columns":...