instruction: How many patients admitted to the hospital before 2139 had a lab test base excess?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.label = "Base Excess"