นับจำนวนครั้งที่ผู้ป่วย 005-26011 ได้รับการผ่าตัดเข้าฟอกไตจนถึงปี 2104 ไม่จำเป็นต้องใช้ตารางทั้งหมด
count the number of times that patient 005-26011 has received a dialysis access surgery procedure until 2104.It is not neccessary to use all the tables.
 treatment:  treatmentid [ number]  patientunitstayid [ number]  treatmentname [ text]  treatmenttime [ time] 
SELECT COUNT(*) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-26011')) AND treatment.treatmentname = 'dialysis access surgery' AND STRFTIME('%y', treatment.treatmenttime) <= '2104'