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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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. | 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 | 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": "allowed",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laboratory": [
"GLU",
"... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital. | 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 | 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": "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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex. | 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 = '-' | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | From laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range. | 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' | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"Date",
"HCT",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level. | 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' | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal. | 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 | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time? | 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 | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"APTT",
"Date",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"laboratory": [
"APTT",
... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Please list the disease names of the patients that have a proteinuria level higher than normal. | SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`U-PRO` >= 30 | 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": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"ID",
"U-PRO"
]
},
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Which patients have a normal proteinuria level and are diagnosed with SLE? Please give their patient IDs. | 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' | 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": "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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients with an Ig G higher than normal? | 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 | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"ID",
"IGG"
],
"ex... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Among the patients with a normal Ig G level, how many of them have symptoms? | 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 | 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": "allowed",
"query_columns": {
"patient": [
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients with a normal Ig A level came to the hospital after 1990/1/1? | SELECT COUNT(DISTINCT T1.ID) AS normal_iga_patient_count FROM Patient AS T1
INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGA > 80 AND T2.IGA < 500 AND strftime('%Y', T1.`First Date`) >= '1990'; | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation? | 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 = '+' | 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": "allowed",
"query_columns": {
"patient": [
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Please list the diseases of the patients born after 1985-1-1 and have a normal Rhuematoid Factor. | 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' | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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. | 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 | 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": "allo... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"laborator... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP = 'negative' OR T2.RNP = '0' AND T1.Admission = '+' | 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": "allowed",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ID",
"RN... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Please list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70. | 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' | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"Date",
"ID",
"SC170"
]
},
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients with a normal anti-SSA came to the hospital before 2000? | 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' | 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": "allowed",
"query_columns": {
"patient": [
"ID"
],
"laboratory": [
"Date",
"ID",
"S... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Which patient is the first patient with an abnormal anti-SSA to come to the hospital? Please give his or her ID. | 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 | 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": "allowed",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laborator... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients have a normal anti-DNA level, yet their data are not recorded. | 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.DNA < 8 AND T1.Description IS NULL",
"permission": "denied",
"query_columns": {
"patient": [
"Description",
"ID"
],
"laboratory": [
"DNA",
"ID"
]
},
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Based on latest record of each patient,of the patients with an normal level of IGG, how many of them admitted to the hospital? | 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 T2.IGG > 900 AND ... | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | For the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded? | 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 | 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": "allowed",
"query_columns": {
"patient": [
"First Date",
"ID"
],
"laboratory": [
"ID",
"LDH"
]
},
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase. | 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 | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital? | SELECT COUNT(DISTINCT T1.ID)
FROM Patient AS T1
INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
WHERE T2.ALP >= 300 AND T1.Admission = '+'; | simple | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID)\nFROM Patient AS T1\nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID\nWHERE T2.ALP >= 300 AND T1.Admission = '+';",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ALP",
"ID"
]
},
"m... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase? | SELECT COUNT(DISTINCT T1.ID)
FROM Patient AS T1
INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
WHERE T2.ALP < 300
AND T1.Admission = '-' | moderate | {
"gold_sql": "SELECT COUNT(DISTINCT T1.ID) \nFROM Patient AS T1 \nINNER JOIN Laboratory AS T2 ON T1.ID = T2.ID \nWHERE T2.ALP < 300 \nAND T1.Admission = '-'",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ALP",
"ID"
]
},
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Please list the diagnosis of the patients whose total protein is lower than normal. | SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0 | 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": "allowed",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"ID",
"TP"
]
},
"missing_columns": {},
"reason": "All r... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | For the patients who are diagnosed with SJS, how many of them have a normal level of total protein? | 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 | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many male patients have a normal level of both albumin and total protein? | 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 | 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": "allowed",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | What is the anti Cardiolipin antibody concentration of the female patient with the highest uric acid level above 6.5? | 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 | 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": "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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"laboratory": [
"CRE",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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": {
"laboratory": [
"CRE",
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"laboratory": [
"ID",
"T-CHO"
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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": {
"laboratory": [
"CPK",
"ID"
],
"examination": [
"ID",
"Thrombosis"
]
},
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"laboratory": [
"GLU",
... |
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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | How many patients accepted to the hospital have a normal level of white blood cells? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+' | moderate | {
"gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ID",
"WBC"
]
},
"mis... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | Please list the patient's ID if he or she has an abnormal level of red blood cell and is followed at the outpatient clinic. | SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-' | challenging | {
"gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"ID"
],
"laboratory": [
"ID",
"RBC"
]
}... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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... | ClinicalDiagnostician | {
"Examination": [
"*"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"First Date",
"Admission",
"Diagnosis"
],
"Laboratory": [
"*"
]
} | 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"
],
"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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | Are there more in-patient or outpatient who were male? What is the deviation in percentage? | SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M' | moderate | {
"gold_sql": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M'",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"SEX"
]
},
"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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What is the percentage of female patient were born after 1930? | SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F' | moderate | {
"gold_sql": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"SEX"
]
},
"missing_columns": {},
"reason": "All required columns ar... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | For patient born between Year 1930 to 1940, how many percent of them were inpatient? | SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE STRFTIME('%Y', Birthday) BETWEEN '1930' AND '1940' | moderate | {
"gold_sql": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE STRFTIME('%Y', Birthday) BETWEEN '1930' AND '1940'",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"Birthday"
]
},
"missing_columns": {},
"reas... |
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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT SUM(CASE WHEN Admission = '-' THEN 1.0 ELSE 0 END) / NULLIF(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END), 0) FROM Patient WHERE Diagnosis = 'SLE'",
"permission": "denied",
"query_columns": {
"patient": [
"Admission",
"Diagnosis"
]
},
"missing_columns": {
"pati... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609",
"permission": "denied",
"query_columns": {
"patient": [
"Diagnosis",
"ID"
],
"laboratory": [
"Date",
"ID"
]
},
"missing_columns": {
"pat... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"ID",
"SEX"
],
"examination": [
"Examination... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | List the patient ID, sex and birthday of patient with LDH beyond normal range. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"ID",
"SEX"
],
"laboratory": [
"ID",
"LDH"
]
},
"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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | State the ID and age of patient with positive degree of coagulation. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) AS Age FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"examination": [
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | For patients with severe degree of thrombosis, list their ID, sex and disease the patient is diagnosed with. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 2",
"permission": "denied",
"query_columns": {
"patient": [
"Diagnosis",
"ID",
"SEX"
],
"examination": [
"ID",
"Thrombosis"
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | List all patients who were born in 1937 whose total cholesterol was beyond the normal range. | 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.Birthday) = '1937' AND T2.`T-CHO` >= 250",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"ID",
"T-CHO"
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | For patient with albumin level lower than 3.5, list their ID, sex and diagnosis. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5",
"permission": "denied",
"query_columns": {
"patient": [
"Diagnosis",
"ID",
"SEX"
],
"laboratory": [
"ALB",
"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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What is the percentage of female patient had total protein not within the normal range? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND (T2.TP < 6.0 OR T2.TP > 8.5) THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'",
"permission": "denied",
"query_columns": {
"patient": [
"ID",
"SEX"
],
"l... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | For in-patients, what is the average IgG concentration measured when they were age 50 or above? | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT AVG(T2.`aCL IgG`)\nFROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID \nWHERE STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) >= 50 AND T1.Admission = '+'",
"permission": "denied",
"query_columns": {
"patient": [
"Admission",
"Birthday",
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic? | SELECT COUNT(*) FROM Patient WHERE STRFTIME('%Y', Description) = '1997' AND SEX = 'F' AND Admission = '-' | moderate | {
"gold_sql": "SELECT COUNT(*) FROM Patient WHERE STRFTIME('%Y', Description) = '1997' AND SEX = 'F' AND Admission = '-'",
"permission": "allowed",
"query_columns": {
"patient": [
"Admission",
"Description",
"SEX"
]
},
"missing_columns": {},
"reason": "All required columns are perm... |
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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What was the age of the youngest patient when they initially arrived at the hospital? | SELECT MIN(STRFTIME('%Y', `First Date`) - STRFTIME('%Y', Birthday)) FROM Patient | simple | {
"gold_sql": "SELECT MIN(STRFTIME('%Y', `First Date`) - STRFTIME('%Y', Birthday)) FROM Patient",
"permission": "allowed",
"query_columns": {
"patient": [
"Birthday",
"First Date"
]
},
"missing_columns": {},
"reason": "All required columns are permitted",
"question_id": 1163,
"eviden... |
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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | How many of the patients with the most serious thrombosis cases examined in 1997 are women? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1",
"permission": "denied",
"query_columns": {
"patient": [
"ID",
"SEX"
],
"examination": [
"Exam... |
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... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What is the age gap between the youngest and oldest patient with a normal triglyceride recorded? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"ID"
],
"laboratory": [
"ID",
"TG"
... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1",
"permission": "denied",
"query_columns": {
"patient": [
"Birthday",
"Diagnosis",
"ID"
],
"examination": [... |
thrombosis_prediction | ##Instruction:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Database: thrombosis_prediction
Total Tables: 3
Total Columns: 64
Table Schemas:
Table: Examination (13 columns)
-------------------------------
• ID (integer): identification of the patient
• Examination Date (date): Ex... | PatientCoordinator | {
"Examination": [
"ID",
"Examination Date"
],
"Patient": [
"ID",
"SEX",
"Birthday",
"Description",
"First Date",
"Admission"
],
"Laboratory": [
"ID",
"Date"
]
} | For the year that concluded on December 31, 1998, how many male patients on average were tested in the lab each month? | SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M' | moderate | {
"gold_sql": "SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M'",
"permission": "allowed",
"query_columns": {
"patient": [
"ID",
"SEX"
],
"laboratory": [
"Date",
"ID"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.