Chinastark/bird_dataset huggingface dataset:
Database: synthea
Question: Provide at least 5 social security numbers of patients with a prevalent disease with a prevalence percentage lower than 30% of the average prevalence percentage of conditions.
Evidence: social security number refers to ssn; prevalence percentage lower than 30% of the average prevalence percentage of conditions refers to PREVALENCE PERCENTAGE < MULTIPLY(0.3, AVG(PREVALENCE PERCENTAGE));
SQL: SELECT DISTINCT T2.ssn FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON lower(T1.DESCRIPTION) = lower(T3.ITEM) WHERE CAST(T3."PREVALENCE PERCENTAGE" AS REAL) * 100 / ( SELECT AVG('PREVALENCE PERCENTAGE') FROM all_prevalences ) < 30 LIMIT 5
Database: synthea
Question: Among the patients with acute bronchitis, what is the percentage of Asian women?
Evidence: DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
SQL: SELECT CAST(SUM(CASE WHEN T2.gender = 'F' AND T2.race = 'asian' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.gender) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Acute bronchitis (disorder)'
Database: synthea
Question: Provide the number of encounters for Major D'Amore.
SQL: SELECT COUNT(T2.ID) FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Major' AND T1.last = 'D''Amore'
Database: synthea
Question: List the procedures received by Emmy Waelchi.
Evidence: procedures refer to DESCRIPTION from procedures;
SQL: SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Emmy' AND T1.last = 'Waelchi'
Database: synthea
Question: Provide the patients' full names who received the extraction of wisdom tooth.
Evidence: patient's full name refers to first, last; extraction of wisdom tooth refers to DESCRIPTION = 'Extraction of wisdom tooth' from procedures;
SQL: SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Extraction of wisdom tooth'
Database: synthea
Question: Provide the body weight of Elly Koss in every observation.
Evidence: body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
SQL: SELECT T2.DESCRIPTION, T2.VALUE, T2.UNITS FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.DESCRIPTION = 'Body Weight'
Database: synthea
Question: Name the patients who had an allergy to soy.
Evidence: allergy to soy refers to allergies where DESCRIPTION = 'Allergy to soya';
SQL: SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to soya'
Database: synthea
Question: How many times did Keven Kuhn receive DTaP immunization?
Evidence: DTaP immunization refers to immunizations where DESCRIPTION = 'DTaP';
SQL: SELECT COUNT(T2.CODE) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Keven' AND T1.last = 'Kuhn' AND T2.DESCRIPTION = 'DTaP'
Database: synthea
Question: Who had to take Clopidogrel 75 MG Oral Tablet for over 10 years?
Evidence: Who implies the full name of the patient which refers to first, last; Clopidogrel 75 MG Oral Tablet refers to medications where DESCRIPTION = 'Clopidogrel 75 MG Oral Tablet'; for over 10 years refers to SUBTRACT(strftime('%Y', STOP), strftime('%Y', START)) > 10;
SQL: SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Clopidogrel 75 MG Oral Tablet' AND strftime('%Y', T2.STOP) - strftime('%Y', T2.START) > 10
Database: synthea
Question: Which procedures and medications were received by the patient with the third-degree burn?
Evidence: procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
SQL: SELECT DISTINCT T1.DESCRIPTION, T3.DESCRIPTION FROM procedures AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT INNER JOIN medications AS T3 ON T2.patient = T3.PATIENT WHERE T2.DESCRIPTION = 'Third degree burn'
Database: synthea
Question: Provide medications received by patients with an allergy to mould on 6th June 2016.
Evidence: medications refers to DESCRIPTION from medications; allergy to mould refers to allergies where DESCRIPTION = 'Allergy to mould'; on 6th June 2016 refers to START = '6/6/16';
SQL: SELECT T2.DESCRIPTION FROM allergies AS T1 INNER JOIN medications AS T2 ON T1.PATIENT = T2.PATIENT WHERE T1.START = '6/6/16' AND T1.DESCRIPTION = 'Allergy to mould'
Database: synthea
Question: Describe the care plans received by the patient with secondary malignant neoplasm of the colon.
Evidence: care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
SQL: SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Secondary malignant neoplasm of colon'
Database: synthea
Question: What is the prevalence rate of the patients' diseases started on 9th May 2014?
Evidence: diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
SQL: SELECT T2."PREVALENCE RATE" FROM conditions AS T1 INNER JOIN all_prevalences AS T2 ON lower(T1.DESCRIPTION) = lower(T2.ITEM) WHERE T1.START = '2014-05-09'
Database: synthea
Question: Among observations in 2011, provide the names and ages of patients whose Systolic Blood Pressures are 200mmHg.
Evidence: name implies the patient's full name which refers to first, last; age refers to deathdate is null then SUBTRACT(strftime('%Y', DATE), strftime('%Y', birthdate)); Systolic Blood Pressures are 200mmHg refers to DESCRIPTION = 'Systolic Blood Pressure' and VALUE = 200 and UNITS = 'mmHg' from observations; in 2011 refers to DATE like '2011%';
SQL: SELECT T2.first, T2.last , CASE WHEN T2.deathdate IS NULL THEN strftime('%Y', T1.DATE) - strftime('%Y', T2.birthdate) ELSE strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) END AS age FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Systolic Blood Pressure' AND T1.VALUE = 200 AND T1.UNITS = 'mmHg' AND strftime('%Y', T1.DATE) = '2011'
Database: synthea
Question: Among the immunizations in 2017, calculate the percentage of patients who received the Influenza seasonal injectable preservative free. Among them, how many patients are English?
Evidence: DIVIDE(COUNT(PATIENT when DESCRIPTION = 'Influenza seasonal injectable preservative free'), COUNT(PATIENT)) as percentage where strftime('%Y', 2017); English refers ethnicity = 'english';
SQL: SELECT CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Influenza seasonal injectable preservative free' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient), SUM(CASE WHEN T1.ethnicity = 'english' THEN 1 ELSE 0 END) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE strftime('%Y', T2.DATE) = '2017'
Database: synthea
Question: List down the first name of patients who encountered normal pregnancy.
Evidence: encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
SQL: SELECT DISTINCT T1.first FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Normal pregnancy'
Database: synthea
Question: What are the birth date of patients who took outpatient encounter care plan?
Evidence: outpatient encounter care plan refers to careplans where DESCRIPTION = 'Outpatient Encounter';
SQL: SELECT DISTINCT T1.birthdate FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Outpatient Encounter'
Database: synthea
Question: List down the first name of patients who have cystitis condition.
Evidence: cystitis refers to conditions where DESCRIPTION = 'Cystitis';
SQL: SELECT DISTINCT T1.first FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Cystitis'
Database: synthea
Question: How many stroke patients have married?
Evidence: stroke refers to conditions where DESCRIPTION = 'Stroke'; married refers to the marital status of the patient in which marital = 'M';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Stroke' AND T1.marital = 'M'
Database: synthea
Question: List down the address of patients who have billable period in 2010.
SQL: SELECT DISTINCT T1.address FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T2.BILLABLEPERIOD LIKE '2010%'
Database: synthea
Question: List down the last name of patients who are allergic to dairy products.
Evidence: allergic to dairy products refers to allergies where DESCRIPTION = 'Allergy to dairy product';
SQL: SELECT DISTINCT T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to dairy product'
Database: synthea
Question: When the allergy starts for Angelo Buckridge.
SQL: SELECT T2.START FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Adolfo' AND T1.last = 'Schmitt' AND T2.STOP IS NOT NULL
Database: synthea
Question: How many of the male patients are allergic to house dust mites?
Evidence: male patients refer to PATIENT where gender = 'M'; allergic to house dust mites refers to allergies where DESCRIPTION = 'House dust mite allergy';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'House dust mite allergy' AND T1.gender = 'M'
Database: synthea
Question: What kind of allergy is most common among white people?
Evidence: kind of allergy is most common refers to MAX(COUNT(DESCRIPTION)) from allergies; white refers to race = 'white';
SQL: SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.race = 'white' GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1
Database: synthea
Question: List down the first name of patients who received "Influenza seasonal injectable preservative free" immunization.
Evidence: "Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Influenza  seasonal  injectable  preservative free'
Database: synthea
Question: Calculate the number of female patients who accepted "HPV quadrivalent" immunization.
Evidence: female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'HPV  quadrivalent' AND T1.gender = 'F'
Database: synthea
Question: List down the encounter descriptions of patients who were born in Pittsfield MA US.
Evidence: born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
SQL: SELECT DISTINCT T2.DESCRIPTION FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.birthplace = 'Pittsfield MA US'
Database: synthea
Question: Calculate the total type of allergies for German people.
Evidence: type of allergies refers to DESCRIPTION from allergies; German people refer to PATIENT where ethnicity = 'german';
SQL: SELECT COUNT(DISTINCT T2.DESCRIPTION) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.ethnicity = 'german'
Database: synthea
Question: Calculate the average age of patients with prediabetes care plan.
Evidence: SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
SQL: SELECT CAST(SUM(CASE WHEN T1.deathdate IS NULL THEN strftime('%Y', T2.STOP) - strftime('%Y', T1.birthdate) ELSE strftime('%Y', T1.deathdate) - strftime('%Y', T1.birthdate) END) AS REAL) / COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Prediabetes'
Database: synthea
Question: How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?
Evidence: patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive;
SQL: SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL
Database: synthea
Question: How many of the patients who underwent a 'bone immobilization' procedure have a driver's license?
Evidence: patients who underwent a 'bone immobilization' procedure refer to PATIENT from procedures where DESCRIPTION = 'Bone immobilization'; have a driver's license refers to drivers is not null;
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Bone immobilization' AND T1.drivers IS NOT NULL
Database: synthea
Question: Indicate the full name of the patients who have 3 different allergies.
Evidence: full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3;
SQL: SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT GROUP BY T1.patient ORDER BY COUNT(DISTINCT T2.DESCRIPTION) > 3
Database: synthea
Question: How many patients with 'allergy to eggs' have been immunized with 'Td (adult) preservative free'?
Evidence: allergy to eggs' refers to allergies where DESCRIPTION = 'Allergy to eggs'; immunized with 'Td (adult) preservative free' refers to immunizations where DESCRIPTION = 'Td (adult) preservative free';
SQL: SELECT COUNT(DISTINCT T2.patient) FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN immunizations AS T3 ON T2.patient = T3.PATIENT WHERE T1.DESCRIPTION = 'Allergy to eggs' AND T3.DESCRIPTION = 'Td (adult) preservative free'
Database: synthea
Question: How many patients with a body weight of more than 100 kg have a 'diabetes self-management plan' care plan?
Evidence: body weight of more than 100 kg refers to observations.DESCRIPTION = 'Body Weight' AND observations.VALUE > 100 AND observations.UNITS = 'kg'; diabetes self-management plan refers to careplans.DESCRIPTION = 'Diabetes self management plan';
SQL: SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN observations AS T3 ON T2.patient = T3.PATIENT WHERE T3.DESCRIPTION = 'Body Weight' AND T1.DESCRIPTION = 'Diabetes self management plan' AND T3.VALUE > 100 AND T3.UNITS = 'kg'
Database: synthea
Question: What gender is more prone to 'dander (animal) allergy'?
Evidence: gender who is more prone to dander (animal) allergy refers to MAX(COUNT(Gender WHERE allergies.DESCRIPTION = 'Dander (animal) allergy'));
SQL: SELECT T1.gender FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Dander (animal) allergy' GROUP BY T1.gender ORDER BY COUNT(T1.gender) DESC LIMIT 1
Database: synthea
Question: On what dates did the billable period begin for patients with the last name Dickinson?
Evidence: dates when the billable period begin refers to BILLABLEPERIOD;
SQL: SELECT DISTINCT T2.BILLABLEPERIOD FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.last = 'Dickinson'
Database: synthea
Question: List the full name of all patients with 'otitis media'.
Evidence: full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Otitis media'
Database: synthea
Question: How many patients of Irish ethnicity take medication for 'myocardial infarction'?
Evidence: take medication for myocardial infarction refers to medications.REASONDESCRIPTION = 'Myocardial Infarction';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Myocardial Infarction' AND T1.ethnicity = 'irish'
Database: synthea
Question: How many patients with care plan for 'concussion with loss of consciousness' are married?
Evidence: concussion with loss of consciousness refers to careplans.DESCRIPTION = 'Concussion with loss of consciousness'; married refers to marital = 'M';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.marital = 'M' AND T2.REASONDESCRIPTION = 'Concussion with loss of consciousness'
Database: synthea
Question: How many patients immunized against 'monovalent rotavirus' ceased their care plan on 11/23/2013?
Evidence: immunized against monovalent rotavirus refers to immunizations.DESCRIPTION = 'rotavirus monovalent'; ceased their care plan on 11/23/2013 refers to careplans.STOP = '2013-11-23';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM careplans AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'rotavirus  monovalent' AND T1.STOP = '2013-11-23'
Database: synthea
Question: How many women need to take 'Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual]'?
Evidence: women refers to gender = 'F'; Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual] refers to medications.DESCRIPTION = 'Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual]'
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual]' AND T1.gender = 'F'
Database: synthea
Question: What percentage of patients born in 'Pembroke MA US' have 'allergy to grass pollen'?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(patient WHERE allergies.DESCRIPTION = 'Allergy to grass pollen'), COUNT(patient) WHERE birthplace = 'Pembroke MA US'), 100.0); born in Pembroke MA US refers to birthplace = 'Pembroke MA US'; allergy to grass pollen refers to allergies.DESCRIPTION = 'Allergy to grass';
SQL: SELECT CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Allergy to grass pollen' THEN 1 ELSE 0 END) AS REL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.birthplace = 'Pembroke MA US'
Database: synthea
Question: What is the average body weight of Asian patients?
Evidence: average = AVG(observations.VALUE WHERE observations.DESCRIPTION = 'Body Weight' AND observations.UNITS = 'kg'); body weight refers to observations.DESCRIPTION = 'Body Weight'; Asian refers to race = 'asian';
SQL: SELECT SUM(T2.VALUE) / COUNT(T1.patient) FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.race = 'asian' AND T2.DESCRIPTION = 'Body Weight' AND T2.UNITS = 'kg'
Database: synthea
Question: Write down the Social Security numbers of patients who have latex allergies.
Evidence: Social Security numbers refers to ssn; latex allergies refers to allergies.DESCRIPTION = 'Latex allergy';
SQL: SELECT T1.ssn FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Latex allergy'
Database: synthea
Question: How long did Isadora Moen's allergy last? Tell me what kind of allergy she has.
Evidence: how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
SQL: SELECT CASE WHEN SUBSTR(T1.STOP, -2, 1) != '9' THEN SUBSTR(T1.STOP, LENGTH(T1.STOP) - 1) + 2000 END - CASE WHEN SUBSTR(T1.START, -2, 1) = '9' THEN SUBSTR(T1.START, LENGTH(T1.START) - 1) + 1900 ELSE SUBSTR(T1.START, LENGTH(T1.START) - 1) + 2000 END AS years , T1.DESCRIPTION FROM allergies AS T1 INNER JOIN patients AS T2 ON T2.patient = T1.PATIENT WHERE T1.STOP IS NOT NULL AND T1.START IS NOT NULL AND T2.first = 'Isadora' AND T2.last = 'Moen'
Database: synthea
Question: How many times was Elly Koss given a care plan between 1/11/2009 and 10/23/2010?
Evidence: between 1/11/2009 and 10/23/2010 refers to careplans.START between '2009-11-1' and '2010-10-23';
SQL: SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START BETWEEN '2009-01-11' AND '2010-10-23'
Database: synthea
Question: In 2009, who among the married patients had undergone a care plan for more than 60 days?
Evidence: in 2009 refers to year(careplans.START) = 2009; married patients refers to marital = 'M'; undergone a care plan for more than 60 days refers to SUBTRACT(careplans.STOP, careplans.START) > 60;
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.marital = 'M' AND strftime('%J', T2.STOP) - strftime('%J', T2.START) > 60
Database: synthea
Question: Please provide the dates on which Elly Koss was immunized with the influenza seasonal injectable preservative-free vaccine.
Evidence: date of immunization refers to immunizations.DATE; immunized with the influenza seasonal injectable preservative-free vaccine refers to immunizations.DESCRIPTION = 'Influenza seasonal injectable preservative free';
SQL: SELECT T2.DATE FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Influenza  seasonal  injectable  preservative free' AND T1.first = 'Elly' AND T1.last = 'Koss'
Database: synthea
Question: From 7/9/2010 to 10/29/2013, how many black patients were immunized with the meningococcal MCV4P vaccine?
Evidence: From 7/9/2010 to 10/29/2013 refers to DATE between '2010-07-09' and '2013-10-29'; black patients refers to race = 'black'; immunized with the meningococcal MCV4P vaccine refers to immunizations.DESCRIPTION = 'meningococcal MCV4P';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'meningococcal MCV4P' AND T2.DATE BETWEEN '2010-07-09' AND '2013-10-29' AND T1.race = 'black'
Database: synthea
Question: Give me the immunization codes and dates on which Ms. Jacquelyn Shanahan was immunized with influenza seasonal injectable preservative-free vaccine.
Evidence: immunization codes refers to immunizations.CODE; immunization dates refers to immunizations.DATE; immunized with influenza seasonal injectable preservative-free vaccine refers to immunizations.DESCRIPTION = 'Influenza seasonal injectable preservative free'; 4 consecutive years refers to 4 succeeding years;
SQL: SELECT DISTINCT T2.CODE, T2.DATE FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DESCRIPTION = 'Influenza  seasonal  injectable  preservative free'
Database: synthea
Question: How long did Berry Keebler take the Acetaminophen 160 MG when he was admitted due to acute bronchitis?
Evidence: how long = SUBTRACT(medications.STOP, medications.START); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG'; acute bronchitis refers to medications.REASONDESCRIPTION = 'Acute bronchitis (disorder)';
SQL: SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS takenDays FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Berry' AND T1.last = 'Keebler' AND T2.REASONDESCRIPTION = 'Acute bronchitis (disorder)' AND T2.DESCRIPTION = 'Acetaminophen 160 MG'