Advertisement
dweialim

QUERY REKAP RAJAL

Oct 17th, 2024
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.91 KB | Source Code | 0 0
  1. SELECT
  2.     rajal.No_Register,
  3.     regis.No_RM,
  4.     regis.Nama_Pasien,
  5.     regis.AlamatPasien as Alamat,
  6.     regis.NoPeserta as "No BPJS",
  7.     pasien.NoKtp as "No NIK",
  8.     regis.Umur,
  9.     regis.JenisKel as "Jenis Kelamin",
  10.     antrian.is_pasien_baru as "Pasien Baru",
  11.     rajal.NamaAsuransi as "Nama Asuransi",
  12.     poli.NamaPoli as "Nama Poli",
  13.     rajal.Tgl as Tanggal,
  14.     rajal.DiagnosaPrimer as "Kode Diagnosa",
  15.     rajal.NamaDiagnosaPrimer as "Nama Diagnosa"
  16.  
  17. FROM tr_rawatjalantindakan rajal
  18. JOIN tr_registrasi regis
  19.     ON regis.No_Register = rajal.No_Register
  20. JOIN tm_customer pasien
  21.     ON regis.No_RM = pasien.KodeCust
  22. LEFT JOIN natusi_apm.antrian antrian
  23.     ON pasien.KodeCust = antrian.no_rm
  24. JOIN tm_poli poli
  25.     ON regis.Kode_Poli1 = poli.KodePoli
  26. -- WHERE rajal.Tgl BETWEEN '2024-07-01' AND '2024-07-31'
  27. -- WHERE rajal.Tgl BETWEEN '2024-08-01' AND '2024-08-30'
  28. WHERE rajal.Tgl BETWEEN '2024-09-01' AND '2024-09-30'
  29. GROUP BY rajal.No_Register
Tags: query rekap
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement