้ืdeath ที่ไม่มีรายละเอียดการเสียชีวิต ใด ๆ หรือ death สำรวจ ไม่ควรมีในตาราง death ครับขอบคุณครับ
ส่วนการหา death ที่บริการแต่ไม่มีบันทึกในแฟ้ม death ก็ลองหาจากโค๊ด: Ada
select p.hn,p.death,p.last_visit from patient p where p.death="Y" and p.hn not in (select hn from death)