db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
thrombosis_prediction
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
Question: among the patients who were diagnosed with sle, who is the oldest with normal hemoglobin level. provide the id and sex. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First ...
among the patients who were diagnosed with sle, who is the oldest with normal hemoglobin level. provide the id and sex.
thrombosis_prediction
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 )
Question: name the id and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Descri...
name the id and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.
thrombosis_prediction
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'
Question: from laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Ad...
from laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range.
thrombosis_prediction
select 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
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? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thro...
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?
thrombosis_prediction
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'
Question: for laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissi...
for laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.
thrombosis_prediction
select cast(sum(case when t2.pt >= 14 and t1.sex = 'f' then 1 else 0 end) as real) * 100 / count(*) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where strftime('%y', current_timestamp) - strftime('%y', t1.birthday) > 55
Question: for all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (pt)? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, Fir...
for all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (pt)?
thrombosis_prediction
select 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
Question: list all patients who first came to the hospital after year 1992 with prothrombin time (pt) level that are normal. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date,...
list all patients who first came to the hospital after year 1992 with prothrombin time (pt) level that are normal.
thrombosis_prediction
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
Question: for the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First ...
for the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time?
thrombosis_prediction
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 = 3 and t2.aptt > 45
Question: for the patients with an abnormal activated partial prothrom bin time, how many of them have a mild thrombosis? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Ad...
for the patients with an abnormal activated partial prothrom bin time, how many of them have a mild thrombosis?
thrombosis_prediction
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 t2.wbc > 3.5 and t2.wbc < 9.0 and t1.sex = 'm'
Question: among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, Firs...
among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level?
thrombosis_prediction
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'
Question: how many patients born after 1980/1/1 have an abnormal fibrinogen level? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ID, D...
how many patients born after 1980/1/1 have an abnormal fibrinogen level?
thrombosis_prediction
select t1.diagnosis from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`u-pro` >= 30
Question: please list the disease names of the patients that have a proteinuria level higher than normal. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnos...
please list the disease names of the patients that have a proteinuria level higher than normal.
thrombosis_prediction
select distinct t1.id from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`u-pro` > 0 and t2.`u-pro` < 30 and t1.diagnosis = 'sle'
Question: which patient has a normal proteinuria level and is diagnosed with sle? please give his or her patient id. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissi...
which patient has a normal proteinuria level and is diagnosed with sle? please give his or her patient id.
thrombosis_prediction
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 < 900 and t3.symptoms = 'abortion'
Question: how many patients with an ig g lower than normal has the symptom of abortion? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ...
how many patients with an ig g lower than normal has the symptom of abortion?
thrombosis_prediction
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
Question: among the patients with a normal ig g level, how many of them have symptoms? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> I...
among the patients with a normal ig g level, how many of them have symptoms?
thrombosis_prediction
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
Question: for the patient who has the highest ig a within the normal range, what is his or her diagnosis? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnos...
for the patient who has the highest ig a within the normal range, what is his or her diagnosis?
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.iga between 80 and 500 and t1.`first date` > '1990-01-01'
Question: how many patients with a normal ig a level came to the hospital after 1990/1/1? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -...
how many patients with a normal ig a level came to the hospital after 1990/1/1?
thrombosis_prediction
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
Question: for the patients with an abnormal ig m level, what is the most common disease they are diagnosed with? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, ...
for the patients with an abnormal ig m level, what is the most common disease they are diagnosed with?
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where (t2.crp = '-' or t2.crp = '+-' or t2.crp < 1.0) and t1.description is null
Question: how many patients with a normal c-reactive protein don't have their data recorded? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laborator...
how many patients with a normal c-reactive protein don't have their data recorded?
thrombosis_prediction
select count(distinct t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where (t2.crp != '-' and t2.crp != '+-') and t2.crp >= 1.0 and strftime('%y', date('now')) - strftime('%y', t1.birthday) < '18'
Question: among the patients whose c-reactive protein level is abnormal, how many of them aren't 18 yet? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosi...
among the patients whose c-reactive protein level is abnormal, how many of them aren't 18 yet?
thrombosis_prediction
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 = '+'
Question: how many patients with a normal rhuematoid factor has a positive measure of degree of coagulation? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diag...
how many patients with a normal rhuematoid factor has a positive measure of degree of coagulation?
thrombosis_prediction
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 > 1995-01-01
Question: please list the diseases of the patients born after 1995-1-1 and have a normal rhuematoid factor. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagn...
please list the diseases of the patients born after 1995-1-1 and have a normal rhuematoid factor.
thrombosis_prediction
select t1.id from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.rf < 20 and strftime('%y', date('now')) - strftime('%y', t1.birthday) > 60
Question: please list the id of the patient whose rf is normal and who is older than 60. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory ->...
please list the id of the patient whose rf is normal and who is older than 60.
thrombosis_prediction
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
Question: how many patients with a normal rf don't have thrombosis? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ID, Date, GOT, GPT, ...
how many patients with a normal rf don't have thrombosis?
thrombosis_prediction
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'
Question: how many patients with a normal level of complement 3 have a p pattern observed in the sheet of ana examination? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, A...
how many patients with a normal level of complement 3 have a p pattern observed in the sheet of ana examination?
thrombosis_prediction
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
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. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> I...
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.
thrombosis_prediction
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'
Question: among the patients have blood clots in veins, how many of them have a normal level of complement 4? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Dia...
among the patients have blood clots in veins, how many of them have a normal level of complement 4?
thrombosis_prediction
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 = '+'
Question: how many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissio...
how many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital?
thrombosis_prediction
select t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.rnp != '-' or '+-' order by t1.birthday desc limit 1
Question: which is the youngest patient with an abnormal anti-ribonuclear protein level? please list his or her date of birth. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Dat...
which is the youngest patient with an abnormal anti-ribonuclear protein level? please list his or her date of birth.
thrombosis_prediction
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 = 1
Question: among the patients with normal anti-sm, how many of them have the most severe degree of thrombosis? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Dia...
among the patients with normal anti-sm, how many of them have the most severe degree of thrombosis?
thrombosis_prediction
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
Question: for the patients with an abnormal anti-sm, please list the ids of the three youngest ones. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. L...
for the patients with an abnormal anti-sm, please list the ids of the three youngest ones.
thrombosis_prediction
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
Question: please list the ids of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admis...
please list the ids of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70.
thrombosis_prediction
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 = '-' or t2.sc170 = '+-') and t1.sex = 'm' and t3.symptoms = 'vertigo'
Question: among the patients who has a normal anti-scl70, how many of them are male and have the symptom of vertigo? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissi...
among the patients who has a normal anti-scl70, how many of them are male and have the symptom of vertigo?
thrombosis_prediction
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) < '1990'
Question: how many patients with a normal anti-ssa came to the hospital before 1990? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ID,...
how many patients with a normal anti-ssa came to the hospital before 1990?
thrombosis_prediction
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
Question: which patient is the first patient with an abnormal anti-ssa to come to the hospital? please give his or her id. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, A...
which patient is the first patient with an abnormal anti-ssa to come to the hospital? please give his or her id.
thrombosis_prediction
select count(distinct t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.ssb = 'negative' or '0' and t1.diagnosis = 'sle'
Question: how many patients have a normal anti-ssb and are diagnosed with sle in the examination? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Labo...
how many patients have a normal anti-ssb and are diagnosed with sle in the examination?
thrombosis_prediction
select count(distinct t1.id) from examination as t1 inner join laboratory as t2 on t1.id = t2.id where t2.ssb = 'negative' or '0' and t1.symptoms is not null
Question: for the patients whose anti-ssb are normal, how many of them have other symptoms observed in their examination? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Ad...
for the patients whose anti-ssb are normal, how many of them have other symptoms observed in their examination?
thrombosis_prediction
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'
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? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First ...
among the patients who has a normal level of anti-centromere and a normal level of anti-ssb, how many of them are male?
thrombosis_prediction
select distinct(t1.diagnosis) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.dna >= 8
Question: for the patients who have an abnormal level of anti-dna, please list the diseases they are diagnosed with. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissi...
for the patients who have an abnormal level of anti-dna, please list the diseases they are diagnosed with.
thrombosis_prediction
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
Question: how many patients have a normal anti-dna level, yet their data are not recorded. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory ...
how many patients have a normal anti-dna level, yet their data are not recorded.
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`dna-ii` >= 8 and t1.admission = '+'
Question: of the patients with an abnormal level of anti-dna-ii, how many of them admitted to the hospital? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagn...
of the patients with an abnormal level of anti-dna-ii, how many of them admitted to the hospital?
thrombosis_prediction
select count(case when t1.diagnosis like '%sle%' then t1.id else 0 end) / count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`got` >= 60
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? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday,...
what is the percentage of patient who has a abnormal level of glutamic oxaloacetic transaminase level, yet he or she is diagnosed with sle?
thrombosis_prediction
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'
Question: how many male patients have their glutamic oxaloacetic transaminase in the normal range? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Lab...
how many male patients have their glutamic oxaloacetic transaminase in the normal range?
thrombosis_prediction
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
Question: among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First ...
among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born?
thrombosis_prediction
select t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.gpt < 60 order by t2.gpt desc limit 3
Question: please list the top three patients' birthdays with the highest glutamic pylvic transaminase in the normal range. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, A...
please list the top three patients' birthdays with the highest glutamic pylvic transaminase in the normal range.
thrombosis_prediction
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'
Question: for the patients with the normal glutamic pylvic transaminase level, how many of them are male? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnos...
for the patients with the normal glutamic pylvic transaminase level, how many of them are male?
thrombosis_prediction
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
Question: for the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Dat...
for the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded?
thrombosis_prediction
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
Question: when is the latest patient's medical data recorded? this patient should have an abnormal level of lactate dehydrogenase. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First...
when is the latest patient's medical data recorded? this patient should have an abnormal level of lactate dehydrogenase.
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.alp >= 300 and t1.admission = '+'
Question: for the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission,...
for the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital?
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.alp < 300 and t1.admission = '-'
Question: among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Ad...
among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase?
thrombosis_prediction
select t1.diagnosis from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.tp < 6.0
Question: please list the diagnosis of the patients whose total protein is lower than normal. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laborato...
please list the diagnosis of the patients whose total protein is lower than normal.
thrombosis_prediction
select count(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
Question: for the patients who are diagnosed with sjs, how many of them have a normal level of total protein? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Dia...
for the patients who are diagnosed with sjs, how many of them have a normal level of total protein?
thrombosis_prediction
select date from laboratory where alb between 3.5 and 5.5 order by alb desc limit 1
Question: what is the examination date of the patient whose albumin is the highest in the normal range? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis...
what is the examination date of the patient whose albumin is the highest in the normal range?
thrombosis_prediction
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 between 3.5 and 5.5 and t2.tp between 6.0 and 8.5
Question: how many male patients have a normal level of both albumin and total protein? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ...
how many male patients have a normal level of both albumin and total protein?
thrombosis_prediction
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 limit 1
Question: what is the anti cardiolipin antibody concentration of the female patient with the highest uric acid level in the normal range? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description...
what is the anti cardiolipin antibody concentration of the female patient with the highest uric acid level in the normal range?
thrombosis_prediction
select 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 order by t2.ana desc limit 1
Question: what is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissi...
what is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level?
thrombosis_prediction
select t2.id from laboratory as t1 inner join examination as t2 on t1.id = t2.id where t1.cre < 1.5 order by t2.`acl iga` desc limit 1
Question: please list the patient's id whose creatinine level is normal and whose anti cardiolipin antibody concentration level is the highest. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Descr...
please list the patient's id whose creatinine level is normal and whose anti cardiolipin antibody concentration level is the highest.
thrombosis_prediction
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%'
Question: 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? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SE...
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?
thrombosis_prediction
select t3.ana 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.0 order by t2.`t-bil` desc limit 1
Question: what is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First...
what is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range?
thrombosis_prediction
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 = '-'
Question: for the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Descript...
for the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation?
thrombosis_prediction
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 t3.`ana pattern` = 'p' and t2.`t-cho` < 250
Question: 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? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Bi...
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?
thrombosis_prediction
select count(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
Question: among the patients with the normal level of triglyceride, how many of them have other symptoms observed? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission...
among the patients with the normal level of triglyceride, how many of them have other symptoms observed?
thrombosis_prediction
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
Question: what is the disease name of the patient who has the highest level of triglyceride within the normal range? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissi...
what is the disease name of the patient who has the highest level of triglyceride within the normal range?
thrombosis_prediction
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
Question: please list the ids of the patients with no thrombosis and an abnormal level of creatinine phosphokinase. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admissio...
please list the ids of the patients with no thrombosis and an abnormal level of creatinine phosphokinase.
thrombosis_prediction
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 = '+')
Question: for the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Descri...
for the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation?
thrombosis_prediction
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
Question: when is the birthday of the oldest patient whose blood glucose is abnormal? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ID...
when is the birthday of the oldest patient whose blood glucose is abnormal?
thrombosis_prediction
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.glu < 180 and t3.thrombosis = 0
Question: among the patients with a normal blood glucose, how many of them don't have thrombosis? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Labo...
among the patients with a normal blood glucose, how many of them don't have thrombosis?
thrombosis_prediction
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 = '+'
Question: how many patients accepted to the hospital have a normal level of white blood cells? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laborat...
how many patients accepted to the hospital have a normal level of white blood cells?
thrombosis_prediction
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
Question: how many patients diagnosed with sle have a normal white blood cell level? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ID,...
how many patients diagnosed with sle have a normal white blood cell level?
thrombosis_prediction
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 = '-'
Question: 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. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, Fi...
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.
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.plt between 100 and 400 and t1.diagnosis is not null
Question: among the patients who have a normal platelet level, how many of them have other symptoms observed? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Dia...
among the patients who have a normal platelet level, how many of them have other symptoms observed?
thrombosis_prediction
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
Question: please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with mctd. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, A...
please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with mctd.
thrombosis_prediction
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'
Question: for the male patients that have a normal prothrombin time, what is their average prothrombin time? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diag...
for the male patients that have a normal prothrombin time, what is their average prothrombin time?
thrombosis_prediction
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
Question: how many patients with severe thrombosis have a normal prothrombin time? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Description, First Date, Admission, Diagnosis. Laboratory -> ID, D...
how many patients with severe thrombosis have a normal prothrombin time?
student_club
select t2.major_name from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t1.first_name = 'angela' and t1.last_name = 'sanders'
Question: what's angela sanders's major? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, category, spent...
what's angela sanders's major?
student_club
select count(t1.member_id) from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t2.college = 'college of engineering'
Question: how many students in the student_club are from the college of engineering? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_...
how many students in the student_club are from the college of engineering?
student_club
select t1.first_name, t1.last_name from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t2.department = 'art and design department'
Question: please list the full names of the students in the student_club that come from the art and design department. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. att...
please list the full names of the students in the student_club that come from the art and design department.
student_club
select count(t1.event_id) from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event where t1.event_name = 'women''s soccer'
Question: how many students of the student_club have attended the event 'women's soccer'? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, lin...
how many students of the student_club have attended the event 'women's soccer'?
student_club
select t3.phone from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event inner join member as t3 on t2.link_to_member = t3.member_id where t1.event_name = 'women''s soccer'
Question: please list the phone numbers of the students from the student_club that has attended the event 'women's soccer'. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state...
please list the phone numbers of the students from the student_club that has attended the event 'women's soccer'.
student_club
select count(t1.event_id) from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event inner join member as t3 on t2.link_to_member = t3.member_id where t1.event_name = 'women''s soccer' and t3.t_shirt_size = 'medium'
Question: among the students from the student_club who attended the event 'women's soccer', how many of them want a t-shirt that's in medium size? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, cou...
among the students from the student_club who attended the event 'women's soccer', how many of them want a t-shirt that's in medium size?
student_club
select t1.event_name from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event group by t1.event_name order by count(t2.link_to_event) desc limit 1
Question: what is the event that has the highest attendance of the students from the student_club? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_e...
what is the event that has the highest attendance of the students from the student_club?
student_club
select t2.college from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t1.position like 'vice president'
Question: which college is the vice president of the student_club from? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budge...
which college is the vice president of the student_club from?
student_club
select t1.event_name from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event inner join member as t3 on t2.link_to_member = t3.member_id where t3.first_name = 'maya' and t3.last_name = 'mclean'
Question: please list the event names of all the events attended by maya mclean. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_memb...
please list the event names of all the events attended by maya mclean.
student_club
select count(t1.event_id) from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event inner join member as t3 on t2.link_to_member = t3.member_id where t3.first_name = 'sacha' and t3.last_name = 'harrison' and substr(t1.event_date, 1, 4) = '2019'
Question: how many events of the student_club did sacha harrison attend in 2019? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_memb...
how many events of the student_club did sacha harrison attend in 2019?
student_club
select count(t1.event_id) from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event where t1.type = 'meeting' group by t1.type having count(t2.link_to_event) > 10
Question: among the events attended by more than 10 members of the student_club, how many of them are meetings? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance...
among the events attended by more than 10 members of the student_club, how many of them are meetings?
student_club
select t1.event_name from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event group by t1.event_id having count(t2.link_to_event) > 20
Question: please list the names of all the events of the student_club that had an attendance of over 20 students. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendan...
please list the names of all the events of the student_club that had an attendance of over 20 students.
student_club
select cast(count(t2.link_to_event) as real) / count(distinct t2.link_to_event) from event as t1 inner join attendance as t2 on t1.event_id = t2.link_to_event where substr(t1.event_date, 1, 4) = '2020' and t1.type = 'meeting'
Question: what is the average attendance of meetings in 2020? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budge...
what is the average attendance of meetings in 2020?
student_club
select expense_description from expense order by cost desc limit 1
Question: what is the most expensive item that was spent in support of club events? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_m...
what is the most expensive item that was spent in support of club events?
student_club
select count(t1.member_id) from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t2.major_name = 'environmental engineering'
Question: how many members of the student_club have majored environmental engineering? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_t...
how many members of the student_club have majored environmental engineering?
student_club
select t1.first_name, t1.last_name from member as t1 inner join attendance as t2 on t1.member_id = t2.link_to_member inner join event as t3 on t2.link_to_event = t3.event_id where t3.event_name = 'laugh out loud'
Question: list the full name of all the members of the student_club who attended the 'laugh out loud' event. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance ->...
list the full name of all the members of the student_club who attended the 'laugh out loud' event.
student_club
select t1.last_name from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t2.major_name = 'law and constitutional studies'
Question: list the last name of all the students who majored law and constitutional studies. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, ...
list the last name of all the students who majored law and constitutional studies.
student_club
select t2.county from member as t1 inner join zip_code as t2 on t1.zip = t2.zip_code where t1.first_name = 'sherri' and t1.last_name = 'ramsey'
Question: what county did sherri ramsey grew up? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, categor...
what county did sherri ramsey grew up?
student_club
select t2.college from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t1.first_name = 'tyler' and t1.last_name = 'hewitt'
Question: what college offers the major that tyler hewitt took? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> bud...
what college offers the major that tyler hewitt took?
student_club
select t2.amount from member as t1 inner join income as t2 on t1.member_id = t2.link_to_member where t1.position = 'vice president'
Question: what is the amount of the funds that the vice president received? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. b...
what is the amount of the funds that the vice president received?
student_club
select t2.spent from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.event_name = 'september meeting' and t2.category = 'food' and substr(t1.event_date, 6, 2) = '09'
Question: how much did the student_club members spend on food in september meeting? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_m...
how much did the student_club members spend on food in september meeting?
student_club
select t2.city, t2.state from member as t1 inner join zip_code as t2 on t1.zip = t2.zip_code where t1.position = 'president'
Question: what city and state did the president of the student_club grow up? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. ...
what city and state did the president of the student_club grow up?
student_club
select t1.first_name, t1.last_name from member as t1 inner join zip_code as t2 on t1.zip = t2.zip_code where t2.state = 'illinois'
Question: list the full name of the student_club members that grew up in illinois state. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link...
list the full name of the student_club members that grew up in illinois state.
student_club
select t2.spent from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.event_name = 'september meeting' and t2.category = 'advertisement' and substr(t1.event_date, 6, 2) = '09'
Question: how much did the student_club members spend on advertisement in september meeting? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, ...
how much did the student_club members spend on advertisement in september meeting?
student_club
select t2.department from member as t1 inner join major as t2 on t1.link_to_major = t2.major_id where t1.last_name = 'pierce' or t1.last_name = 'guidi'
Question: what department offers the major that pierce and guidi took? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget...
what department offers the major that pierce and guidi took?
student_club
select sum(t2.amount) from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.event_name = 'october speaker'
Question: what is the total budgeted amount for all category in 'october speaker' event? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link...
what is the total budgeted amount for all category in 'october speaker' event?