ผู้ป่วยชายเข้ารับการเปลี่ยนข้อสะโพกกี่คน?ไม่จำเป็นต้องใช้ทุกโต๊ะ
how many of the male patients had hip joint replacement?It is not neccessary to use all the tables.
 procedures:  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.long_title = "Hip joint replacement"