SELECT
  Peserta_Produk_Detail.*
FROM
  (Peserta_Produk_Detail
  INNER JOIN Peserta ON Peserta_Produk_Detail.No_Peserta = Peserta.No_Peserta
                        AND Peserta_Produk_Detail.No_Proposal = Peserta.No_Proposal)
  INNER JOIN Note_Terbit_Master ON Peserta_Produk_Detail.No_Ref = Note_Terbit_Master.No_Ref
WHERE
 Peserta_Produk_Detail.No_Ref IN (SELECT DISTINCT
              no_ref
             FROM
              gt_lapse_header)
  AND Peserta_Produk_Detail.Usia_Old IS NULL
ORDER BY
  Peserta_Produk_Detail.No_Peserta
  

SELECT
  *
FROM
  Peserta_Produk_Detail
WHERE
 No_Ref IN (SELECT DISTINCT
              no_ref
             FROM
              gt_lapse_header)
  AND Usia_Old IS NULL
ORDER BY
  No_Peserta

--DELETE
--FROM
--  Peserta_Produk_Detail
--WHERE
--  No_Ref IN ( SELECT DISTINCT
--                no_ref
--              FROM
--                gt_lapse_header
--            )
--  AND Usia_Old IS NULL