--SELECT COUNT(*) FROM Peserta_Produk_Detail WHERE No_Ref='2014.001576'

SELECT TOP 100
  pd.No_Peserta,
  pd.No_Ref,
  pd.No_Proposal,
  pd.Status,
  pd.Sub_Kelompok,
  p.Nik,
  p.Nama,
  p.Grade,
  p.Pln,
  pd.Kelamin,
  pd.Status_Kawin,
  pd.Usia AS Umr,
  pd.Jenis,
  pd.Sebagai,
  pd.Benefit,
  pd.kelas,
  pd.Resiko,
  pd.Curr_Premi
FROM
  Peserta_Produk_Detail AS pd INNER JOIN
  Peserta AS p ON p.No_Peserta = pd.No_Peserta AND p.No_Proposal = pd.No_Proposal
WHERE
  pd.No_Ref = '2014.001576'
----
SELECT TOP 100
  pd.No_Peserta,
  pd.No_Ref,
  pd.No_Proposal,
  pd.Status,
  pd.Sub_Kelompok,
  p.Nik,
  nikpst.Nik,
  p.Nama,
  p.Grade,
  p.Pln,
  pd.Kelamin,
  pd.Status_Kawin,
  pd.Usia AS Umr,
  pd.Jenis,
  pd.Sebagai,
  pd.Benefit,
  pd.kelas,
  pd.Resiko,
  pd.Curr_Premi
FROM
  Peserta_Produk_Detail AS pd INNER JOIN
  Peserta AS p ON p.No_Peserta = pd.No_Peserta AND p.No_Proposal = pd.No_Proposal LEFT JOIN
  (
    SELECT
      DISTINCT
      LEFT(No_Peserta,10) AS No_Pst,
      Nik,
      No_Proposal
    FROM
      Peserta
    WHERE
      Sebagai=0
  ) AS nikpst ON p.No_Proposal=nikpst.No_Proposal AND LEFT(p.No_Peserta,10)=nikpst.No_Pst
WHERE
  pd.No_Ref = '2014.001576'

SELECT
  DISTINCT
  LEFT(No_Peserta,10) AS No_Pst,
  Nik,
  No_Proposal
FROM
  Peserta
WHERE
  Sebagai=0
  AND No_Proposal='2013.0786'