ผู้ป่วยชายมีรหัส icd9 51889 กี่คน ไม่จำเป็นต้องใช้ทุกตาราง
how many of the male patients had icd9 code 51889?It is not neccessary to use all the tables.
 diagnoses:  subject_id [ text]  hadm_id [ text]  icd9_code [ text]  short_title [ text]  long_title [ text] 
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "51889"