SELECT
  pa.No_Polis,
  pa.No_Proposal,
  prs.Nama_Perusahaan,
  pst.No_Peserta,
  pst.Nama,
  dbo.Sebagai.Status_Peserta, 
  pst.Tgl_Lahir,
  pst.Kelamin,
  dbo.func_GetUmur(pst.Tgl_Lahir, pst.Tgl_Mulai) AS Umur, 
  pst.Tgl_Mulai,
  pst.Tgl_Selesai,
  pst.Pln,
  --pst.Kelas,
  dbo.func_get_kelas_peserta(pst.No_Proposal, pst.No_Peserta) as Kelas--,
  --prd.Sub_Kelompok,
  --prd.Benefit
FROM
  dbo.Peserta AS pst INNER JOIN
  dbo.Polis_Asuransi AS pa ON pst.No_Proposal = pa.No_Proposal INNER JOIN
  dbo.Perusahaan AS prs ON pa.No_Prs = prs.No_Prs INNER JOIN
  --dbo.Peserta_Produk AS prd ON pst.No_Peserta=prd.No_Peserta AND pst.No_Proposal=prd.No_Proposal LEFT JOIN
  dbo.Sebagai ON pst.Sebagai = dbo.Sebagai.IDI 
WHERE
  prs.GT_OG = 'GT'
  AND pa.Active_Ya = 1
  AND pa.Status = 'I'
  AND pst.Status = 'I'
  --AND prd.Sub_Kelompok = '0100' -- AJB
  AND dbo.func_GetUmur(pst.Tgl_Lahir, pst.Tgl_Mulai)>=56
ORDER BY
  prs.Nama_Perusahaan,
  pst.No_Peserta
