SELECT
  *
FROM
  dbo.Klaim_Peserta AS k INNER JOIN
  dbo.Polis_Asuransi AS pa ON k.No_Proposal = pa.No_Proposal INNER JOIN
  dbo.Perusahaan AS prs ON pa.No_Prs = prs.No_Prs
WHERE
  pa.No_Polis IN (
            '2004.0216.0',
            '2004.0217.0',
            '2004.0218.0',
            '2004.0214.0',
            '1991.0203.1',
            '2010.0097.0',
            '2004.0220.0',
            '1992.0013.0',
            '2004.0215.0',
            '1999.0075.0'
  )

  
SELECT
  x.Nama_Perusahaan,
  x.No_Polis,
  x.Tgl_PPK,
  x.Tgl_Lunas,
  SUM(x.Jml_Lunas) AS Jml_Lunas
FROM
  (
    SELECT
      prs.Nama_Perusahaan,
      pa.No_Polis,
      ntm.Tgl_Bayar AS Tgl_PPK,
      ntm.Tgl_Lunas,
      ntm.Jml_Lunas
    FROM
      dbo.Note_Terbit_Master AS ntm INNER JOIN
      dbo.Polis_Asuransi AS pa ON ntm.No_Proposal = pa.No_Proposal INNER JOIN
      dbo.Perusahaan AS prs ON pa.No_Prs = prs.No_Prs
    WHERE
      ntm.Jenis = 21  -- Santunan Klaim
      AND pa.No_Polis IN (
                '2004.0216.0',
                '2004.0217.0',
                '2004.0218.0',
                '2004.0214.0',
                '1991.0203.1',
                '2010.0097.0',
                '2004.0220.0',
                '1992.0013.0',
                '2004.0215.0',
                '1999.0075.0'
      )
      AND ntm.Tgl_Lunas >= '2014-01-01'
      AND ntm.Tgl_Lunas <= '2014-12-31'
  ) AS x
GROUP BY
  x.Nama_Perusahaan,
  x.No_Polis,
  x.Tgl_PPK,
  x.Tgl_Lunas
ORDER BY
  x.Nama_Perusahaan,
  x.Tgl_PPK