ได้แล้วครับ ขอขอบคุณ อาจารย์ทุกๆท่านที่ให้ความช่วยเหลือครับผม
.....
select count(distinct(s1.person_anc_id) ) as tg
,s1.anc_service_number as s1
,s2.anc_service_number as s2
,s3.anc_service_number as s3
,s4.anc_service_number as s4
from person_anc a
left outer join person_anc_service s1 on s1.person_anc_id=a.person_anc_id
left outer join person_anc_service s2 on s2.person_anc_id=a.person_anc_id
left outer join person_anc_service s3 on s3.person_anc_id=a.person_anc_id
left outer join person_anc_service s4 on s4.person_anc_id=a.person_anc_id
where s1.person_anc_id=18
and s1.anc_service_number=1
and s2.anc_service_number=2
and s3.anc_service_number=3
and s4.anc_service_number=4