1sf/bird-sql-train-with-schema huggingface dataset:
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Please list all the medication that are prescribed to Elly Koss.
Evidence: medication that are prescribed refers to DESCRIPTION from medications;
SQL: SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Why did Elly Koss need to take Acetaminophen?
Evidence: why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
SQL: SELECT T2.REASONDESCRIPTION FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description LIKE 'Acetaminophen%'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: What medication did Elly Koss take when she had Streptococcal sore throat?
Evidence: medication refers to DESCRIPTION from medications; Streptococcal sore throat refers to REASONDESCRIPTION like 'Streptococcal sore throat%';
SQL: SELECT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.reasondescription = 'Streptococcal sore throat (disorder)'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Please give the full names of all the patients who had been prescribed with Acetaminophen.
Evidence: full name refers to first, last; prescribed with Acetaminophen refer to DESCRIPTION like 'Acetaminophen%' from medications;
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.description LIKE 'Acetaminophen%'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: What was the condition of Elly Koss on 2009/1/8?
Evidence: condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
SQL: SELECT T2.description FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START = '2009-01-08'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: For how long did Elly Koss's cystitis last?
Evidence: SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
SQL: SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Cystitis'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: According to all the observations of Elly Koss, what was her average weight?
Evidence: DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
SQL: SELECT AVG(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
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Among all the patients who once had cystitis, what was the percentage of them being married?
Evidence: DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';

SQL: SELECT CAST(SUM(CASE WHEN T1.marital = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.description = 'Cystitis'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Give the body height status of Mr. Vincent Wyman on 2010/8/2.
Evidence: body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
SQL: SELECT T2.description, T2.VALUE, T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mr.' AND T1.first = 'Vincent' AND T1.last = 'Wyman' AND T2.date = '2010-08-02' AND T2.description = 'Body Height'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: How many care plans has Mrs. Norman Berge taken?
SQL: SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Norman' AND T1.last = 'Berge'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Why did Mrs. Annabelle Pouros take leucovorin 100 mg injection on 1970/12/19? State the reason.
Evidence: reason why take leucovorin 100 mg injection refers to REASONDESCRIPTION where DESCRIPTION = 'Leucovorin 100 MG Injection'; on 1970/12/19 refers to START = '1970-12-19';
SQL: SELECT T2.reasondescription FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Annabelle' AND T1.last = 'Pouros' AND T2.start = '1970-12-19' AND T2.description = 'Leucovorin 100 MG Injection'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: What is the prevalence percentage of condition no. 64859006?
Evidence: condition no. 64859006 refers to conditions where CODE = '64859006';
SQL: SELECT DISTINCT T1."PREVALENCE PERCENTAGE" FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) WHERE T2.code = '64859006'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: State the prevalence rate of condition no. 368581000119106.
Evidence: condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
SQL: SELECT DISTINCT T1."PREVALENCE RATE" FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) WHERE T2.code = '368581000119106'
Database: synthea
Tables: all_prevalences, patients, encounters, allergies, careplans, conditions, immunizations, medications, observations, procedures, claims
Columns (table index, column name): -1, *, 0, ITEM, 0, POPULATION TYPE, 0, OCCURRENCES, 0, POPULATION COUNT, 0, PREVALENCE RATE, 0, PREVALENCE PERCENTAGE, 1, patient, 1, birthdate, 1, deathdate, 1, ssn, 1, drivers, 1, passport, 1, prefix, 1, first, 1, last, 1, suffix, 1, maiden, 1, marital, 1, race, 1, ethnicity, 1, gender, 1, birthplace, 1, address, 2, ID, 2, DATE, 2, PATIENT, 2, CODE, 2, DESCRIPTION, 2, REASONCODE, 2, REASONDESCRIPTION, 3, START, 3, STOP, 3, PATIENT, 3, ENCOUNTER, 3, CODE, 3, DESCRIPTION, 4, ID, 4, START, 4, STOP, 4, PATIENT, 4, ENCOUNTER, 4, CODE, 4, DESCRIPTION, 4, REASONCODE, 4, REASONDESCRIPTION, 5, START, 5, STOP, 5, PATIENT, 5, ENCOUNTER, 5, CODE, 5, DESCRIPTION, 6, DATE, 6, PATIENT, 6, ENCOUNTER, 6, CODE, 6, DESCRIPTION, 7, START, 7, STOP, 7, PATIENT, 7, ENCOUNTER, 7, CODE, 7, DESCRIPTION, 7, REASONCODE, 7, REASONDESCRIPTION, 8, DATE, 8, PATIENT, 8, ENCOUNTER, 8, CODE, 8, DESCRIPTION, 8, VALUE, 8, UNITS, 9, DATE, 9, PATIENT, 9, ENCOUNTER, 9, CODE, 9, DESCRIPTION, 9, REASONCODE, 9, REASONDESCRIPTION, 10, ID, 10, PATIENT, 10, BILLABLEPERIOD, 10, ORGANIZATION, 10, ENCOUNTER, 10, DIAGNOSIS, 10, TOTAL
Question: Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9.
Evidence: on 2009/8/9 refers to DATE = '2009-08-09';
SQL: SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DATE = '2009-08-09'