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_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 male patients with creatinine not within the normal range than female? True or False? | SELECT CASE WHEN SUM(CASE WHEN T1.SEX = 'M' THEN 1 ELSE 0 END) > SUM(CASE WHEN T1.SEX = 'F' THEN 1 ELSE 0 END) THEN 'True' ELSE 'False' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5 | challenging | {
"gold_sql": "SELECT CASE WHEN SUM(CASE WHEN T1.SEX = 'M' THEN 1 ELSE 0 END) > SUM(CASE WHEN T1.SEX = 'F' THEN 1 ELSE 0 END) THEN 'True' ELSE 'False' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5",
"permission": "allowed",
"query_columns": {
"patient": [
"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 highest total bilirubin level recorded? List out the patient details with ID, sex and birthday with that index. | SELECT T2.`T-BIL`, T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-BIL` DESC LIMIT 1 | simple | {
"gold_sql": "SELECT T2.`T-BIL`, T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-BIL` DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID",
"SEX"
],
"laboratory": [
"ID",
"T-BIL... |
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 and group all patients by sex for total bilirubin (T-BIL) level not within the normal range. | SELECT T1.ID,T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 GROUP BY T1.SEX,T1.ID | moderate | {
"gold_sql": "SELECT T1.ID,T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 GROUP BY T1.SEX,T1.ID",
"permission": "allowed",
"query_columns": {
"patient": [
"ID",
"SEX"
],
"laboratory": [
"ID",
"T-BIL"
]
},
"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",
... | Who is the oldest patient with the highest total cholesterol (T-CHO). State the patient ID and T-CHO index. | SELECT T1.ID, T2.`T-CHO` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-CHO` DESC, T1.Birthday ASC LIMIT 1 | simple | {
"gold_sql": "SELECT T1.ID, T2.`T-CHO` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-CHO` DESC, T1.Birthday ASC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"ID",
"T-CHO"
]
},
"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 average age of the male patient with high cholesterol? | SELECT AVG(STRFTIME('%Y', date('NOW')) - STRFTIME('%Y', T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-CHO` >= 250 AND T1.SEX = 'M' | moderate | {
"gold_sql": "SELECT AVG(STRFTIME('%Y', date('NOW')) - STRFTIME('%Y', T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-CHO` >= 250 AND T1.SEX = 'M'",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID",
"SEX"
],
"laborat... |
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 list of patients and their diagnosis with triglyceride (TG) index greater than 100 of the normal range? | SELECT DISTINCT T1.ID, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG > 300 | simple | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG > 300",
"permission": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"ID",
"TG"
]
},
"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",
... | For all patients with triglyceride (TG) level beyond the normal range, how many are age more than 50 years? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200 AND STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) > 50 | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200 AND STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) > 50",
"permission": "allowed",
"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",
... | List all outpatient within normal range of creatinine phosphokinase. Give me the distinct ids. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CPK < 250 AND T1.Admission = '-'",
"permission": "denied",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"CPK",
"ID"
]
},
"missing_column... |
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 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) BETWEEN '1936' AND '1956' AND T1.SEX = 'M' AND T2.CPK >= 250 | challenging | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) BETWEEN '1936' AND '1956' AND T1.SEX = 'M' AND T2.CPK >= 250",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"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 ID, sex and age of patient who has blood glucose (GLU) not within normal range but with total cholesterol(T-CHO) within normal range. | SELECT DISTINCT T1.ID, T1.SEX , STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU >= 180 AND T2.`T-CHO` < 250 | challenging | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.SEX , STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU >= 180 AND T2.`T-CHO` < 250",
"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",
... | List each patient's ID and blood glucose (GLU) index that were within normal range for patient's whose data was first recorded in 1991. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT DISTINCT T1.ID, T2.GLU FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.`First Date`) = '1991' AND T2.GLU < 180",
"permission": "denied",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laboratory": [
"GLU",
"I... |
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 who has abnormal white blood cell count. Group them by sex and list the patient by age in ascending order. | SELECT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC < 3.5 OR T2.WBC > 9.0 GROUP BY T1.ID, T1.SEX, T1.Birthday ORDER BY T1.SEX, T1.Birthday ASC | moderate | {
"gold_sql": "SELECT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC < 3.5 OR T2.WBC > 9.0 GROUP BY T1.ID, T1.SEX, T1.Birthday ORDER BY T1.SEX, T1.Birthday ASC",
"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 are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age. | SELECT DISTINCT T1.Diagnosis, 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.RBC < 3.5 | moderate | {
"gold_sql": "SELECT DISTINCT T1.Diagnosis, 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.RBC < 3.5",
"permission": "allowed",
"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",
... | For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital. | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.Admission FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND (T2.RBC <= 3.5 OR T2.RBC >= 6.0) AND STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) >= 50",
"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_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",
... | Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HGB < 10 AND T1.Admission = '-'",
"permission": "denied",
"query_columns": {
"patient": [
"Admission",
"ID",
"SEX"
],
"laboratory": [
"HGB",
"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",
... | Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex. | SELECT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.HGB > 10 AND T2.HGB < 17 ORDER BY T1.Birthday ASC LIMIT 1 | moderate | {
"gold_sql": "SELECT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.HGB > 10 AND T2.HGB < 17 ORDER BY T1.Birthday ASC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"Diagnosis",
"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",
... | Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded 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 T1.ID IN ( SELECT ID FROM Laboratory WHERE HCT >= 52 GROUP BY ID HAVING COUNT(ID) >= 2 ) | challenging | {
"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 T1.ID IN ( SELECT ID FROM Laboratory WHERE HCT >= 52 GROUP BY ID HAVING COUNT(ID) >= 2 )",
"permission": "allowed",
"query_columns": {
"pa... |
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",
... | From laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT AVG(T2.HCT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HCT < 29 AND STRFTIME('%Y', T2.Date) = '1991'",
"permission": "denied",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"Date",
"HCT",
"ID"
]
},
"missing_c... |
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 abnormal platelet level, state the number of patients with lower than normal range. How is it compare to the number of patients with higher than normal range? | SELECT SUM(CASE WHEN T2.PLT <= 100 THEN 1 ELSE 0 END), SUM(CASE WHEN T2.PLT <= 100 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.PLT >= 400 THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID | challenging | {
"gold_sql": "SELECT SUM(CASE WHEN T2.PLT <= 100 THEN 1 ELSE 0 END), SUM(CASE WHEN T2.PLT <= 100 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.PLT >= 400 THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID",
"permission": "allowed",
"query_columns": {
"patient": [
"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 laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level. | 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 T2.PLT BETWEEN 100 AND 400 AND STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday) < 50 AND STRFTIME('%Y', T2.Date) = '1984'",
"permission": "denied",
"query_columns": {
"patient": [
"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",
... | For all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (PT)? | SELECT
CAST(COUNT(DISTINCT CASE WHEN T2.PT >= 14 AND T1.SEX = 'F' THEN T1.ID END) AS REAL)
/ COUNT(DISTINCT CASE WHEN T2.PT >= 14 THEN T1.ID END)
* 100 AS abnormal_pt_female_percentage
FROM Patient AS T1
INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T... | challenging | {
"gold_sql": "SELECT \n CAST(COUNT(DISTINCT CASE WHEN T2.PT >= 14 AND T1.SEX = 'F' THEN T1.ID END) AS REAL)\n / COUNT(DISTINCT CASE WHEN T2.PT >= 14 THEN T1.ID END)\n * 100 AS abnormal_pt_female_percentage\nFROM Patient AS T1\nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID\nWHERE STRFTIME('%Y', CURRENT_TIMEST... |
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 first came to the hospital after year 1992 with prothrombin time (PT) level that are normal. | Sorry, I cannot answer. | 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.`First Date`) > '1992' AND T2.PT < 14",
"permission": "denied",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laboratory": [
"ID",
"PT"
]
... |
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 examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin 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 WHERE T2.Date > '1997-01-01' AND T2.APTT >= 45",
"permission": "denied",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"APTT",
"Date",
"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",
... | For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis? | 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 T3.ID = T2.ID WHERE T3.Thrombosis = 0 AND T2.APTT > 45 | 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 T3.ID = T2.ID WHERE T3.Thrombosis = 0 AND T2.APTT > 45",
"permission": "allowed",
"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_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",
... | Among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level? | SELECT COUNT(DISTINCT p.ID) AS male_count
FROM Patient AS p
JOIN Laboratory AS l ON l.ID = p.ID
WHERE p.SEX = 'M'
AND (l.FG <= 150 OR l.FG >= 450)
AND l.WBC > 3.5 AND l.WBC < 9.0; | challenging | {
"gold_sql": "SELECT COUNT(DISTINCT p.ID) AS male_count\nFROM Patient AS p\nJOIN Laboratory AS l ON l.ID = p.ID\nWHERE p.SEX = 'M'\n AND (l.FG <= 150 OR l.FG >= 450)\n AND l.WBC > 3.5 AND l.WBC < 9.0;",
"permission": "allowed",
"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",
... | How many patients born after 1980/1/1 have an abnormal fibrinogen level? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T1.Birthday > '1980-01-01' | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T1.Birthday > '1980-01-01'",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"FG",
"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",
... | Please list the disease names of the patients that have a proteinuria level higher 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.`U-PRO` >= 30",
"permission": "denied",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"ID",
"U-PRO"
]
},
"missing_columns": {
"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",
... | Which patients have a normal proteinuria level and are diagnosed with SLE? Please give their patient IDs. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE CAST(T2.`U-PRO` AS REAL) > 0 AND CAST(T2.`U-PRO` AS REAL) < 30 AND T1.Diagnosis = 'SLE'",
"permission": "denied",
"query_columns": {
"patient": [
"Diagnosis",
"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",
... | How many patients with an Ig G higher than normal? | Sorry, I cannot answer. | simple | {
"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 T3.ID = T2.ID WHERE T2.IGG >= 2000",
"permission": "denied",
"query_columns": {
"patient": [
"ID"
],
"examination": [
"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",
... | Among the patients with a normal Ig G level, how many of them have symptoms? | 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 T3.ID = T2.ID WHERE T2.IGG BETWEEN 900 AND 2000 AND T3.Symptoms IS NOT NULL",
"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",
... | For the patient who has the highest Ig A within the normal range, what is his or her diagnosis? | SELECT patientData.Diagnosis FROM Patient AS patientData INNER JOIN Laboratory AS labData ON patientData.ID = labData.ID WHERE labData.IGA BETWEEN 80 AND 500 ORDER BY labData.IGA DESC, patientData.ID LIMIT 1 | simple | {
"gold_sql": "SELECT patientData.Diagnosis FROM Patient AS patientData INNER JOIN Laboratory AS labData ON patientData.ID = labData.ID WHERE labData.IGA BETWEEN 80 AND 500 ORDER BY labData.IGA DESC, patientData.ID LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"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",
... | How many patients with a normal Ig A level came to the hospital after 1990/1/1? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) AS normal_iga_patient_count FROM Patient AS T1\nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGA > 80 AND T2.IGA < 500 AND strftime('%Y', T1.`First Date`) >= '1990';",
"permission": "denied",
"query_columns": {
"patient": [
"First 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",
... | For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with? | SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGM NOT BETWEEN 40 AND 400 GROUP BY T1.Diagnosis ORDER BY COUNT(T1.Diagnosis) DESC LIMIT 1 | moderate | {
"gold_sql": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGM NOT BETWEEN 40 AND 400 GROUP BY T1.Diagnosis ORDER BY COUNT(T1.Diagnosis) DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"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",
... | How many patients with a abnormal C-reactive protein don't have their data recorded? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) \nFROM Patient AS T1 \nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID \nWHERE T2.CRP = '+' AND T1.Description IS NULL;",
"permission": "denied",
"query_columns": {
"patient": [
"Description",
"ID"
],
"laboratory": [
"CRP",
"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",
... | Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet? | 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 STRFTIME('%Y', Date('now')) - STRFTIME('%Y', T1.Birthday) < 70 | challenging | {
"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 STRFTIME('%Y', Date('now')) - STRFTIME('%Y', T1.Birthday) < 70",
"permission": "allowed",
"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",
... | How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation? | 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 T3.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T3.KCT = '+'",
"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",
... | Please list the diseases of the patients born after 1985-1-1 and have a normal Rhuematoid Factor. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T1.Birthday > '1985-01-01'",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"Diagnosis",
"ID"
],
"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",
... | Please list the ID of patients whose RF test result is normal and who were older than 60 at the time of their laboratory test. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT p.ID FROM Patient AS p JOIN Laboratory AS l ON p.ID = l.ID WHERE l.RF IS NOT NULL AND TRIM(l.RF) != '' AND CAST(REPLACE(REPLACE(l.RF, '<', ''), '>', '') AS REAL) < 20 AND (CAST(strftime('%Y', l.Date) AS INTEGER) - CAST(strftime('%Y', p.Birthday) AS INTEGER)) > 60",
"permission": "deni... |
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 with a normal RF don't have thrombosis? | SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0 | simple | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0",
"permission": "allowed",
"query_columns": {
"examination": [
"ID",
"Thrombosis"
],
"laboratory": [
"ID",
"RF"
]
},
"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",
... | How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination? | SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C3 > 35 AND T1.`ANA Pattern` = 'P' | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C3 > 35 AND T1.`ANA Pattern` = 'P'",
"permission": "allowed",
"query_columns": {
"examination": [
"ANA Pattern",
"ID"
],
"laboratory": [
"C3",
"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",
... | Among the patients whose level of Hematoclit isn't normal, which patient has the highest anti-Cardiolipin antibody concentration? Please list his or her ID. | SELECT DISTINCT T1.ID 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.HCT >= 52 OR T3.HCT <= 29) ORDER BY T2.`aCL IgA` DESC LIMIT 1 | moderate | {
"gold_sql": "SELECT DISTINCT T1.ID 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.HCT >= 52 OR T3.HCT <= 29) ORDER BY T2.`aCL IgA` DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"ID"
],
"examinati... |
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",
... | Among the patients have blood clots in veins, how many of them have a normal level of complement 4? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C4 > 10 AND T1.Diagnosis = 'APS' | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C4 > 10 AND T1.Diagnosis = 'APS'",
"permission": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"C4",
"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_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 have a normal level of anti-ribonuclear protein and have been admitted to the hospital? | 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 T2.RNP = 'negative' OR T2.RNP = '0' AND T1.Admission = '+'",
"permission": "denied",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ID",
"RNP... |
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 date of birth of the youngest patient with an abnormal anti-ribonuclear protein level? | SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP NOT IN ('-', '+-') ORDER BY T1.Birthday DESC LIMIT 1 | moderate | {
"gold_sql": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP NOT IN ('-', '+-') ORDER BY T1.Birthday DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"ID",
"RNP"
]
... |
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",
... | Among the patients with normal anti-SM, how many of them does not have thrombosis? | SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM IN ('negative','0') AND T1.Thrombosis = 0 | moderate | {
"gold_sql": "SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM IN ('negative','0') AND T1.Thrombosis = 0",
"permission": "allowed",
"query_columns": {
"examination": [
"ID",
"Thrombosis"
],
"laboratory": [
"ID",
"SM"
]
}... |
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 patients with an abnormal anti-SM, please list the IDs of the three youngest ones. | SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM NOT IN ('negative','0') ORDER BY T1.Birthday DESC LIMIT 3 | simple | {
"gold_sql": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM NOT IN ('negative','0') ORDER BY T1.Birthday DESC LIMIT 3",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"ID",
"SM"
]
},... |
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 list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SC170 IN ('negative','0') AND T2.Date > '1997-01-01'",
"permission": "denied",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"Date",
"ID",
"SC170"
]
},
"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",
... | Among the patients who has a normal anti-scl70, how many of them are female and does not have any symptom? | 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 T3.ID = T2.ID WHERE (T2.SC170 = 'negative' OR T2.SC170 = '0') AND T1.SEX = 'F' AND T3.Symptoms IS NULL | challenging | {
"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 T3.ID = T2.ID WHERE (T2.SC170 = 'negative' OR T2.SC170 = '0') AND T1.SEX = 'F' AND T3.Symptoms IS NULL",
"permission": "allowed",
"query_columns": {
"patient": [
"I... |
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 with a normal anti-SSA came to the hospital before 2000? | 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 T2.SSA IN ('negative', '0') AND STRFTIME('%Y', T2.Date) < '2000'",
"permission": "denied",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"Date",
"ID",
"SS... |
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",
... | Which patient is the first patient with an abnormal anti-SSA to come to the hospital? Please give his or her ID. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.`First Date` IS NOT NULL AND T2.SSA NOT IN ('negative', '0') ORDER BY T1.`First Date` ASC LIMIT 1",
"permission": "denied",
"query_columns": {
"patient": [
"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",
... | How many patients have a normal anti-SSB and are diagnosed with SLE in the examination? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR T2.SSB = '0' AND T1.Diagnosis = 'SLE' | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR T2.SSB = '0' AND T1.Diagnosis = 'SLE'",
"permission": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"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 the patients whose anti-SSB are normal, how many of them have other symptoms observed in their examination? | SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.SSB = 'negative' OR T2.SSB = '0') AND T1.Symptoms IS NOT NULL | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.SSB = 'negative' OR T2.SSB = '0') AND T1.Symptoms IS NOT NULL",
"permission": "allowed",
"query_columns": {
"examination": [
"ID",
"Symptoms"
],
"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",
... | Among the patients who has a normal level of anti-centromere and a normal level of anti-SSB, how many of them are male? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CENTROMEA IN ('negative', '0') AND T2.SSB IN ('negative', '0') AND T1.SEX = 'M' | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CENTROMEA IN ('negative', '0') AND T2.SSB IN ('negative', '0') AND T1.SEX = 'M'",
"permission": "allowed",
"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",
... | For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with. | SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA >= 8 | simple | {
"gold_sql": "SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA >= 8",
"permission": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"DNA",
"ID"
]
},
"missing_columns": {},
"reaso... |
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 have a normal anti-DNA level, yet their data are not recorded. | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA < 8 AND T1.Description IS NULL | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA < 8 AND T1.Description IS NULL",
"permission": "allowed",
"query_columns": {
"patient": [
"Description",
"ID"
],
"laboratory": [
"DNA",
"ID"
]
},
"mi... |
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",
... | Based on latest record of each patient,of the patients with an normal level of IGG, how many of them admitted to the hospital? | Sorry, I cannot answer. | simple | {
"gold_sql": "WITH LatestLab AS (SELECT T1.ID,max(T2.Date) AS LatestLabDate FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID GROUP BY T1.ID) SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN LatestLab AS T3 ON T1.ID=T3.ID AND T2.Date=T3.LatestLabDate WHERE ... |
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 patient who has a abnormal level of glutamic oxaloacetic transaminase level, yet he or she is diagnosed with SLE? | SELECT SUM(CASE WHEN T1.Diagnosis LIKE '%SLE%' THEN 1 ELSE 0 END) * 100.0 / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`GOT` >= 60 | moderate | {
"gold_sql": "SELECT SUM(CASE WHEN T1.Diagnosis LIKE '%SLE%' THEN 1 ELSE 0 END) * 100.0 / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`GOT` >= 60",
"permission": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"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",
... | How many male patients have their glutamic oxaloacetic transaminase in the normal range? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND T1.SEX = 'M' | simple | {
"gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND T1.SEX = 'M'",
"permission": "allowed",
"query_columns": {
"patient": [
"ID",
"SEX"
],
"laboratory": [
"GOT",
"ID"
]
},
"missing_columns": {},
"rea... |
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",
... | Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born? | SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT >= 60 ORDER BY T1.Birthday DESC LIMIT 1 | moderate | {
"gold_sql": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT >= 60 ORDER BY T1.Birthday DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"GOT",
"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_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 list the top three patients' birthdays with the highest glutamic pylvic transaminase in the normal range. | SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT < 60 GROUP BY T1.ID ORDER BY MAX(T2.GPT) DESC, T1.ID ASC LIMIT 3 | simple | {
"gold_sql": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT < 60 GROUP BY T1.ID ORDER BY MAX(T2.GPT) DESC, T1.ID ASC LIMIT 3",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"GPT",
... |
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 patients with the normal glutamic pylvic transaminase level, how many of them are male? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 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.GOT < 60 AND T1.SEX = 'M'",
"permission": "allowed",
"query_columns": {
"patient": [
"ID",
"SEX"
],
"laboratory": [
"GOT",
"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",
... | For the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.`First Date` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH < 500 ORDER BY T2.LDH DESC LIMIT 1",
"permission": "denied",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laboratory": [
"ID",
"LDH"
]
},
"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",
... | When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.`First Date` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH >= 500 ORDER BY T1.`First Date` DESC LIMIT 1",
"permission": "denied",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laboratory": [
"ID",
"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",
... | For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital? | Sorry, I cannot answer. | 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": "denied",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ALP",
"ID"
]
},
"mi... |
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",
... | Among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase? | Sorry, I cannot answer. | 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": "denied",
"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_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 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_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 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_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 examination date of the patient whose albumin is the highest in the normal range? | SELECT Date FROM Laboratory WHERE ALB > 3.5 AND ALB < 5.5 ORDER BY ALB DESC LIMIT 1 | simple | {
"gold_sql": "SELECT Date FROM Laboratory WHERE ALB > 3.5 AND ALB < 5.5 ORDER BY ALB DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"laboratory": [
"ALB"
]
},
"missing_columns": {},
"reason": "All required columns are permitted",
"question_id": 1290,
"evidence": "examination d... |
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 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_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 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_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 highest anti-nucleus antibody concentration level of a patient with a normal creatinine level? | 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 | 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": "allowed",
"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_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 list the patient's ID whose creatinine level is normal and whose anti Cardiolipin antibody concentration level is the highest. | 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 | 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": "allowed",
"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_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",
... | 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? | 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%' | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"examination": [
"ANA Pa... |
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 anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range? | 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 | 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": "allowed",
"query_columns": {
"examination": [
"ANA",
"ID"
],
"laboratory": [
"ID",
"T-BIL"
]
},
"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",
... | For the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation? | 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 = '-' | 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": "allowed",
"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_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",
... | 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? | SELECT COUNT(DISTINCT T1.ID) AS qualified_patient_count
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.`ANA Pattern` = 'P'; | 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": "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",
... | Among the patients with the normal level of triglyceride, how many of them have other symptoms observed? | SELECT COUNT(DISTINCT T1.ID)
FROM Examination AS T1
INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
WHERE T2.TG < 200
AND T1.Symptoms IS NOT NULL | 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": "allowed",
"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_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 name of the patient who has the highest level of triglyceride within the normal range? | 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 | 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": "allowed",
"query_columns": {
"examination": [
"Diagnosis",
"ID"
],
"laboratory": [
"ID",
"TG"
]
},
"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_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 list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase. | 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 | 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": "allowed",
"query_columns": {
"examination": [
"ID",
"Thrombosis"
],
"laboratory": [
"CPK",
"ID"
]
},
"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",
... | For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation? | 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 = '+') | 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": "allowed",
"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",
... | When is the birthday of the oldest patient whose blood glucose is abnormal? | 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 | 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": "allowed",
"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_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",
... | Among the patients with a normal blood glucose, how many of them don't have thrombosis? | 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 | 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": "allowed",
"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_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 accepted to the hospital have a normal level of white blood cells? | 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 T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'",
"permission": "denied",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ID",
"WBC"
]
},
"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_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 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_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 list the patient's ID if he or she has an abnormal level of red blood cell and is followed at the outpatient clinic. | 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 (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'",
"permission": "denied",
"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_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",
... | 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_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 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_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 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_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 with severe thrombosis have a normal prothrombin time? | 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 | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"examination": [
... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | What's Angela Sanders's major? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Angela' AND T1.last_name = 'Sanders'",
"permission": "denied",
"query_columns": {
"major": [
"major_id",
"major_name"
],
"member": [
"first_name",
... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | How many students in the Student_Club are from the College of Engineering? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.college = 'College of Engineering'",
"permission": "denied",
"query_columns": {
"major": [
"college",
"major_id"
],
"member": [
"link_to_major",
"member... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | Please list the full names of the students in the Student_Club that come from the Art and Design Department. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'Art and Design Department'",
"permission": "denied",
"query_columns": {
"major": [
"department",
"major_id"
],
"member": [
"first_name",... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | How many students of the Student_Club have attended the event "Women's Soccer"? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'",
"permission": "denied",
"query_columns": {
"event": [
"event_id",
"event_name"
],
"attendance": [
"link_to_event"
]
... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | Please list the phone numbers of the students from the Student_Club that has attended the event "Women's Soccer". | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T3.phone FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer'",
"permission": "denied",
"query_columns": {
"event": [
"event_id",
"event_name"
],
... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | Among the students from the Student_Club who attended the event "Women's Soccer", how many of them want a T-shirt that's in medium size? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T3.member_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer' AND T3.t_shirt_size = 'Medium'",
"permission": "denied",
"query_columns": {
"eve... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | What is the event that has the highest attendance of the students from the Student_Club? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_name ORDER BY COUNT(T2.link_to_event) DESC LIMIT 1",
"permission": "denied",
"query_columns": {
"event": [
"event_id",
"event_name"
],
"attendance": [
... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | Which college is the vice president of the Student_Club from? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position LIKE 'vice president'",
"permission": "denied",
"query_columns": {
"major": [
"college",
"major_id"
],
"member": [
"link_to_major",
"position"
]
}... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | Please list the event names of all the events attended by Maya Mclean. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Maya' AND T3.last_name = 'Mclean'",
"permission": "denied",
"query_columns": {
"event": [
"event_id",
... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | How many events of the Student_Club did Sacha Harrison attend in 2019? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Sacha' AND T3.last_name = 'Harrison' AND SUBSTR(T1.event_date, 1, 4) = '2019'",
"permission": "denied",
"query_... |
student_club | ##Instruction:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Database: student_club
Total Tables: 8
Total Columns: 48
Table Schemas:
Table: attendance (2 columns)
-----------------------------
• link_to_event (text): The unique identifier of the event which was attended
Values: Reference... | DataOperator_1 | {
"attendance": [
"*"
],
"budget": [
"*"
],
"expense": [
"approved",
"expense_date",
"expense_description",
"link_to_budget"
],
"major": [
"*"
],
"member": [
"email",
"first_name",
"member_id",
"phone",
"position",
"t_shirt_size",
"zip"
],
"z... | Among the events attended by more than 10 members of the Student_Club, how many of them are meetings? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(*) AS meeting_events_over_10\nFROM event AS e\nWHERE e.type = 'Meeting'\n AND (SELECT COUNT(*) \n FROM attendance AS a \n WHERE a.link_to_event = e.event_id) > 10;",
"permission": "denied",
"query_columns": {
"event": [
"event_id",
"type"
],
"attend... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.