ระบุจำนวนคนไข้ที่มีการตรวจทางห้องปฏิบัติการ รหัส 51447 และเกิดก่อนปี พ.ศ. 2380 ไม่จำเป็นที่จะต้องใช้ทุกตาราง
provide the number of patients who have lab test item id 51447 and were born before the year 1837.It is not neccessary to use all the tables.
 demographic:  subject_id [ text]  hadm_id [ text]  name [ text]  marital_status [ text]  age [ text]  dob [ text]  gender [ text]  language [ text]  religion [ text]  admission_type [ text]  days_stay [ text]  insurance [ text]  ethnicity [ text]  expire_flag [ text]  admission_location [ text]  discharge_location [ text]  diagnosis [ text]  dod [ text]  dob_year [ text]  dod_year [ text]  admittime [ text]  dischtime [ text]  admityear [ text] 
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "1837" AND lab.itemid = "51447"