Chinastark/bird_dataset huggingface dataset:
Database: thrombosis_prediction
Note: abnormal white blood cell count refers to wbc <= 3.5 or wbc >= 9.0;
Question: 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.
SQL: SELECT DISTINCT patient.id, patient.sex, patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.wbc <= 3.5 OR laboratory.wbc >= 9.0 GROUP BY patient.sex,patient.id ORDER BY patient.birthday ASC
Database: thrombosis_prediction
Note: patient's diagnosis refers to diagnosis; lower red blood cell refers to rbc < 3.5; age = SUBTraCT(year(current_timestamp), year(birthday));
Question: What are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age.
SQL: SELECT DISTINCT patient.diagnosis, patient.id , strftime('%Y', CURRENT_TIMESTAMP) -strftime('%Y', patient.birthday) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.rbc < 3.5
Database: thrombosis_prediction
Note: female patient refers to sex = 'F'; age 50 and above = SUBTraCT(year(current_timestamp), year(birthday)) >= 50; abnormal red blood cell count refers to rbc <= 3.5 or rbc >= 6.0; admission = '+' means the patient was admitted to the hospital; admission = '-' means the patient was not admitted to the hospital;
Question: For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital.
SQL: SELECT DISTINCT patient.id, patient.admission FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.sex = 'F' AND (laboratory.rbc <= 3.5 OR laboratory.rbc >= 6.0) AND strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) >= 50
Database: thrombosis_prediction
Note: outpatients refers to admission = '-'; low hemoglobin level refers to HBG < 10;
Question: Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex.
SQL: SELECT DISTINCT patient.id, patient.sex FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.hgb < 10 AND patient.admission = '-'
Database: thrombosis_prediction
Note: diagnosed with SLE refers to diagnosis = 'SLE'; The larger the birthday value, the younger the person is, and vice versa; normal hemoglobin level refers to 10 < hgb < 17;
Question: Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex.
SQL: SELECT patient.id, patient.sex FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.diagnosis = 'SLE' AND laboratory.hgb > 10 AND laboratory.hgb < 17 ORDER BY patient.birthday ASC LIMIT 1
Database: thrombosis_prediction
Note: age = SUBTraCT(year(current_timestamp), year(birthday)); patient with two or more laboratory examinations refers to COunT(id) > 2; hematoclit level exceeded the normal range refers to hct >= 52;
Question: Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.
SQL: SELECT DISTINCT patient.id, strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.id IN ( SELECT id FROM laboratory WHERE hct >= 52 GROUP BY id HAVING count(id) >= 2 )
Database: thrombosis_prediction
Note: laboratory examinations in 1991 refers to date like '1991%'; average hematoclit level = AVG(hct); hematoclit level that is lower than the normal range refers to hct < 29;
Question: From laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range.
SQL: SELECT avg(laboratory.hct) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.hct < 29 AND strftime('%Y', laboratory.date) = '1991'
Database: thrombosis_prediction
Note: abnormal platelet level refers to plt <= 100 or plt >= 400; platelet level lower than normal range refers to plt < 100; calculation = SUBTraCT(SUM(plt < 100), SUM(plt > 400)); platelet level higher than normal range refers to plt > 400;
Question: 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?
SQL: SELECT sum(CASE WHEN laboratory.plt <= 100 THEN 1 ELSE 0 END) - sum(CASE WHEN laboratory.plt >= 400 THEN 1 ELSE 0 END) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id
Database: thrombosis_prediction
Note: laboratory examinations take in 1984 refers to YEAR(date) = '1984'; below 50 years old = SUBTraCT(year(current_timestamp), year(birthday)) < 50; normal platelet level refers to plt between 100 and 400;
Question: For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.
SQL: SELECT DISTINCT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.plt BETWEEN 100 AND 400 AND strftime('%Y', laboratory.date) - strftime('%Y', patient.birthday) < 50 AND strftime('%Y', laboratory.date) = '1984'
Database: thrombosis_prediction
Note: older than 55 years old = SUBTraCT(year(current_timestamp), year(birthday)) > 55; abnormal prothrombin time (pt) refers to pt >= 14; percentage = DIVidE(SUM(pt >= 14 AND sex = 'F'), SUM(pt >= 14)) * 100; female refers to sex = 'F';
Question: For all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (PT)?
SQL: SELECT cast(sum(CASE WHEN laboratory.pt >= 14 AND patient.sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) > 55
Database: thrombosis_prediction
Note: first came to the hospital after year 1992 refers to year(`first date`) > 1992; prothrombin time (pt) level that are normal refers to pt < 14;
Question: List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal.
SQL: SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE strftime('%Y', patient.`first date`) > '1992' AND laboratory.pt < 14
Database: thrombosis_prediction
Note: examinations done after 1997/1/1 refers to `examination date` > '1997-01-01'; normal activated partial prothrom bin time refesr to aptt < 45;
Question: For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.date > '1997-01-01' AND laboratory.aptt >= 45
Database: thrombosis_prediction
Note: abnormal activated partial prothrom bin time refers to aptt > 45; does not have thrombosis refers to thrombosis = 0; Only count ones without repetitive.;
Question: For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON examination.id = laboratory.id WHERE examination.thrombosis = 0 AND laboratory.aptt > 45
Database: thrombosis_prediction
Note: male patients refers to sex = 'M'; normal level of white blood cells refers to wbc > 3.5 and wbc <9.0; abnormal fibrinogen level refers to fg <= 150 or fg >= 450; Don't compute repetitive ones.;
Question: Among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.fg <= 150 OR laboratory.fg >= 450 AND laboratory.wbc > 3.5 AND laboratory.wbc < 9.0 AND patient.sex = 'M'
Database: thrombosis_prediction
Note: born after 1980/1/1 refers to birthday > '1980-01-01'; normal fibrinogen level refers to fg between 150 and 450; Should return the number of distinct patients.;
Question: How many patients born after 1980/1/1 have an abnormal fibrinogen level?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.fg <= 150 OR laboratory.fg >= 450 AND patient.birthday > '1980-01-01'
Database: thrombosis_prediction
Note: disease names refers to diagnosis; proteinuria level higher than normal refers to `u-pro` >= 30;
Question: Please list the disease names of the patients that have a proteinuria level higher than normal.
SQL: SELECT patient.diagnosis FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.`u-pro` >= 30
Database: thrombosis_prediction
Note: normal proteinuria level refers to 0 < `u-pro` < 30; diagnosed with SLE refers to diagnosis = 'SLE';
Question: Which patient has a normal proteinuria level and is diagnosed with SLE? Please give his or her patient ID.
SQL: SELECT DISTINCT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.`u-pro` > 0 AND laboratory.`u-pro` < 30 AND patient.diagnosis = 'SLE'
Database: thrombosis_prediction
Note: Ig G higher than normal refers to igg >= 2000; Should consider DISTINCT in the final result;
Question: How many patients with an Ig G higher than normal?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON examination.id = laboratory.id WHERE laboratory.igg >= 2000
Database: thrombosis_prediction
Note: normal Ig G level refers to igg > 900 and igg < 2000; have symptoms refers to symptoms IS NOT NULL;
Question: Among the patients with a normal Ig G level, how many of them have symptoms?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON examination.id = laboratory.id WHERE laboratory.igg BETWEEN 900 AND 2000 AND examination.symptoms IS NOT NULL
Database: thrombosis_prediction
Note: highest Ig A within the normal range refers to MAX(iga BETWEEN 80 AND 500);
Question: For the patient who has the highest Ig A within the normal range, what is his or her diagnosis?
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 LIMIT 1
Database: thrombosis_prediction
Note: normal Ig A level refers to iga > 80 AND iga < 500; came to the hospital after 1990/1/1 refers to YEAR(`first date`) >= 1990;
Question: How many patients with a normal Ig A level came to the hospital after 1990/1/1?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.iga BETWEEN 80 AND 500 AND  strftime('%Y',  patient.`first date`) > '1990'
Database: thrombosis_prediction
Note: abnormal Ig M level refers to igm <=40 OR igm >= 400; most common disease refers to MAX(COunT(diagnosis));
Question: For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with?
SQL: SELECT patient.diagnosis FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.igm NOT BETWEEN 40 AND 400 GROUP BY patient.diagnosis ORDER BY count(patient.diagnosis) DESC LIMIT 1
Database: thrombosis_prediction
Note: abnormal C-reactive protein refers to crp ='+'; don't have data recorded refers to description IS NULL;
Question: How many patients with a abnormal C-reactive protein don't have their data recorded?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE (laboratory.crp = '+' ) AND patient.description IS NULL
Database: thrombosis_prediction
Note: creatinine level is abnormal refers to cre >= 1.5; aren't 70 yet refers to SUBTraCT((YEAR(CURdate()), YEAR(birthday))) < 70;
Question: Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.cre >= 1.5 AND strftime('%Y', date('now')) - strftime('%Y', patient.birthday) < 70
Database: thrombosis_prediction
Note: normal Rhuematoid Factor refers TO ra IN('-', '+-'); positive measure of degree of coagulation refers to kct = '+'; Should compute the number of distinct ones;
Question: How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON examination.id = laboratory.id WHERE (laboratory.ra = '-' OR laboratory.ra = '+-') AND examination.kct = '+'
Database: thrombosis_prediction
Note: diseases refers to diagnosis; born after 1985/1/1 refers to YEAR(birthday) >= 1985; normal Rhuematoid Factor refers to ra IN('-', '+-');
Question: Please list the diseases of the patients born after 1985-1-1 and have a normal Rhuematoid Factor.
SQL: SELECT patient.diagnosis FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE (laboratory.ra = '-' OR laboratory.ra = '+-') AND patient.birthday > '1985-01-01'
Database: thrombosis_prediction
Note: rf is normal refers to rf < 20; older than 60 = SUBTraCT((YEAR(CURdate()), YEAR(birthday))) > 60;
Question: Please list the ID of the patient whose RF is normal and who is older than 60.
SQL: SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.rf < 20 AND strftime('%Y', date('now')) - strftime('%Y', patient.birthday) > 60
Database: thrombosis_prediction
Note: normal rf refers to rf < 20; don't have thrombosis refers to thrombosis = '0';
Question: How many patients with a normal RF don't have thrombosis?
SQL: SELECT count(DISTINCT examination.id) FROM examination INNER JOIN laboratory ON examination.id = laboratory.id WHERE laboratory.rf < 20 AND examination.thrombosis = 0
Database: thrombosis_prediction
Note: normal level of complement 3 refers to c3 > 35; have a P pattern observed in the sheet of ana examination refers to ana pattern = 'P'; Should compute the number of distinct ones;
Question: How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination?
SQL: SELECT count(DISTINCT examination.id) FROM examination INNER JOIN laboratory ON examination.id = laboratory.id WHERE laboratory.c3 > 35 AND examination.`ana pattern` = 'P'
Database: thrombosis_prediction
Note: Hematoclit is normal refers to 29 < N < 52; highest anti-Cardiolipin antibody concentration refers to MAX(`acl iga`);
Question: 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.
SQL: SELECT DISTINCT patient.id FROM patient INNER JOIN examination ON patient.id = examination.id INNER JOIN laboratory ON patient.id = laboratory.id WHERE (laboratory.hct >= 52 OR laboratory.hct <= 29) ORDER BY examination.`acl iga` DESC LIMIT 1
Database: thrombosis_prediction
Note: APS will result in Blood Clots in veins; normal level of complement 4 refers to c4 > 10; Should compute the number of different ones;
Question: Among the patients have blood clots in veins, how many of them have a normal level of complement 4?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.c4 > 10 AND patient.diagnosis = 'APS'
Database: thrombosis_prediction
Note: normal level of anti-ribonuclear protein refers to rnp = '-', '+-'; And'-' means 'negative'; '+-' refers to '0'; admitted to the hospital refers to admission = '+'; Should consider DISTINCT in the final result;
Question: How many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.rnp = 'negative' OR laboratory.rnp = '0' AND patient.admission = '+'
Database: thrombosis_prediction
Note: youngest patient refers to MAX(birthday); abnormal anti-ribonuclear protein level refers to rnp NOT IN('-', '+-'); date of birth refers to birthday;
Question: Which is the youngest patient with an abnormal anti-ribonuclear protein level? Please list his or her date of birth.
SQL: SELECT patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.rnp != '-' OR '+-' ORDER BY patient.birthday DESC LIMIT 1
Database: thrombosis_prediction
Note: normal anti-sm refers to sm IN('-', '+-'); sm = 'negative' means '-'; sm = '0' means '+-'; sm = '1' means '+'; does not have thrombosis refers to thrombosis = 0;
Question: Among the patients with normal anti-SM, how many of them does not have thrombosis?
SQL: SELECT count(examination.id) FROM examination INNER JOIN laboratory ON examination.id = laboratory.id WHERE laboratory.sm IN ('negative','0') AND examination.thrombosis = 0
Database: thrombosis_prediction
Note: abnormal anti-sm refers to sm NOT IN ('negative', '0'); youngest refers to MAX(birthday);
Question: For the patients with an abnormal anti-SM, please list the IDs of the three youngest ones.
SQL: SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.sm NOT IN ('negative','0') ORDER BY patient.birthday DESC LIMIT 3
Database: thrombosis_prediction
Note: examination done after 1997/1/1 refers to `examination date` >  1997-01-01; normal anti-scl70 refers to sc170 IN('negative','0');
Question: Please list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70.
SQL: SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.sc170 IN ('negative','0') AND laboratory.date > 1997-01-01
Database: thrombosis_prediction
Note: normal anti-scl70 refers to sc170 IN('negative', '0'); female refers to sex = 'F'; does not have any symptom refers to symptoms IS NULL; Should consider DISTINCT in the final result;
Question: Among the patients who has a normal anti-scl70, how many of them are female and does not have any symptom?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON examination.id = laboratory.id WHERE (laboratory.sc170 = 'negative' OR laboratory.sc170 = '0') AND patient.sex = 'F' AND examination.symptoms IS NULL
Database: thrombosis_prediction
Note: normal anti-ssa refers to ssa IN('-','+-'); came to the hospital before 2000 refers to YEAR(`first date`) < 2000; Should compute the number of distinct ones;
Question: How many patients with a normal anti-SSA came to the hospital before 2000?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.ssa IN ('negative', '0') AND strftime('%Y', laboratory.date) < '2000'
Database: thrombosis_prediction
Note: first patient refers to id with MIN(`first date`); abnormal anti-ssa refers to ssa NOT IN('negative', '0');
Question: Which patient is the first patient with an abnormal anti-SSA to come to the hospital? Please give his or her ID.
SQL: SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.`first date` IS NOT NULL AND laboratory.ssa NOT IN ('negative', '0') ORDER BY patient.`first date` ASC LIMIT 1
Database: thrombosis_prediction
Note: normal anti-ssb refers to ssb IN('-', '+-'); '-' is expressed as 'negative' and '+-' is expressed as '0' in the database ; diagnosed with SLE refers to diagnosis = 'SLE'; Should compute the number of distinct ones;
Question: How many patients have a normal anti-SSB and are diagnosed with SLE in the examination?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.ssb = 'negative' OR '0' AND patient.diagnosis = 'SLE'
Database: thrombosis_prediction
Note: anti-ssb are normal refers to ssb IN ('negative', '0'); have other symptoms refers to symptoms IS NOT NULL; Should compute the number of distinct ones;
Question: For the patients whose anti-SSB are normal, how many of them have other symptoms observed in their examination?
SQL: SELECT count(DISTINCT examination.id) FROM examination INNER JOIN laboratory ON examination.id = laboratory.id WHERE laboratory.ssb = 'negative' OR '0' AND examination.symptoms IS NOT NULL
Database: thrombosis_prediction
Note: normal level of anti-centromere refers to centromea IN('-', '+-'); normal level of anti-ssb refers to ssb IN('-', '+-'); male refers to sex = 'M'; Should consider DISTINCT in the final result;
Question: Among the patients who has a normal level of anti-centromere and a normal level of anti-SSB, how many of them are male?
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.centromea IN ('negative', '0') AND laboratory.ssb IN ('negative', '0') AND patient.sex = 'M'
Database: thrombosis_prediction
Note: abnormal level of anti-dna refers to dna >= 8; diseases refers to diagnosis;
Question: For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with.
SQL: SELECT distinct(patient.diagnosis) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.dna >= 8
Database: thrombosis_prediction
Note: normal anti-dna level refers to dna < 8; data are not recorded refers to description IS NULL; Should compute the number of unique ones;
Question: How many patients have a normal anti-DNA level, yet their data are not recorded.
SQL: SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.dna < 8 AND patient.description IS NULL
Database: thrombosis_prediction
Note: normal level of igg refers to 900 < igg < 2000; admitted to the hospital refers to admission = '+';
Question: Of the patients with an normal level of IGG, how many of them admitted to the hospital?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.igg > 900 AND laboratory.igg <2000 AND  patient.admission = '+'
Database: thrombosis_prediction
Note: abnormal level of glutamic oxaloacetic transaminase refers to got >= 60; percentage = MULTIPLY(DIVidE(COunT(id WHERE got >= 60 AND diagnosis = 'SLE'), COunT(id WHERE got >= 60)), 1.0);
Question: What is the percentage of patient who has a abnormal level of glutamic oxaloacetic transaminase level, yet he or she is diagnosed with SLE?
SQL: SELECT count(CASE WHEN patient.diagnosis LIKE '%SLE%' THEN patient.id ELSE 0 END) / count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.`got` >= 60
Database: thrombosis_prediction
Note: male refers to sex = 'M'; glutamic oxaloacetic transaminase in the normal range refers to got < 60;
Question: How many male patients have their glutamic oxaloacetic transaminase in the normal range?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.got < 60 AND patient.sex = 'M'
Database: thrombosis_prediction
Note: abnormal level of glutamic oxaloacetic transaminase refers to got >= 60; The larger the birthday value, the younger the person is, and vice versa;
Question: Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born?
SQL: SELECT patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.got >= 60 ORDER BY patient.birthday DESC LIMIT 1
Database: thrombosis_prediction
Note: highest glutamic pylvic transaminase in the normal range refers to MAX(gpt < 60);
Question: Please list the top three patients' birthdays with the highest glutamic pylvic transaminase in the normal range.
SQL: SELECT patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.gpt < 60 ORDER BY laboratory.gpt DESC LIMIT 3
Database: thrombosis_prediction
Note: normal glutamic pylvic transaminase level refers to got < 60; male refers to sex = 'M';
Question: For the patients with the normal glutamic pylvic transaminase level, how many of them are male?
SQL: SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.got < 60 AND patient.sex = 'M'