db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
european_football_2
select name from country where id in ( select country_id from league where name = 'poland ekstraklasa' )
Question: in what country did the poland ekstraklasa take place? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_acc...
in what country did the poland ekstraklasa take place?
european_football_2
select t2.home_team_goal, t2.away_team_goal from league as t1 inner join match as t2 on t1.id = t2.league_id where t1.name = 'belgium jupiler league' and substr(t2.`date`, 1, 10) = '2008-09-24'
Question: what was the final score for the match on september 24, 2008, in the belgian jupiler league between the home team and the away team? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finish...
what was the final score for the match on september 24, 2008, in the belgian jupiler league between the home team and the away team?
european_football_2
select sprint_speed, agility, acceleration from player_attributes where player_api_id in ( select player_api_id from player where player_name = 'alexis blin' )
Question: what are alexis blin's sprint speed, agility, and acceleration scores? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curv...
what are alexis blin's sprint speed, agility, and acceleration scores?
european_football_2
select distinct t1.buildupplayspeedclass from team_attributes as t1 inner join team as t2 on t1.team_api_id = t2.team_api_id where t2.team_long_name = 'ksv cercle brugge'
Question: does the ksv cercle brugge team have a slow, balanced or fast speed class? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, ...
does the ksv cercle brugge team have a slow, balanced or fast speed class?
european_football_2
select count(t2.id) from league as t1 inner join match as t2 on t1.id = t2.league_id where t1.name = 'italy serie a' and t2.season = '2015/2016'
Question: in the 20152016 season, how many games were played in the italian serie a league? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, drib...
in the 20152016 season, how many games were played in the italian serie a league?
european_football_2
select max(t2.home_team_goal) from league as t1 inner join match as t2 on t1.id = t2.league_id where t1.name = 'netherlands eredivisie'
Question: what was the highest score of the home team in the netherlands eredivisie league? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, drib...
what was the highest score of the home team in the netherlands eredivisie league?
european_football_2
select id, finishing, curve from player_attributes where player_api_id = ( select player_api_id from player order by weight desc limit 1 ) limit 1
Question: please state the finishing rate and curve score of the player who has the heaviest weight. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, voll...
please state the finishing rate and curve score of the player who has the heaviest weight.
european_football_2
select t1.name from league as t1 inner join match as t2 on t1.id = t2.league_id where t2.season = '2015/2016' group by t1.name order by count(t2.id) desc limit 1
Question: which league had the most games in the 20152016 season? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_ac...
which league had the most games in the 20152016 season?
european_football_2
select t2.team_long_name from match as t1 inner join team as t2 on t1.away_team_api_id = t2.team_api_id order by t1.away_team_goal desc limit 1
Question: please provide the full name of the away team that scored the most goals. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, c...
please provide the full name of the away team that scored the most goals.
european_football_2
select distinct t1.player_name from player as t1 inner join player_attributes as t2 on t1.player_api_id = t2.player_api_id where t2.overall_rating = ( select max(overall_rating) from player_attributes)
Question: please name one player whose overall strength is the greatest. | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_...
please name one player whose overall strength is the greatest.
european_football_2
select cast(count(case when t2.overall_rating > 70 then t1.id else null end) as real) * 100 / count(t1.id) percent from player as t1 inner join player_attributes as t2 on t1.player_api_id = t2.player_api_id where t1.height < 180
Question: what is the percentage of players that are under 180 cm who have an overall strength of more than 70? | Tables: Player_Attributes -> id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_pa...
what is the percentage of players that are under 180 cm who have an overall strength of more than 70?
thrombosis_prediction
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'
Question: are there more in-patient or outpatient who were male? what is the deviation in percentage? | 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. ...
are there more in-patient or outpatient who were male? what is the deviation in percentage?
thrombosis_prediction
select cast(sum(case when strftime('%y', birthday) > '1930' then 1 else 0 end) as real) * 100 / count(*) from patient where sex = 'f'
Question: what is the percentage of female patient were born after 1930? | 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, ...
what is the percentage of female patient were born after 1930?
thrombosis_prediction
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'
Question: for patient born between year 1930 to 1940, how many percent of them were inpatient? | 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...
for patient born between year 1930 to 1940, how many percent of them were inpatient?
thrombosis_prediction
select sum(case when admission = '+' then 1 else 0 end) / sum(case when admission = '-' then 1 else 0 end) from patient where diagnosis = 'sle'
Question: what is the ratio of outpatient to inpatient followed up treatment among all the 'sle' diagnosed patient? | 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...
what is the ratio of outpatient to inpatient followed up treatment among all the 'sle' diagnosed patient?
thrombosis_prediction
select t1.diagnosis, t2.date from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.id = 30609
Question: what is the disease patient '30609' diagnosed with. list all the date of laboratory tests done for this patient. | 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...
what is the disease patient '30609' diagnosed with. list all the date of laboratory tests done for this patient.
thrombosis_prediction
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
Question: state the sex and birthday of patient id '163109'. when was the examination taken and what symptom does the patient had. | 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...
state the sex and birthday of patient id '163109'. when was the examination taken and what symptom does the patient had.
thrombosis_prediction
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
Question: list the patient id, sex and birthday of patient with ldh beyond 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. Laboratory ->...
list the patient id, sex and birthday of patient with ldh beyond normal range.
thrombosis_prediction
select distinct t1.id, strftime('%y', current_timestamp) - strftime('%y', t1.birthday) from patient as t1 inner join examination as t2 on t1.id = t2.id where t2.rvvt = '+'
Question: state the id and age of patient with positive 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, Diagnosis. Laboratory -> ID, Date,...
state the id and age of patient with positive degree of coagulation.
thrombosis_prediction
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
Question: for patients with severe degree of thrombosis, list their id, sex and dieseas the patient is 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, Admis...
for patients with severe degree of thrombosis, list their id, sex and dieseas the patient is diagnosed with.
thrombosis_prediction
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
Question: list all patients who were born in 1937 whose total cholesterol was beyond 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....
list all patients who were born in 1937 whose total cholesterol was beyond the normal range.
thrombosis_prediction
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
Question: for patient with albumin level lower than 3.5, list their id, sex and 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, Diagnosis. Laboratory ...
for patient with albumin level lower than 3.5, list their id, sex and diagnosis.
thrombosis_prediction
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'
Question: what is the percentage of female patient had total protein not 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, Admission, Diagnosis. Labo...
what is the percentage of female patient had total protein not within the normal range?
thrombosis_prediction
select avg(t2.`acl igg`) from patient as t1 inner join examination as t2 on t1.id = t2.id where strftime('%y', current_timestamp) - strftime('%y', t1.birthday) >= 50 and t1.admission = '+'
Question: for in-patient age 50 and above, what is their average anti-cardiolipin antibody (igg) concentration? | 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, D...
for in-patient age 50 and above, what is their average anti-cardiolipin antibody (igg) concentration?
thrombosis_prediction
select count(*) from patient where strftime('%y', description) = '1997' and sex = 'f' and admission = '-'
Question: how many female patients who came at the hospital in 1997 was immediately 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, First Date, Admis...
how many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?
thrombosis_prediction
select min(strftime('%y', `first date`) - strftime('%y', birthday)) from patient
Question: what was the age of the youngest patient when they initially arrived at 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, Diagnosis. Labora...
what was the age of the youngest patient when they initially arrived at the hospital?
thrombosis_prediction
select cast(sum(case when t1.sex = 'f' then 1 else 0 end) as real) / count(*) from patient as t1 inner join examination as t2 on t1.id = t2.id where strftime('%y', t2.`examination date`) = '1997' and t2.thrombosis = 1
Question: how many of the patients with the most serious thrombosis cases examined in 1997 are women? | 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. ...
how many of the patients with the most serious thrombosis cases examined in 1997 are women?
thrombosis_prediction
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
Question: what is the age gap between the youngest and oldest patient with a normal triglyceride 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, Diagno...
what is the age gap between the youngest and oldest patient with a normal triglyceride recorded?
thrombosis_prediction
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
Question: what are the symptoms observed by the youngest patient to ever did a medical examination? identify their 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...
what are the symptoms observed by the youngest patient to ever did a medical examination? identify their diagnosis.
thrombosis_prediction
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'
Question: for the year that concluded on december 31, 1998, how many male patients on average were tested in the lab each month? | 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 D...
for the year that concluded on december 31, 1998, how many male patients on average were tested in the lab each month?
thrombosis_prediction
select t1.date, strftime('%y', t2.`first date`) - strftime('%y', t2.birthday) from laboratory as t1 inner join patient as t2 on t1.id = t2.id where t2.diagnosis = 'sjs' and t2.birthday is not null order by t2.birthday asc limit 1
Question: the oldest sjs patient's medical laboratory work was completed on what date, and what age was the patient when they initially arrived at 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...
the oldest sjs patient's medical laboratory work was completed on what date, and what age was the patient when they initially arrived at the hospital?
thrombosis_prediction
select cast(sum(case when t2.ua <= 8.0 and t1.sex = 'm' then 1 else 0 end) as real) / sum(case when t2.ua <= 6.5 and t1.sex = 'f' then 1 else 0 end) from patient as t1 inner join laboratory as t2 on t1.id = t2.id
Question: what is the ratio of male to female patients among all those with abnormal uric acid counts? | 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 ratio of male to female patients among all those with abnormal uric acid counts?
thrombosis_prediction
select count(distinct t1.id) from patient as t1 inner join examination as t2 on t1.id = t2.id where t1.admission = '+' and strftime('%y', t2.`examination date`) - strftime('%y', t1.`first date`) >= 1
Question: how many patients hadn't undergone a medical examination until at least a year following their initial hospital visit? | 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 D...
how many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?
thrombosis_prediction
select count(t1.id) from patient as t1 inner join examination as t2 on t1.id = t2.id where strftime('%y', t2.`examination date`) between '1990' and '1993' and strftime('%y', t2.`examination date`) - strftime('%y', t1.birthday) < '18'
Question: how many underage patients were examined during the course of the three-year period from 1990 to 1993? | 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, ...
how many underage patients were examined during the course of the three-year period from 1990 to 1993?
thrombosis_prediction
select count(distinct t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`t-bil` >= 2.0 and t1.sex = 'm'
Question: how many male patients have elevated total bilirubin count? | 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 male patients have elevated total bilirubin count?
thrombosis_prediction
select t2.diagnosis from examination as t1 inner join patient as t2 on t1.id = t2.id where t1.`examination date` between '1985-01-01' and '1995-12-31' group by t2.diagnosis order by count(t2.diagnosis) desc limit 1
Question: what is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985, and 12/31/1995? | 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...
what is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985, and 12/31/1995?
thrombosis_prediction
select avg('1999' - strftime('%y', t2.birthday)) from laboratory as t1 inner join patient as t2 on t1.id = t2.id where t1.date between '1991-10-01' and '1991-10-30'
Question: what is the average age of patients examined in the laboratory for the october of the year 1991? | 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, Diagno...
what is the average age of patients examined in the laboratory for the october of the year 1991?
thrombosis_prediction
select strftime('%y', t2.date) - strftime('%y', t1.birthday), t1.diagnosis from patient as t1 inner join laboratory as t2 on t1.id = t2.id order by t2.hgb desc limit 1
Question: how old was the patient who had the highest hemoglobin count at the time of the examination, and what is the doctor's 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, Descriptio...
how old was the patient who had the highest hemoglobin count at the time of the examination, and what is the doctor's diagnosis?
thrombosis_prediction
select ana from examination where id = 3605340 and `examination date` = '1996-12-02'
Question: what was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2? | 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...
what was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?
thrombosis_prediction
select case when `t-cho` < 250 then 'normal' else 'abnormal' end from laboratory where id = 2927464 and date = '1995-09-04'
Question: was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal 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....
was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?
thrombosis_prediction
select sex from patient where diagnosis = 'aortitis' and `first date` is not null order by `first date` asc limit 1
Question: what was the gender of the first aortitis diagnosed patient? | 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, GP...
what was the gender of the first aortitis diagnosed patient?
thrombosis_prediction
select `acl iga`, `acl igg`, `acl igm` from examination where id in ( select id from patient where diagnosis = 'sle' and description = '1994-02-19' ) and `examination date` = '1993-11-12'
Question: for the patient who was diagnosed with sle on 1994/2/19, what was his/her anti-cardiolipin antibody concentration status on 1993/11/12? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Des...
for the patient who was diagnosed with sle on 1994/2/19, what was his/her anti-cardiolipin antibody concentration status on 1993/11/12?
thrombosis_prediction
select t1.sex from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.gpt = 9.0 and t2.date = '1992-06-12'
Question: was the patient a man or a women whose alt glutamic pylvic transaminase status got 9 on 1992-6-12? | 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...
was the patient a man or a women whose alt glutamic pylvic transaminase status got 9 on 1992-6-12?
thrombosis_prediction
select strftime('%y', t2.date) - strftime('%y', t1.birthday) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.ua = 8.4 and t2.date = '1991-10-21'
Question: for the patient who got the laboratory test of uric acid level as 8.4 on 1991-10-21, how old was he/she at that time? | 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 Da...
for the patient who got the laboratory test of uric acid level as 8.4 on 1991-10-21, how old was he/she at that time?
thrombosis_prediction
select count(*) from laboratory where id = ( select id from patient where `first date` = '1991-06-13' and diagnosis = 'sjs' ) and strftime('%y', date) = '1995'
Question: for the patient who first came to the hospital on 1991/6/13 who was diagnosed with sjs, what is the total number of his/her laboratory tests in 1995? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX,...
for the patient who first came to the hospital on 1991/6/13 who was diagnosed with sjs, what is the total number of his/her laboratory tests in 1995?
thrombosis_prediction
select t1.diagnosis from patient as t1 inner join examination as t2 on t1.id = t2.id where t1.id = ( select id from examination where `examination date` = '1997-01-27' and diagnosis = 'sle' ) and t2.`examination date` = t1.`first date`
Question: for the patient who was diagnosed sle on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday,...
for the patient who was diagnosed sle on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?
thrombosis_prediction
select t2.symptoms from patient as t1 inner join examination as t2 on t1.id = t2.id where t1.birthday = '1959-03-01' and t2.`examination date` = '1993-09-27'
Question: for the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27? | 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 patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?
thrombosis_prediction
select cast((sum(case when t2.date like '1981-11-%' then t2.`t-cho` else 0 end) - sum(case when t2.date like '1981-12-%' then t2.`t-cho` else 0 end)) as real) / sum(case when t2.date like '1981-12-%' then t2.`t-cho` else 0 end) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.birthday = '1959-02...
Question: for the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from november to december in 1981? | 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...
for the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from november to december in 1981?
thrombosis_prediction
select id from examination where `examination date` between '1997-01-01' and '1997-12-31' and diagnosis = 'behcet'
Question: lists all patients by id who were diagnosed with behcet's and had their exams between 01/01/197 and 12/31/1997. | 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...
lists all patients by id who were diagnosed with behcet's and had their exams between 01/01/197 and 12/31/1997.
thrombosis_prediction
select distinct id from laboratory where date between '1987-07-06' and '1996-01-31' and gpt > 30 and alb < 4
Question: how many patients who were examined between 1987/7/6 and 1996/1/31 had a gpt level greater than 30 and an alb level less than 4? list them by their id. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SE...
how many patients who were examined between 1987/7/6 and 1996/1/31 had a gpt level greater than 30 and an alb level less than 4? list them by their id.
thrombosis_prediction
select id from patient where strftime('%y', birthday) = '1964' and sex = 'f' and admission = '+'
Question: how many female patients born in 1964 were admitted to the hospital? list them by 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, Admission, Diagnosis. Labora...
how many female patients born in 1964 were admitted to the hospital? list them by id.
thrombosis_prediction
select count(*) from examination where thrombosis = 2 and `ana pattern` = 's' and `acl igm` > (select avg(`acl igm`) * 1.2 from examination where thrombosis = 2 and `ana pattern` = 's')
Question: what number of patients with a degree of thrombosis level 2 and ana pattern of only s, have a level of anti-cardiolip in antibody (igm) 20% higher than average? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient ...
what number of patients with a degree of thrombosis level 2 and ana pattern of only s, have a level of anti-cardiolip in antibody (igm) 20% higher than average?
thrombosis_prediction
select cast(sum(case when ua <= 6.5 then 1 else 0 end) as real) * 100 / count(id) from laboratory where `u-pro` > 0 and `u-pro` < 30
Question: what percentage of patients with a proteinuria level within the normal range have a uric acid level below 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, Fi...
what percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?
thrombosis_prediction
select cast(sum(case when diagnosis = 'behcet' then 1 else 0 end) as real) * 100 / count(id) from patient where strftime('%y', `first date`) = '1981' and sex = 'm'
Question: what percentage of male patients who first presented to the hospital in 1981 were diagnosed with behcet? | 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...
what percentage of male patients who first presented to the hospital in 1981 were diagnosed with behcet?
thrombosis_prediction
select distinct t1.id from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.admission = '-' and t2.`t-bil` < 2.0 and strftime('%y', t2.date) = '1991' and strftime('%m', t2.date) = '10'
Question: list all patients who were followed up at the outpatient clinic who underwent a laboratory test in october 1991 and had a total blood bilirubin level within the normal range. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thromb...
list all patients who were followed up at the outpatient clinic who underwent a laboratory test in october 1991 and had a total blood bilirubin level within the normal range.
thrombosis_prediction
select count(distinct t1.id) from patient as t1 inner join examination as t2 on t1.id = t2.id where t2.`ana pattern` != 'p' and strftime('%y', t1.birthday) between '1980' and '1989' and t1.sex = 'f'
Question: excluding all p only ana pattern patients, how many of the remainder are women born between 1980 and 1989? | 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...
excluding all p only ana pattern patients, how many of the remainder are women born between 1980 and 1989?
thrombosis_prediction
select t1.sex from patient as t1 inner join examination as t2 on t1.id = t2.id inner join laboratory as t3 on t3.id = t2.id where t2.diagnosis = 'pss' and t3.crp = '2+' and t3.cre = 1.0 and t3.ldh = 123
Question: what sex is the patient who in a medical examination was diagnosed with pss and in a laboratory examination had a blood level of c-reactive protein de 2+, createnine 1 and ldh 123? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, ...
what sex is the patient who in a medical examination was diagnosed with pss and in a laboratory examination had a blood level of c-reactive protein de 2+, createnine 1 and ldh 123?
thrombosis_prediction
select avg(t2.alb) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.plt > 400 and t1.diagnosis = 'sle' and t1.sex = 'f'
Question: what is the average blood albumin level for female patients with a plt greater than 400 who have been 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, Description, Firs...
what is the average blood albumin level for female patients with a plt greater than 400 who have been diagnosed with sle?
thrombosis_prediction
select symptoms from examination where diagnosis = 'sle' group by symptoms order by count(symptoms) desc limit 1
Question: what is the most common sign of patients with sle disease? | 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,...
what is the most common sign of patients with sle disease?
thrombosis_prediction
select `first date`, diagnosis from patient where id = 48473
Question: when was the medical information on patient number 48473 first documented, and what disease did she have? | 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...
when was the medical information on patient number 48473 first documented, and what disease did she have?
thrombosis_prediction
select count(id) from patient where sex = 'f' and diagnosis = 'aps'
Question: how many female patients were given an aps 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, Diagnosis. Laboratory -> ID, Date, GOT, GPT, LDH,...
how many female patients were given an aps diagnosis?
thrombosis_prediction
select count(id) from laboratory where alb <= 6.0 or alb >= 8.5 and strftime('%y', date) = '1997'
Question: how many patients who underwent testing in 1997 had protein levels outside 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....
how many patients who underwent testing in 1997 had protein levels outside the normal range?
thrombosis_prediction
select cast(sum(case when diagnosis = 'sle' then 1 else 0 end) as real) * 100 / count(id) from examination where symptoms = 'thrombocytopenia'
Question: what proportion of patients who had signs of thrombocytopenia had sle diagnosed? | 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 ...
what proportion of patients who had signs of thrombocytopenia had sle diagnosed?
thrombosis_prediction
select cast(sum(case when sex = 'f' then 1 else 0 end) as real) * 100 / count(id) from patient where diagnosis = 'ra' and strftime('%y', birthday) = '1980'
Question: what percentage of patients who were born in 1980 and were diagnosed with ra are women? | 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...
what percentage of patients who were born in 1980 and were diagnosed with ra are women?
thrombosis_prediction
select count(t1.id) from patient as t1 inner join examination as t2 on t1.id = t2.id where t2.diagnosis = 'behcet' and t1.sex = 'm' and strftime('%y', t2.`examination date`) between '1995' and '1997' and t1.admission = '-'
Question: how many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with behcet disease did not stay in the hospital for treatment? | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patien...
how many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with behcet disease did not stay in the hospital for treatment?
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.wbc < 3.5 and t1.sex = 'f'
Question: how many patients who were female got white blood cells that were below 3.5? | 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...
how many patients who were female got white blood cells that were below 3.5?
thrombosis_prediction
select strftime('%d', t3.`examination date`) - strftime('%d', t1.`first date`) from patient as t1 inner join examination as t3 on t1.id = t3.id where t1.id = 821298
Question: how long did it take after patient number 821298 arrived at the hospital for the first time before her evaluation began? | 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...
how long did it take after patient number 821298 arrived at the hospital for the first time before her evaluation began?
thrombosis_prediction
select case when (t1.sex = 'f' and t2.ua > 6.5) or (t1.sex = 'm' and t2.ua < 8.0) then true else false end from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.id = 57266
Question: was the patient with the number 57266's uric acid within a 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. Laboratory -> ID, D...
was the patient with the number 57266's uric acid within a normal range?
thrombosis_prediction
select date from laboratory where id = 48473 and got >= 60
Question: when is the laboratory examination of patient '48473' where his/her ast glutamic oxaloacetic transaminase (got) index is above 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, Birt...
when is the laboratory examination of patient '48473' where his/her ast glutamic oxaloacetic transaminase (got) index is above the normal range.
thrombosis_prediction
select distinct t1.sex, t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.got < 60 and strftime('%y', t2.date) = '1994'
Question: list all patients with their sex and date of birthday, whose ast glutamic oxaloacetic transaminase (got) index is within normal range for loboratory examination in 1994. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis....
list all patients with their sex and date of birthday, whose ast glutamic oxaloacetic transaminase (got) index is within normal range for loboratory examination in 1994.
thrombosis_prediction
select distinct t1.id from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.sex = 'm' and t2.gpt >= 60
Question: provide ids for male patients with alt glutamic pylvic transaminase (gpt) that have history of alt glutamic pylvic transaminase (gpt) exceed the normal range. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient ->...
provide ids for male patients with alt glutamic pylvic transaminase (gpt) that have history of alt glutamic pylvic transaminase (gpt) exceed the normal range.
thrombosis_prediction
select distinct t1.diagnosis from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.gpt > 60 order by t1.birthday asc
Question: please provide the diagnosis of patients with alt glutamic pylvic transaminase beyond the normal range by ascending order of their 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, Bir...
please provide the diagnosis of patients with alt glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth.
thrombosis_prediction
select avg(ldh) from laboratory where ldh < 500
Question: what is the average index of the lactate dehydrogenase (ldh) for all patients with lactate dehydrogenase (ldh) 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, Des...
what is the average index of the lactate dehydrogenase (ldh) for all patients with lactate dehydrogenase (ldh) within the normal range.
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 t2.ldh > 600 and t2.ldh < 800
Question: provide the id and age of patient with lactate dehydrogenase (ldh) between 100-300 index above 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...
provide the id and age of patient with lactate dehydrogenase (ldh) between 100-300 index above the normal range.
thrombosis_prediction
select t1.admission from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.alp < 300
Question: for patients with alkaliphophatase (alp) within normal range, were they treated as inpatient or outpatient? | 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, Admiss...
for patients with alkaliphophatase (alp) within normal range, were they treated as inpatient or outpatient?
thrombosis_prediction
select t1.id , case when t2.alp < 300 then 'normal' else 'abnormal' end from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.birthday = '1982-04-01'
Question: name the id of the patient who is born on the april 1st, 1982. is his/her alkaliphophatase (alp) within 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 Da...
name the id of the patient who is born on the april 1st, 1982. is his/her alkaliphophatase (alp) within normal range?
thrombosis_prediction
select distinct t1.id, t1.sex, t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.tp < 6.0
Question: list id, sex and date of birth of patient whose total protein (tp) below the lower range of the normal index. | 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, Admi...
list id, sex and date of birth of patient whose total protein (tp) below the lower range of the normal index.
thrombosis_prediction
select t2.tp - 8.5 from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.sex = 'f' and t2.tp > 8.5
Question: for all female patient with total protein (tp) beyond the normal index, what is the deviation of their tp idex from the 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...
for all female patient with total protein (tp) beyond the normal index, what is the deviation of their tp idex from the normal.
thrombosis_prediction
select distinct t1.id from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.sex = 'm' and (t2.alb <= 3.5 or t2.alb >= 5.5) order by t1.birthday
Question: sort in descending order all patients by birthday for male patient with albumin not within 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, Diagn...
sort in descending order all patients by birthday for male patient with albumin not within range.
thrombosis_prediction
select case when t2.alb >= 3.5 and t2.alb <= 5.5 then 'normal' else 'abnormal' end from patient as t1 inner join laboratory as t2 on t1.id = t2.id where strftime('%y', t1.birthday) = '1982'
Question: for all patient born in 1982, state if their albumin is within 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. Laboratory -> I...
for all patient born in 1982, state if their albumin is within normal range.
thrombosis_prediction
select cast(sum(case when t2.ua > 6.5 then 1 else 0 end) as real) * 100 / count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t1.sex = 'f'
Question: what is the percentage of the female patient whose uric acid (ua) beyond 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. L...
what is the percentage of the female patient whose uric acid (ua) beyond the normal range?
thrombosis_prediction
select avg(t2.ua) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where (t2.ua > 6.5 and t1.sex = 'f') or (t2.ua > 8.0 and t1.sex = 'm') and t2.date = ( select max(date) from laboratory )
Question: for all patients with normal uric acid (ua), what is the average ua index based on their latest laboratory examination result? | 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,...
for all patients with normal uric acid (ua), what is the average ua index based on their latest laboratory examination result?
thrombosis_prediction
select distinct t1.id, t1.sex, t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.un = 29
Question: provide all id, sex and birthday of patients whose urea nitrogen (un) just within the borderline of passing? | 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...
provide all id, sex and birthday of patients whose urea nitrogen (un) just within the borderline of passing?
thrombosis_prediction
select distinct t1.id, t1.sex, t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.un < 30 and t1.diagnosis = 'ra'
Question: provide the id, sex, birthday of all patients diagnosed with 'ra' that are within the un normal index. | 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, ...
provide the id, sex, birthday of all patients diagnosed with 'ra' that are within the un normal index.
thrombosis_prediction
select count(t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.cre >= 1.5 and t1.sex = 'm'
Question: how many male patients are are with creatinine index out of 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. Laboratory -> ...
how many male patients are are with creatinine index out of the normal range?
thrombosis_prediction
select case when sum(case when t1.sex = 'm' then 1 else 0 end) > sum(case when t1.sex = 'f' then 1 else 0 end) then 'true' else 'false' end from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.cre >= 1.5
Question: are there more male patients with creatinine not within the normal range than female? true or false? | 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, Di...
are there more male patients with creatinine not within the normal range than female? true or false?
thrombosis_prediction
select t2.`t-bil`, t1.id, t1.sex, t1.birthday from patient as t1 inner join laboratory as t2 on t1.id = t2.id order by t2.`t-bil` desc limit 1
Question: what is the highest total bilirubin level recorded? list out the patient details with id, sex and birthday with that index. | 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...
what is the highest total bilirubin level recorded? list out the patient details with id, sex and birthday with that index.
thrombosis_prediction
select distinct case when t1.sex = 'f' then t1.id end , case when t1.sex = 'm' then t1.id end from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`t-bil` >= 2.0
Question: list and group all patients by sex for total bilirubin (t-bil) level not 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, Admission, Diagn...
list and group all patients by sex for total bilirubin (t-bil) level not within the normal range.
thrombosis_prediction
select t1.id, t2.`t-cho` from patient as t1 inner join laboratory as t2 on t1.id = t2.id order by t2.`t-cho` desc, t1.birthday asc limit 1
Question: who is the oldest patient with the highest total cholesterol (t-cho). state the patient id and t-cho index. | 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, Admiss...
who is the oldest patient with the highest total cholesterol (t-cho). state the patient id and t-cho index.
thrombosis_prediction
select avg(strftime('%y', current_timestamp) - strftime('%y', t1.birthday)) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.`t-cho` >= 250 and t1.sex = 'm'
Question: what is the average age of the male patient with high cholesterol? | 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, G...
what is the average age of the male patient with high cholesterol?
thrombosis_prediction
select t1.id, t1.diagnosis from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.tg > 300
Question: provide list of patients and their diagnosis with triglyceride (tg) index greater than 100 of 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...
provide list of patients and their diagnosis with triglyceride (tg) index greater than 100 of the normal range?
thrombosis_prediction
select count(distinct t1.id) from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.tg >= 200 and strftime('%y', current_timestamp) - strftime('%y', t1.birthday) > 50
Question: for all patients with triglyceride (tg) level beyond the normal range, how many are age more than 50 years? | 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, Admiss...
for all patients with triglyceride (tg) level beyond the normal range, how many are age more than 50 years?
thrombosis_prediction
select distinct t1.id from patient as t1 inner join laboratory as t2 on t1.id = t2.id where t2.cpk < 250 and t1.admission = '-'
Question: list all outpatient within normal range of creatinine phosphokinase. give me the distinct ids. | 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...
list all outpatient within normal range of creatinine phosphokinase. give me the distinct ids.
thrombosis_prediction
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
Question: for patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond 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, ...
for patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range?
thrombosis_prediction
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
Question: 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. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthda...
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.
thrombosis_prediction
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
Question: 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. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birthday, Des...
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.
thrombosis_prediction
select distinct 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.sex,t1.id order by t1.birthday asc
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. | Tables: Examination -> ID, Examination Date, aCL IgG, aCL IgM, ANA, ANA Pattern, aCL IgA, Diagnosis, KCT, RVVT, LAC, Symptoms, Thrombosis. Patient -> ID, SEX, Birt...
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.
thrombosis_prediction
select 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
Question: what are the patient's diagnosis for those who has lower red blood blood cell? state their id and age. | 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, ...
what are the patient's diagnosis for those who has lower red blood blood cell? state their id and age.
thrombosis_prediction
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
Question: for all the female patient age 50 and above, who has abnormal red blood cell count. state if they were admitted to 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, F...
for all the female patient age 50 and above, who has abnormal red blood cell count. state if they were admitted to hospital.
thrombosis_prediction
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 = '-'
Question: among all outpatients, list out those have low hemoglobin level. state the different ids and their 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 Date, Admission,...
among all outpatients, list out those have low hemoglobin level. state the different ids and their sex.